NYC Accident Analytics Report Dashboard

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

  1. Blox – https://www.sisense.com/marketplace/blox-widgets/

 

  1. ArcGIS (Premium) – https://www.sisense.com/marketplace/arcgis-map-integration/

 

  1. Widget Title Plugin – https://www.sisense.com/marketplace/tabber/

 

  1. Image Widget Plugin – https://support.sisense.com/hc/en-us/community/posts/221226208-Widget-title-style-plugin

 

  1. Selected filters widget – smart label plugin – https://support.sisense.com/hc/en-us/community/posts/221224728-The-Smart-Label

 

  1. Image Widget Plugin – https://support.sisense.com/hc/en-us/community/posts/221224568-Adding-Logo-Image-to-a-dashboard

 

  1. Distribute Widgets equally in a row Plugin –

https://support.sisense.com/hc/en-us/community/posts/115005867428-Distribute-Equally-the-Widgets-in-a-Dashboard-Row

 

  1. 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});

 

 

Implementation
Kit

The following resources will enable you to design your dashboard and data model with sample data and then apply it to your own data. Note that you will need to have a previously installed version of Sisense (you can use the free trial version if you’re not a customer).

Sample data and dashboard examples (direct download)

Documentation