Are parks around you safe in New York City?

Posted on Nov 5, 2018


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

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.



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.


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