Crimes in Boston

Posted on Apr 27, 2019


The social security and personal safety have always been the primary concern of our life. The aim of this project is to design an interactive shiny web app that display and inspect Crimes in Boston from the June 15, 2015 to October 3, 2018. Based on the crime historical data, we can understand what happened over the past years, and what’s the safest place to live. So, I decided to create this shiny app to help people in Boston to better understand about their neighborhood.

The main purpose of this app is not only focused on present insights from dataset, but also to create an app that users can play around with and get information they want.

Here is my Shiny App, if you are interested in my code, feel free to view my GitHub repo.


The Dataset

The Dataset is from, and it is originally provided by Boston Police Department. Thanks to Boston Police Department for making this dataset available to everyone, and it gives me a chance to inspect the crime patterns in Boston area. The dataset containing records from the new crime incident report system, which includes a reduced set of fields focused on capturing the type of incident as well as when and where it occurred. The dataset itself contains 2,60,760 rows and 17 columns. I mainly focused are in three categories: Time, Location, and Crime Type.


The project

I did the basic cleaning for the dataset first and start to build up my app from scratch. The main tabs are Map, Time series, and Word Cloud.

Map Tab:

The top are the highest/lowest crime ratio and average numbers of crime in year chosen below. When mouse move over, the district code and crime info will appeal. The Shooting checkbox in select input section is for display the shooting case crime.

When shooting checkbox is checked, click the point to inspect the what time and crime type with shooting happened.

The second checkbox allow users to inspect the selected district they want to see.  

Time Series Tab:

The graph displays the trend of numbers of crimes happened each calendar day.

When Select by Date checked, user can see the trend by year/month/week/hour. Make sure change the date to the whole year in the date range.

In addition, the user can also view each district crime ratio by year by selecting the last button on the scroll down menu.

Word cloud Tab:

Finally, view what exactly happened in each district!

About Author


Zhuoyi Liu

Zhuoyi is an aspiring data scientist who like the challenge of drawing on creative solutions to problems. Alongside completing Master's Degree at New York University (Expected Dec. 2019), He is also a fellow at the NYC data science...
View all posts by Zhuoyi Liu >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

2019 airbnb alumni Alumni Interview Alumni Spotlight alumni story Alumnus API artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Big Data bootcamp Bootcamp Prep Bundles California Cancer Research capstone Career citibike clustering Coding Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Industry Experts Job JP Morgan Chase Kaggle lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Open Data painter pandas Portfolio Development prediction Programming PwC python 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 recommendation recommendation system regression Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Tableau Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping What to expect word cloud word2vec XGBoost yelp