Skip to main content

Spatial analysis toolkit for evaluating NYC subway accessibility, reliability, and equity gaps.

Project description

subway-access

Actions Status Documentation Status PyPI version PyPI platforms

subway-access is a Python toolkit for reproducible NYC subway accessibility analysis.

Authored by Blaise Albis-Burdige.

It is designed to measure neighborhood access to accessible stations with a small, transparent workflow that is easy to inspect, cache, analyze in memory, and extend.

What ships in the current line

The current package now includes a real public-data workflow:

  • fetch MTA subway stations and ADA status from the public station catalog
  • fetch public elevator and escalator availability history plus asset inventory
  • fetch ACS tract-level demographics for a selected NYC study area
  • cache a reusable local snapshot bundle
  • analyze Euclidean first-pass accessibility gaps and rolling reliability
  • export catchment GeoJSON, tract gap CSV, and station metrics
  • run the snapshot and analysis flow from the installed CLI

The current scoring model is still intentionally a documented first pass: Euclidean catchments first, richer network comparisons next.

Why this exists

Official MTA and NYC data can tell you whether a station is nominally accessible, but the policy question is broader: which neighborhoods have weak access to accessible transit in practice?

This repo aims to grow into a reusable analysis toolkit rather than a notebook dump or trip planner.

Quickstart

Install:

pip install subway-access

Fetch a real official-data borough snapshot:

subway-access fetch-snapshot --geography borough --value Manhattan --cache-dir cache/manhattan

Then analyze the cached snapshot:

subway-access analyze-snapshot --cache-dir cache/manhattan --output-dir artifacts/manhattan

Examples

examples/ now follows the same self-contained project pattern used by nyc311. Each example folder has its own pyproject.toml, README.md, .gitignore, main.py, and tracked reports/ output.

Start with:

  • examples/fetch-borough-snapshot/
  • examples/borough-gap-analysis/
  • examples/outage-reliability-report/
  • examples/network-access-comparison/
  • examples/example-template/

Python example

from pathlib import Path

from subway_access import analysis, models, pipeline

snapshot = pipeline.fetch_study_area_snapshot(
    models.AccessibilityQuery(geography="borough", value="Manhattan"),
    cache_dir=Path("cache/manhattan"),
)
catchments = analysis.generate_catchments(
    snapshot.stations,
    models.CatchmentRequest(minutes=10),
)
scores = analysis.score_accessibility(
    snapshot.stations,
    catchments,
    snapshot.demographics,
)
reliability = analysis.compute_reliability(
    snapshot.stations,
    snapshot.outages,
    models.TimeWindow(days=30),
)
gaps = analysis.analyze_gaps(scores)
print(len(gaps.records), len(reliability.records))

Current methodology

The current workflow is intentionally explicit and reproducible:

  1. select a study area through nyc-geo-toolkit
  2. fetch official MTA and Census sources into a local cache
  3. load those cached files back into typed in-memory datasets
  4. create Euclidean walk catchments using a fixed walking speed
  5. test tract centroids against accessible-station catchments
  6. compute tract need, rolling reliability, and station metrics
  7. export publishable GeoJSON and CSV outputs

This is intentionally a first-pass Euclidean approximation, not a full network-isochrone model.

Documentation

Quick links

Docs: Home, Getting Started, CLI Reference, Architecture, Python API, Contributing, Releasing, Changelog

Development

make install-dev
make test
make lint
make docs-build
make ci

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

subway_access-0.2.0.tar.gz (53.3 kB view details)

Uploaded Source

Built Distribution

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

subway_access-0.2.0-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file subway_access-0.2.0.tar.gz.

File metadata

  • Download URL: subway_access-0.2.0.tar.gz
  • Upload date:
  • Size: 53.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for subway_access-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4ff76d1bf321d69c997a17189001c86b2b52acd988db83a7d58da9f9fc6be951
MD5 7d3dcc70651eec9edab40e9d35f8da05
BLAKE2b-256 7664307d9a5752191f4b0fa3084784a2cef38c71d696310ccd9824593e3cf9ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for subway_access-0.2.0.tar.gz:

Publisher: cd.yml on random-walks/subway-access

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

File details

Details for the file subway_access-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: subway_access-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for subway_access-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64bb526ed1f8ac85e63f67c009d50b2a9f27862f7f854f2368f8fe0106c7f622
MD5 03b56915adc635d62f3ea66ea6a282d7
BLAKE2b-256 6d925ce43a6a2a55f94d3406a830172fc00908bc097c27327a0b77b587aee8f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for subway_access-0.2.0-py3-none-any.whl:

Publisher: cd.yml on random-walks/subway-access

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