
nyc-geo-toolkit
stableShared geography foundation — boundaries, normalization, and spatial helpers
v0.2.0Released 2026-04-08·Pythonpip install nyc-geo-toolkitWhat It Is
nyc-geo-toolkit is the shared geography foundation for NYC civic-data Python packages. It ships canonical boundary layers, a typed API for discovery, normalization, loading, and spatial helpers so downstream tools never duplicate boundary assets or geography logic.
What Ships in 0.2
- Boundary layers for boroughs, community districts, council districts, NTAs, ZCTAs, and census tracts
- Discovery & loading:
list_boundary_layers(),list_boundary_values(),load_nyc_boundaries(), plus tract/council/NTA shortcuts with optional GeoDataFrame output - Normalization: canonical name and geography-value normalization across all layers
- Geodesy helpers:
haversine_distance_meters(),walk_radius_meters(), andbuild_circle_polygon()for catchment and proximity analysis - Spatial helpers: Web Mercator reprojection, OSM basemap tile overlays, bbox clipping for typed collections
- Typed models:
BoundaryCollection,BoundaryFeature,BoundaryLayerSpec, and constants likeSUPPORTED_BOROUGHS - Exports: GeoJSON, optional pandas DataFrame helpers, and conversion utilities
Install extras: pip install "nyc-geo-toolkit[dataframes]", [spatial], or [all] for the full optional stack.
Three self-contained examples ship under examples/: about-the-data (full boundary-layer visualization), boundary-quickstart, and normalization-demo.
Ecosystem Fit
nyc-geo-toolkit is the shared geography core for this NYC package line. It powers nyc311.geographies, study-area selection in subway-access, and any other consumer that needs consistent NYC boundary loading and normalization.