A Data Analysis of NYC311 Noise Complaints

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

Introduction


Launched in 2003, NYC311 is an information hub created by the New York City government that provides data and information on and access to over 3600 non-emergency government services.

Originally designed to filter non-emergency calls away from the emergency phone line, 911, NYC311 receives service requests and complaints 24 hours a day, seven days a week, 365 days a year via phone, email, and text in over 175 languages. Service requests can range from inquiries regarding trash collection, voting locations, businesses licensure, and even parking tickets, and complaints can include a wide range of issues including, apartment heating and cooling, street and sidewalk conditions, noisy neighbors and surroundings, and many more.

Since 2010, NYC Open Data has made all NYC311 service requests and complaints publicly available. Here I analyze a subset of these data, those filed under "noise complaints," to provide insights into possible avenues by which NYC311 might improve upon its mission to "provide the public with quick, easy access to all New York City government services and information..."

See my GitHub for access to the code for this project.

 

Data Insights Investigated


Excluding complaints from 2017, the dataset contains over two million entries, with each complaint accompanied by more than 50 attributes describing it. The attributes I used in my analyses included the times the complaint was filed and resolved, the type of noise the complaint was filed under, and the location of the complaint. I aimed to use these analyses to understand the following:

  • the most common complaints
  • the hours, months, and years with the highest complaint frequencies
  • the rate at which different complaint types are resolved
  • how the features above varied between the five boroughs

These analyses can be used to improve NYC311 services by identifying deficiencies in available information for certain complaints, allowing for predictions regarding the times of day or year when complaints surge, and pinpointing which complaint types and boroughs have relatively poorer complaint resolution times.

 

Data Analyses and Visualizations


There are over 35 complaint type descriptors in the dataset that I grouped into 11 categories. The figure below shows that, for all years and all boroughs, the Loud Music/Party complaint was by far the most frequent, comprising nearly 53% of all complaints. The top three complaint types across all boroughs, Loud Music/Party, Banging/Pounding, and Loud Talking are also the top three complaint types within each borough, with the exception of Manhattan, where Construction is the second most frequent complaint type. See my Shiny app* to toggle between years and boroughs.

Volume of Complaints

A Data Analysis of NYC311 Noise Complaints

 

Visualizing all complaints through the years shows that the total number of complaints filed have increased each year. This trend is also seen within each borough except between the years of 2010 and 2011 where some boroughs showed a slight decrease followed by a large increase in 2012. See my Shiny app* to toggle by year and borough.

Years

A Data Analysis of NYC311 Noise Complaints

 

The figure below, which includes data from all complaint types, all boroughs, and all years, describes the distribution of complaints filed during each hour of the day. Disproportionately more complaints were filed in the early morning and nighttime hours than during the day, and this trend is also seen within each borough and year, but not for each complaint type. See my Shiny app* to toggle complaint type, year, and borough. The horizontal line across the figure is the Chi Square goodness of fit expectation, which shows the number of complaints expected to occur during each hour if each hour had the same number of complaints.

Hours

A Data Analysis of NYC311 Noise Complaints

 

Similar to the hours of the day, the total number of complaints for all complaint types, years, and boroughs was not evenly distributed across months. More complaints were filed during the summer months and fewer were filed in months with colder temperatures. Also similar to the hours of the day, this trend is seen across all years and boroughs, but not all complaint types. For example, the most Banging/Pounding complaints were filed during the winter months. See my Shiny app* to toggle complaint types, years, and boroughs. The goodness of fit expectation shows the number of complaints expected for each month if all months had the same number of complaints.

Month

 

Overall, when including all complaint types and years in the analysis, the highest frequency of complaints occurred in Manhattan, and this trend is also true within each year. While Manhattan has the third largest population of the five boroughs at ~ 1.6 million (Queens and Brooklyn are ~ 2.3 and ~ 2.6 million, respectively), its population density is by far the highest at nearly 71,500 people per square mile.

This figure is almost twice the population density of the next most densely populated borough, Brooklyn, at nearly 37,600 people per square mile. This marked difference in population density likely explains the high volume of complaints found in Manhattan. This trend, however, is not the same for each complaint type. For example, Queens and Brooklyn have more Alarm complaints than Manhattan. See my Shiny app* to toggle, complaint type, year, and borough.

 

An analysis of variance (ANOVA) of the total data set suggests that the boroughs do differ significantly in the rate at which complaints are resolved. Including all complaint types and all years, Manhattan has the highest (i.e., slowest) log mean complaint time resolution, despite having the lowest median (F4, 2014390 = 2445, P < 0.001). Letters differences above boroughs correspond to statistical differences at P < 0.001, while shared letters signify no difference.

 

 

 

Similarly, different complaint types differ significantly in their resolution times (F10, 2014384 = 265193, P < 0.001) through all years and boroughs. Letter differences correspond to statistically significant differences at P < 0.001. Luckily for NYC residents, complaints related to noisy neighbors (i.e., Banging/Pounding, Loud Music/Party, Loud Talking, and Loud TV) are resolved the fastest of all types, and this trend is seen through all years and boroughs. See my Shiny app* to toggle between these variables.

Resolution Times

 

Conclusions


The results of these visualizations and analyses reveal important insights into the volume and distribution of noise complaints filed with NYC311. The identification of these trends provides several routes by which NYC311 can build and improve upon their goal of providing the public with fast and easy access to the many governmental services available. Specifically, NYC311 can now:

  • alter staffing to correspond with hours and months of high complaint volume
  • predict future surges in filed complaints
  • work towards improving resolution times for different complaint types
  • develop strategies to reduce resolution times in Manhattan, which has the highest complaint volume and slowest complaint resolution time

 

Future Directions


The short amount of time allotted for research on this project limited the scope of the analyses. Future investigations of these data will benefit from incorporating demographic and socioeconomic data of the complaint areas, refining the analyses to specific neighborhoods rather than just boroughs, and finally by parsing through the myriad resolution types provided by NYC311 that described how each complaint was resolved.

For more information and many more visualizations of the data, including an animated heat map of complaints through the months and years, see my Shiny app, and visit my GitHub repository. Below is a look at the homepage of the full Shiny app*.

*Note, Shiny's free subscription does not support large data files, so the data set displayed in the app is reduced by 75%.

 

 

About Author

M. Aaron Owen

Aaron received his Ph.D. in evolutionary biology from the City University of New York. For his research, he designed and conducted field experiments in four countries, including India, for which he received a Fulbright Research Fellowship. These experiments...
View all posts by M. Aaron Owen >

Related Articles

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