311 & service requests
New York's 311 service requests in Python: complaint types, response times, noise, heat and hot water, maps per resident, and the duplicates and impossible dates in the records.
New York's 311 line receives every non-emergency request residents make to the city — a blocked driveway, a party next door, no heat in January — and the city publishes each one as open data: 3,655,042 requests in 2025, each with its complaint type, agency, location, channel and the dates it was opened and closed. It is the richest record of what residents ask of a city, and a record of requests, not of problems, which shapes everything it can show.
The guides here load and count the requests, explain the fields, measure response times, map complaints per resident by neighbourhood and in H3 hexagons, follow noise through the day and heat complaints through the weather. Three pages deal with the traps: requests closed before they were created, requests with no location, and duplicate requests that inflate the counts.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Analyse NYC 311 Service Requests in Python
- How to Measure 311 Response Times by Agency and Complaint Type
- How to Map 311 Complaints per Resident by Neighbourhood
- How to Analyse Noise Complaints by Hour, Weekday and Season
- How to Relate Heat and Hot Water Complaints to Outdoor Temperature
- How to Find 311 Complaint Hotspots with H3 Hexagons
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
Related topics
Subjects that keep coming up alongside this one, most overlap first.