Methodology
How the Rat Pressure Score is computed and what it measures.
Last updated: 2026-06-25
What data source does the City Rat Index use?
The City Rat Index uses one primary dataset: the NYC 311 Service Requests dataset (ID: erm2-nwe9), published on NYC Open Data. We filter to records where complaint_type = 'Rodent' and created_date >= '2025-01-01T00:00:00', covering 1 January 2025 through the pull date of 2026-06-25.
How is the Rat Pressure Score calculated?
The Rat Pressure Score is a percentile rank (0–100) within the set of measured ZIP codes, based on raw complaint count. The formula is:
Score = round((rank_from_bottom / total_ranked_zips) * 100)A score of 100 = the ZIP with the highest raw complaint count in the dataset. A score of 50 = median complaint density. This is a relative measure; it does not represent an absolute infestation level. Two ZIPs can have the same score if their complaint counts are equal.
What query was used to pull the ZIP-level data?
GET https://data.cityofnewyork.us/resource/erm2-nwe9.json
?$where=complaint_type='Rodent' AND created_date >= '2025-01-01T00:00:00'
&$select=incident_zip,borough,count(*) as complaint_count
&$group=incident_zip,borough
&$order=complaint_count DESC
&$limit=50The top 50 ZIP codes by complaint count were ranked and scored. Staten Island ZIPs do not appear in the top 50 by absolute count; their lower population density produces fewer citywide-comparable complaints per ZIP.
What are the known limitations?
- Complaint counts reflect reporting behavior, not infestation levels. A ZIP with engaged 311 users may appear higher than a ZIP with the same rat density but less active reporting.
- ZIP code boundaries do not match neighborhood boundaries. Neighborhood labels in this index are informal and for reference only.
- The index covers only the top 50 ZIPs. ZIPs not in the top 50 are not scored; absence from the leaderboard does not indicate zero rat pressure.
- June 2026 data is partial (data through 2026-06-25).
How do I reproduce this analysis?
All queries can be run against the public Socrata Open Data API with no authentication. The full dataset is also available as a CSV download from the dataset page on NYC Open Data.