Data Study on New York City Park Crimes

Posted on Nov 5, 2018
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.


In this leading age of science and technology, security is a major concern for all people. People have limited time to spend with family and friends due to busy life. Whatever time is available they want to spend on peace and secure place. I made this web application for people who want to spent more time in the New York City parks . This data application allows user to investigate crimes in various parks in the New York City by numbers, year, borough, and crime types and alert them about crimes in parks around them.

The Data Set:

Park crime data is released every quarter in NYC open data and was downloaded from this link. For building this application,  data from 2014, 2015, 2016, 2017, and 2018 (two quarters) were used.  The original data was 1.5 Mb.



This application contained various visualization tabs under overview tab which are described below:

a) Crime counts by year and park:

This tab provides user to visualize total number of crimes in various parks by year and borough. Here is an example of visualization, in Queens in 2016 the total crimes in Flushing meadows Corona park was 80 which was the highest number of crimes among all parks in Queens. Similarly, user can select other borough to visualize total crimes in parks.

Data Study on New York City Park Crimes

b) Crimes by borough: 

This tab provides user to select top three crime parks in various borough by year and number of crimes. Please find visualization example, in 2017 top three parks with highest number of crimes in Manhattan were Randall's island park, Riverside park, and Union Square park; in Queens were Flushing meadows Corona park, Kissena Corrider park, and Rockway Beach and Broadway park.


Data Study on New York City Park Crimes


c) Total crimes by years and quarters:

This tab visualizes total crimes by year in various quarters. From the histogram plot, it was observed that the crimes increases in third quarter which is the season of good weather and people spend more time in parks. This tab allows  user to select  total crimes by borough too. Here is an illustrative example for Manhattan borough.

Data Study on New York City Park Crimes


d) Distribution of crimes: 

In this tab, user can visualize piechart distribution of various crimes in parks. This is a pie chart distribution of crimes in Manhattan in year 2014. Similarly, use can select various borough id different years to visualize crimes in parks in the New York City.

e) Scatter plot:

This tab allows user to investigate a correlation between size of park with total crimes. The correlation between total crimes and size of parks was found insignificant.


Future directions:

In future, it would be nice to figure out safe zones with safe park by combining park crime data with NYC crime data.


Please find all my codes to process the data in this link -

Shiny app link:



About Author

Basant Dhital

Basant Dhital is a Physics Ph.D. with an excellent background in Mathematics and Statistics and demonstrated programming skills. During his Ph.D. research, he developed several algorithms to process and analyze NMR and other spectroscopic data. He developed a...
View all posts by Basant Dhital >

Leave a Comment

No comments found.

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