Skip to main content

Reusable NYC geography resources, normalization helpers, and boundary loaders for Python tools.

Project description

nyc-geo-toolkit

Actions Status Documentation Status PyPI version PyPI platforms

Reusable NYC geography resources, normalization helpers, and boundary loaders for Python tools.

What this package provides

nyc-geo-toolkit packages canonical NYC boundary layers and the small helper API needed to discover, normalize, load, subset, and convert them.

The initial release focuses on:

  • packaged boundary layers for boroughs, community districts, council districts, NTAs, ZCTAs, and census tracts
  • canonical normalization helpers for layer names and boundary values
  • typed boundary models for boundary collections and features
  • GeoJSON and optional DataFrame / GeoDataFrame helpers
  • bbox clipping for typed boundary collections

Install

Base install:

pip install nyc-geo-toolkit

With pandas helpers:

pip install "nyc-geo-toolkit[dataframes]"

With geopandas + shapely helpers:

pip install "nyc-geo-toolkit[spatial]"

With all optional helpers:

pip install "nyc-geo-toolkit[all]"

Quick example

from nyc_geo_toolkit import load_nyc_boundaries, list_boundary_layers

print(list_boundary_layers())
queens = load_nyc_boundaries("borough", values="Queens")
print(queens.features[0].geography_value)

Public surface

The stable public API centers on:

  • list_boundary_layers()
  • list_boundary_values()
  • load_boundaries()
  • load_nyc_boundaries()
  • load_nyc_boundaries_geodataframe()
  • load_nyc_census_tracts()
  • load_nyc_council_districts()
  • load_nyc_neighborhood_tabulation_areas()
  • normalize_boundary_layer()
  • normalize_boundary_value()
  • normalize_boundary_values()
  • boundaries_to_geojson()
  • boundaries_to_dataframe()
  • clip_boundaries_to_bbox()

Documentation

Docs: Home, Getting Started, API Reference, Architecture, Contributing

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nyc_geo_toolkit-0.1.0.tar.gz (8.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nyc_geo_toolkit-0.1.0-py3-none-any.whl (8.5 MB view details)

Uploaded Python 3

File details

Details for the file nyc_geo_toolkit-0.1.0.tar.gz.

File metadata

  • Download URL: nyc_geo_toolkit-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nyc_geo_toolkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1588be5a7e32a4bc90dd217f0963b6b11e064cecb15563f8a32ca89be22c425a
MD5 66d98e973ce266dffadf46eeab01e642
BLAKE2b-256 3d7d2c948ca4e114cfbc875d47405d4680e77c389ebd754f929aa3a785416ad5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nyc_geo_toolkit-0.1.0.tar.gz:

Publisher: cd.yml on random-walks/nyc-geo-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nyc_geo_toolkit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nyc_geo_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0782440dcf42914bb497d093cabf4321b5147bea7f7d107855565b514087f071
MD5 adfd329438838d6eee01ef68fed98eae
BLAKE2b-256 82a2d03a025f81840c3e5307c5b448e0abf6b8955f349d28b44c2ac7ae1ae711

See more details on using hashes here.

Provenance

The following attestation bundles were made for nyc_geo_toolkit-0.1.0-py3-none-any.whl:

Publisher: cd.yml on random-walks/nyc-geo-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page