High Level Design
Overview
The Motor Vehicle Collisions data tables contain information from all police reported motor vehicle collisions in NYC. 228,047 of vehicle accidents reported in the NYC in 2018, according to data from New York City Police Department. That breaks down to:
- 19,000 vehicle Accidents per month
- 4,750 vehicle Accidents per week
- 678 vehicle Accidents per day
- 28 vehicle Accidents per hour
- 1 vehicle Accident every 2 minute
Goals
Provide a high-level approach to monitor NYC vehicle accident’s reports by multiple categories to increase police activity in certain areas and neighborhood in order to prevent human casualties as much as possible.
Objectives
- Each fatal accident should be represented on the NYC geographical map as a yellow circle dot, by its longitude and latitude number. By slicing the data according to the combination of chosen year, including all boroughs as an option, the fatal accidents can be visually inspected on NYC map in each borough.
- Discover the year over year number of accidents with injured and killed people
- Identify month, day of week or hour which vehicle accidents are more likely to happen
- Provide vehicle accidents information about specific boroughs and vehicle type
KPIs Architecture
Objectives |
KPIs |
Measures |
Data Source |
Discover the year-over-year number of accidents with injured and killed people |
# Number of Accidents +YoY YTD increase/decrease |
COUNT(Collision ID) |
NYPD Vehicle Collisions Report |
# Number of Accidents with Injured + YoY YTD increase/decrease |
COUNT(Collision ID) filtered by Injured>0 |
||
# Number of Accidents with Killed + YoY YTD increase/decrease
|
COUNT(Collision ID) filtered by Killed>0 |
||
Identify month, day of week or hour which vehicle accidents are more likely to happen |
#Accidents with Killed # Accidents with Injured |
COUNT(Collision ID) filtered by Injured>0 COUNT(Collision ID) filtered by Killed>0 |
NYPD Vehicle Collisions Report |
#Injured (Persons)
|
SUM(Number of Person Injured) |
||
#Killed (Persons) |
SUM(Number of Person Killed) |
||
Provide vehicle accidents information about specific boroughs and vehicle type |
#Accidents with Killed # Accidents with Injured |
COUNT(Collision ID) filtered by Injured>0 COUNT(Collision ID) filtered by Killed>0 |
|
#Injured (Persons) |
SUM(Number of Person Injured) |
||
#Killed (Persons) |
SUM(Number of Person Killed) |
Plugins & Scripts
- ArcGIS (Premium) – https://www.sisense.com/marketplace/arcgis-map-integration/
- Widget Title Plugin – https://www.sisense.com/marketplace/tabber/
- Image Widget Plugin – https://support.sisense.com/hc/en-us/community/posts/221226208-Widget-title-style-plugin
- Selected filters widget – smart label plugin – https://support.sisense.com/hc/en-us/community/posts/221224728-The-Smart-Label
- Image Widget Plugin – https://support.sisense.com/hc/en-us/community/posts/221224568-Adding-Logo-Image-to-a-dashboard
- Distribute Widgets equally in a row Plugin –
- Days/Month visualizations in line charts – https://support.sisense.com/hc/en-us/community/posts/360023171814-Create-Widgets-with-Month-or-Day-names-by-the-correct-order
Blox Scripts
Filters Disable buttons –
Blox Editor Script |
Blox Actions |
{ “style”: “”, “script”: “”, “titleStyle”: [ { “display”: “none” } ], “showCarousel”: false, “body”: [], “actions”: [ { “type”: “Disable Year”, “title”: “Disable Year Filter”, “style”: { “padding”: “8px 20px” } }, { “type”: “Disable Month”, “title”: “Disable Month Filter”, “style”: { “padding”: “8px 20px” } }, { “type”: “Disable DayOfWeek”, “title”: “Disable Day Filter”, “style”: { “padding”: “8px 20px” } }, { “type”: “Disable Borough”, “title”: “Disable Borough Filter”, “class”: “b”, “style”: { “padding”: “8px 20px” } }, { “type”: “Disable Vehicle”, “title”: “Disable Vehicle Filter”, “style”: { “padding”: “8px 20px” } }, { “type”: “Disable Hour”, “title”: “Disable Hour Filter”, “style”: { “padding”: “8px 12px” } } ] }
|
//disable year
const image = payload.imageUrl; const logo = document.querySelector(‘.prism-header__logo’); logo.style = `background-image: url(${image})`; prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.DATE (Calendar)]’, ‘title’:’Year’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”date” } },{‘save’:true, ‘refresh’:true})
//Disable borough const image = payload.imageUrl; const logo = document.querySelector(‘.prism-header__logo’); logo.style = `background-image: url(${image})`; prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.BOROUGH]’, ‘title’:’Borough’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”text” } },{‘save’:true, ‘refresh’:true})
//disable vehicle type const image = payload.imageUrl; const logo = document.querySelector(‘.prism-header__logo’); logo.style = `background-image: url(${image})`; prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.VEHICLE TYPE CODE 1]’, ‘title’:’Vehicle Type’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”text” } },{‘save’:true, ‘refresh’:true})
//Disable month const image = payload.imageUrl; const logo = document.querySelector(‘.prism-header__logo’); logo.style = `background-image: url(${image})`; prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.aFACTIAAaMotorVehicleCollisionsCrashes.aMonth]’, ‘title’:’Month’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”numeric” } },{‘save’:true, ‘refresh’:true})
//disable day of week const image = payload.imageUrl; const logo = document.querySelector(‘.prism-header__logo’); logo.style = `background-image: url(${image})`; prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.aFACTIAAaMotorVehicleCollisionsCrashes.aDayOfWeek]’, ‘title’:’Month’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”numeric” } },{‘save’:true, ‘refresh’:true})
//disable hour const image = payload.imageUrl; const logo = document.querySelector(‘.prism-header__logo’); logo.style = `background-image: url(${image})`; prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.TIME (Calendar)]’, ‘title’:’Hours in TIME’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”datetime” } },{‘save’:true, ‘refresh’:true})
//Bring all filters to default (All selection)
const image = payload.imageUrl; const logo = document.querySelector(‘.prism-header__logo’); logo.style = `background-image: url(${image})`; prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.DATE (Calendar)]’, ‘title’:’Year’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”date” } },{‘save’:true, ‘refresh’:true});
prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.BOROUGH]’, ‘title’:’Borough’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”text” } },{‘save’:true, ‘refresh’:true});
prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.VEHICLE TYPE CODE 1]’, ‘title’:’Vehicle Type’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”text” } },{‘save’:true, ‘refresh’:true});
prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.aFACTIAAaMotorVehicleCollisionsCrashes.aMonth]’, ‘title’:’Month’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”numeric” } },{‘save’:true, ‘refresh’:true});
prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.aFACTIAAaMotorVehicleCollisionsCrashes.aDayOfWeek]’, ‘title’:’DayOfWeek’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”numeric” } },{‘save’:true, ‘refresh’:true});
prism.activeDashboard.filters.update( { ‘jaql’:{ ‘dim’:'[FACT MotorVehicleCollisionsCrashes.TIME (Calendar)]’, ‘title’:’Hours in TIME’, ‘filter’:{ ‘members’: [] }, ‘datatype’:”datetime” } },{‘save’:true, ‘refresh’:true});
|