Data Visualization on Motor vehicle collisions in NYC

Posted on Jul 6, 2017
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Introduction

Shiny by RStudio is a web application framework targeted for R programmers. It allows our data 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Β https://data.cityofnewyork.us/Public-Safety/NYPD-Motor-Vehicle-Collisions/h9gi-nx95

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 Data

ui-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.

hourofincident

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

weekofthedayplot

 

 

Accident density based on the month of the year.

monthlydistribution

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

locationsofincidents

Summarized information based on the density of accidents across NYC

accidentdensity

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

datatableview

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

singlevehicleaccidentvehicletype

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.

multivehiclevehicletypes

 

Conclusion

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 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis 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 seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI