This repository contains Department of Sanitation (DSNY) datasets from NYC Open Data, which I analyzed in relation to the Melrose, Mott Haven, and Port Morris neighborhoods in the South Bronx (Bronx Community District 1).
Resulting data was used in my report for the Mott Haven Herald. The story is also republished in my portfolio, with additional photos and previously unutilized interactive graph.
DSNY 311 service requests from 2010 to present (data last updated 20 September 2024; accessed 22 September 2024)— The data looked outdated because only three of the over 3,000 rows were updated after 2020. The rest were dated 2012.- 311 service requests from 2010 to present, filtered to show only "Department of Sanitation" in
Agency Name
and "01 Bronx" forCommunity Board
. (data last updated 30 September 2024; accessed 1 October 2024) - DSNY monthly collection tonnages (data last updated 8 September 2024; accessed 22 September 2024)
- DSNY frequency boundaries for collection operation (data last updated 10 April 2024; accessed 22 September 2024)
- DSNY litter basket map (data last updated 10 April 2024; accessed 22 September 2024)
I used pandas
to filter by year, the sum values by complaint type. The initial version of my analysis only worked with the pandemic years (from 2020 to 2024), then I thought I might see bigger trends if I use all the years recorded in the main dataset.
I used def
to define functions to dynamically create new dataframes by year. To visualize the data, I attempted to use seaborn
for a ridgeline plot, then decided against it. The data had many NaN
which affected the accuracy of the viz I had in mind.
The spreadsheet parsed-data/311-complaints-by-year-CLEAN.csv
is a product of manually sanitizing the data to merge duplicated complaint types, sum values if needed. Much of this work is based on editorial preference, and I thought it would be faster to do this manually than programmatically.