v1.0.0latest·10,317 records·0 files·13.3 MiB
Nov 13, 20261
README

NYC Geographies

Boundaries and crosswalks for the areas New York City data is published on, so datasets that use different geographies can be joined: the 2015 street tree census (points, 2010 NTAs, ZIP codes, community boards, council districts, census tracts), the NYC Environment & Health Data Portal (UHF 42, UHF 34, NTAs, community districts, CDTAs, PUMAs, boroughs, citywide), and 311 service requests (ZIP codes, community boards, council districts, points).

Every geography id matches the NYC Environment & Health Data Portal (EHDP), so its indicators (collection nyc/environment-health) join on id directly.

Sources:

  • nychealth/EHDP-data, geography/ on the production branch (Apache-2.0): GeoLookup.json; the full-resolution NYC Department of City Planning shapefiles it keeps (release 24c) for boroughs, community districts, CDTAs, 2010 and 2020 NTAs, and 2010 and 2020 PUMAs; the DOHMH UHF 42, UHF 34, and MODZCTA shapefiles; NYC KIDS, harbor, and rat mitigation zone files; and the crosswalks zcta_to_uhf.csv, puma_to_subboro.csv, puma2010_to_subboro_cd.csv, and puma2020_to_cd.csv.
  • NYC Open Data (NYC Open Data Terms of Use): 2010 Census Tracts and City Council Districts.

Last imported: 2026-11-13

This collection was assembled by Knowledge Futures for the System Public Challenge. It is not maintained or endorsed by the City of New York.

Record types

  • Geography: one area. geoType, geoId, name, dcpCode (the code other datasets write), borough, label point (latitude, longitude), areaSqKm, references to the areas it nests in, and geometry, a GeoJSON Polygon or MultiPolygon in WGS84.
  • ZipToModzcta: the MODZCTA each ZIP code belongs to.
  • ZipToUhf42: EHDP's assignment of ZIP codes to UHF 42 neighborhoods.
  • PumaToCd: the PUMA that reports on each community district, for the 2010 and 2020 vintages.
  • AreaOverlap: how much two areas of different types overlap, for moving area-based numbers between geographies that don't nest.

Geography types and ids

A Geography's id is <geoType>:<geoId>. For the types EHDP publishes, both parts are EHDP's GeoType and GeoID verbatim, so an EHDP row with GeoType NTA2020 and GeoID 50101 joins to NTA2020:50101. EHDP numbers NTAs and CDTAs, so the City Planning code (BX0101) is in dcpCode, not the id.

