Motor vehicle collisions in New York City - R / Shiny Data Visualization

Posted on Jul 6, 2017


Shiny by RStudio is a web application framework targeted for R programmers. It allows our analysis to be extended as an interactive web application  that can be quickly developed and deployed using RStudio. The post presents how vast amount of data is easily filtered and used as input to the visualizations that were developed.

Data Source

The data that has been published under the New York open data project contains details of all motor vehicle collisions and related data including location and timing information as well as details of the vehicle involved in the collision and the root cause. The data can be accessed at

The source data consists of around 948,000 records and by designing a shiny based interface to filter data with the goal of finding trends.

The Shiny Interface

The user interface has been designed such that the left side contains a bar that contains radio buttons and filter controls that lets the user filter the data according to our analysis needs.

Filter Control


The interface lets us filter the data according to our needs.

Tabbed Detail Interface - Data Visualization

The tabbed detail interface lets the user view various types of visualizations that were created based on the filtered data. For e.g., it lets the user see the accidents based on the hour of the day it happened. Selecting another tab lets you see the same data on top if a map.


Spread of the accidents based on the day of the week.




Accident density based on the month of the year.


Accidents mapped on top of a map of New York City.


Summarized information based on the density of accidents across NYC


Detailed information related to the data records that are filtered based on the selected controls.


Visualization depicting the type of the vehicles involved in the accidents.


Based on an alternate filter, we see that the shiny app allows the user to see the same graph based on the new filter selection.




Shiny application is a quick way to allow business users to have greater control over the data. The visualization that we develop can be deployed in such a way that it allows users greater control over the capability. The reports can be regenerated based on their needs.


About Author


Smitha Mathew

Technology Enthusiast, with attention to detail, having global exposure. She is a self-motivated problem solver with experience analyzing data and deriving meaningful statistical information. Her goal is to be able to make a positive difference in peoples lives...
View all posts by Smitha Mathew >

Related Articles

Leave a Comment

Bernardo Lares July 7, 2017
Please do share the Shiny link, thanks! ;)
Motor vehicle collisions in New York City – R / Shiny Data Visualization – Mubashir Qasim July 7, 2017
[…] article was first published on R – NYC Data Science Academy Blog, and kindly contributed to […]
Motor vehicle collisions in New York City – R / Shiny Data Visualization | A bunch of data July 7, 2017
[…] article was first published on R – NYC Data Science Academy Blog, and kindly contributed to […]

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp