An Analysis of NYC311 Noise Complaints

October 16, 2017
By

(This article was first published on R – NYC Data Science Academy Blog, and kindly contributed to R-bloggers)

Introduction


Launched in 2003, NYC311 is an information hub created by the New York City government that provides 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.

 

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.

 

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.

 

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.

 

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.

 

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.

 

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.

 

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

 

 

The post An Analysis of NYC311 Noise Complaints appeared first on NYC Data Science Academy Blog.

To leave a comment for the author, please follow the link and comment on their blog: R – NYC Data Science Academy Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)