geoType Count Example id dcpCode What it is Used by
Citywide 1 Citywide:1 New York City EHDP
National 1 National:1 United States (no boundary) EHDP (two indicators)
Borough 5 Borough:2 (Brooklyn) City Planning BoroCode (3) Boroughs EHDP, trees, 311
CD 71 CD:301 301 Community districts: 59 districts plus 12 joint interest areas (parks, airports) EHDP, trees (cb_num), 311 (community_board)
CDTA2020 71 CDTA2020:4701 BK01 2020 Community District Tabulation Areas, census-tract approximations of CDs EHDP
NTA2010 195 NTA2010:4788 BK88 2010 Neighborhood Tabulation Areas EHDP, trees (nta)
NTA2020 262 NTA2020:50101 BX0101 2020 Neighborhood Tabulation Areas (197 residential, 65 parks, cemeteries, airports, and the like) EHDP
PUMA2010 55 PUMA2010:3701 3701 2010 Public Use Microdata Areas EHDP
PUMA2020 55 PUMA2020:4103 4103 2020 Public Use Microdata Areas EHDP
Subboro 55 Subboro:6 EHDP subboroughs; same boundaries as the 2010 PUMAs EHDP
UHF42 42 UHF42:101 United Hospital Fund neighborhoods EHDP
UHF34 34 UHF34:105106107 UHF 42 with some areas combined; the id joins the UHF 42 codes EHDP
UHF33 33 UHF33:207208 Another combination of UHF 42 areas, in three older EHDP indicators; not in GeoLookup EHDP
MODZCTA 178 MODZCTA:10001 10001 DOHMH Modified ZIP Code Tabulation Areas EHDP data elsewhere, COVID data
ZIP 243 ZIP:10001 10001 ZIP codes (no boundary; use its MODZCTA's) trees (zipcode), 311 (incident_zip)
CouncilDistrict 51 CouncilDistrict:3 3 City Council districts, current (2023) lines trees, 311
CT2010 2,165 CT2010:1000100 1000100 2010 census tracts; id is City Planning's BoroCT (BoroCode + 6-digit tract) trees (boro_ct)
NYCKIDS2017, 2019, 2021, 2023 9, 8, 9, 9 NYCKIDS2021:11 NYC KIDS survey areas EHDP
NYHarbor 5 NYHarbor:2 Harbor water quality survey areas EHDP
RMZ 4 RMZ:1 Rat mitigation zones EHDP

Every area in EHDP's GeoLookup.json (801) has a record with a boundary, and so does every GeoType and GeoID in EHDP's indicator data (828), except National:1, which has no boundary. inGeoLookup is true for the areas GeoLookup lists; the other records (park NTAs, joint interest areas, MODZCTAs, ZIPs, council districts, tracts, UHF 33) have no EHDP lookup row.

Borough numbers: two orders

EHDP's Borough ids are alphabetical: 1 Bronx, 2 Brooklyn, 3 Manhattan, 4 Queens, 5 Staten Island. City Planning's BoroCode, which the tree census (borocode), community district numbers, and BoroCT tract ids use, is 1 Manhattan, 2 Bronx, 3 Brooklyn, 4 Queens, 5 Staten Island. So CD:101 is Manhattan's first district while Borough:1 is the Bronx. Every Geography carries both boroughId (EHDP's) and dcpBoroCode (City Planning's). UHF codes lead with EHDP's order (UHF 101 is in the Bronx).

Joining each dataset

EHDP indicators. Join GeoType + ":" + GeoID to the Geography id.

2015 street tree census.

  • nta (BK88): match dcpCode on Geography records where geoType is NTA2010. The id is NTA2010:4788.
  • cb_num (301): CD:301.
  • boro_ct (4073900): CT2010:4073900. Each tract also carries nta2010Id and puma2010Id.
  • zipcode: ZIP:<zipcode>, then its modzctaId or uhf42Id. The tree census writes Central Park as ZIP 83; it is mapped to MODZCTA:99999, the MODZCTA for unpopulated parkland.
  • borocode: City Planning order; match dcpBoroCode.
  • council_district/cncldist: these are the 2013 lines. The districts here are the 2023 lines, and only 91% of trees fall in the district their record names. For council districts, use the trees' points.
  • latitude/longitude: point in polygon against any type (see below).

311 service requests.

  • incident_zip: ZIP:<zip>. The ZIP records cover more than 99.9% of 311 requests that have a ZIP (checked on requests since 2026-07-01); 311's 10000 is not a ZIP code and has no record.
  • community_board (01 BROOKLYN, 64 MANHATTAN): match an entry in a CD's aliases. Unspecified ... and 0 Unspecified have no district.
  • council_district: CouncilDistrict:<n> (current lines).
  • latitude/longitude: point in polygon.

Joining a point to an area

Load the Geography records of one geoType, build polygons from geometry, and test each point: geopandas.sjoin in Python, @turf/boolean-point-in-polygon in JavaScript, or ST_Contains in PostGIS or DuckDB spatial. Areas of one type don't overlap, so each point lands in at most one. Points on the water or just off a shoreline land in none.

Checked against 120,000 trees from the 2015 census, points fall in the area their own record names for 97.3% of 2010 NTAs, 98.9% of community districts, 99.8% of 2010 tracts, and 99.9% of boroughs. The differences are mostly trees on boundary streets, where the census assigned the tree by address and the point sits on the other side of the line.

For 2020 NTAs, UHF neighborhoods, PUMAs, and MODZCTAs, the tree census has no field, so the points are the only way in. Treat the point result as the better answer for vintages the dataset doesn't carry.

Crosswalks

Nesting, on the Geography record. Exact one-to-one or many-to-one relations are fields: NTA2020 cdta2020Id; CDTA2020 cdId and CD cdta2020Id (a CDTA approximates its CD from census tracts); UHF42 uhf34Id and uhf33Id; CT2010 nta2010Id and puma2010Id; PUMA2010 subboroId and Subboro puma2010Id; ZIP modzctaId and uhf42Id.

ZipToModzcta comes from the MODZCTA file's zcta and label lists. 25 ZIPs that appear in the tree census or in 311 but in neither list, mostly single-building ZIPs in Midtown and Lower Manhattan, are assigned the MODZCTA most of their points fall in; their source says so.

ZipToUhf42 is EHDP's zcta_to_uhf.csv (214 ZIPs). It is EHDP's own rule for ZIP-level data, so use it rather than geometry when building UHF 42 numbers from ZIP data. ZIPs not in it can go through their MODZCTA.

PumaToCd is EHDP's crosswalk: one row per community district, naming the PUMA that reports on it. Four PUMAs cover two districts each, and the 2010 and 2020 vintages merge different pairs in Manhattan (2010: CDs 4 and 5; 2020: CDs 5 and 6). Use the vintage your data names.

AreaOverlap covers pairs that don't nest: NTA2010 to NTA2020; NTA2010, NTA2020, CD, MODZCTA, and CouncilDistrict to UHF42; NTA2010 and NTA2020 to CD; MODZCTA to NTA2010, NTA2020, and CD; CouncilDistrict to CD, NTA2010, NTA2020, and MODZCTA; NTA2010 to PUMA2010, NTA2020 to PUMA2020; and CD to both PUMA vintages. Each record gives the overlap area and two shares: shareOfFrom (how much of the from area lies in the to area) and shareOfTo (the reverse). To move a count from NTA2010 to NTA2020, multiply by shareOfFrom and sum by toId; to average a rate, weight by shareOfTo.

How they are measured: both layers are filled into a 25 m grid over the city and the shared cells counted. Pairs under 1% of both areas are dropped as boundary slivers (the City Planning, DOHMH, and MODZCTA lines differ by meters along shores and streets), and the shares are renormalized so each area's shares sum to 1. They are land-area shares, not population shares: a park-heavy piece of an NTA counts as much as a dense one.

Caveats

  • ZIP, ZCTA, MODZCTA. ZIP codes are postal routes, not areas; some are a single building or a post office box. The Census Bureau's ZCTAs approximate them as areas, and DOHMH's MODZCTAs merge ZCTAs with too few residents into a neighbor (MODZCTA:10001 covers ZCTAs 10001, 10119, and 10199). The ZIP records have no geometry; their MODZCTA's boundary is the one to draw. A tree's ZIP and the MODZCTA its point falls in agree for 96.8% of trees.
  • NTA vintages. City Planning redrew NTAs for 2020 (195 in 2010, 262 in 2020) and changed the code format (BK88 to BK1202). They are different areas, not renamed ones: use AreaOverlap or points to move between them.
  • Community districts and CDTAs. CDs follow streets; CDTAs are built from 2020 census tracts and differ slightly. EHDP publishes both.
  • PUMA vintages. Like the NTAs, the 2010 and 2020 PUMAs differ, and EHDP's CD-level census indicators use the 2010 grouping.
  • Council districts are the lines drawn in 2023. Data recorded before 2023, including the 2015 tree census, uses the 2013 lines.
  • Display-resolution areas. NYC KIDS and harbor areas come from EHDP's map files, which are already simplified (about 5 m precision). They are survey reporting areas, not for point joins.
  • Rikers Island is NTA QN0151 in City Planning's codes but in Bronx County; EHDP's numbering follows the county, so its id is NTA2020:50151.
  • MODZCTA 99999 holds parkland without residents. Its name says so.
  • Label points are EHDP's when it has one, otherwise a point inside the area, so they always fall inside the boundary.

Boundaries and simplification

City Planning's shapefiles are in State Plane (New York Long Island, US feet) and are projected to WGS84 here; NAD83 and WGS84 differ by about a meter, which is ignored. Coordinates are rounded to 5 decimals (about 1 m).

Boundaries are simplified with Douglas-Peucker at 1 m, except that vertices shared by two areas of the same type are always kept, so neighbors keep identical borders with no gaps or overlaps. Only shorelines and the city line are thinned. Depending on the type, this keeps 30% to 85% of the source vertices.

To keep each record under 30 KB, 63 shapes with long shorelines were simplified harder (2 m to 32 m tolerance), still keeping shared borders: all five boroughs and a few coastal community districts, CDTAs, PUMAs, council districts, NTAs, MODZCTAs, tracts, and UHF areas. Three shapes also had their shared borders thinned: Citywide:1 (128 m), NTA2010:8199 (park-cemetery-etc-Queens, 16 m), and CouncilDistrict:50 (2 m). Each record's simplifyToleranceM and sharedBordersExact say which treatment it got. areaSqKm comes from the full-resolution boundary.

UHF 33 and the citywide boundary are unions of the UHF 42 and borough boundaries.

Rebuilding

pnpm scrape nyc/geographies downloads the sources to input/cache/ (about 24 MB) and writes data/records.json. Delete the cache to fetch fresh copies.