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

NYC subway accessibility snapshot: street entrances, MTA stations, and ACS tract disability (example: Atlantic Brooklyn)

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
  • compare the Euclidean baseline against cached local OSM walking graphs
  • export catchment GeoJSON, tract gap CSV, and station metrics
  • run the snapshot and analysis flow from the installed CLI

The hero image above is committed as docs/images/subway-access-hero.png (regenerated from examples/about-the-data as map-library-header-horizontal.png when refreshing that example).

The current scoring model is intentionally staged:

  • official public data is already real
  • Euclidean catchments remain the baseline comparator
  • cached OSM walking graphs now power the advanced network comparison layer

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

For the full plotting + network stack:

pip install "subway-access[all]"

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/multi-borough-access-profile/
  • 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 staged model rather than a one-shot perfect routing claim. Euclidean access remains the baseline, while the advanced examples now show how cached OSM walking graphs change the story.

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.3.0.tar.gz (3.2 MB 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.3.0-py3-none-any.whl (44.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for subway_access-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ba619d209435f5bab2633253ff2aa4f87077a8c81f5773444756715d803c948e
MD5 3bd956fec979677ac81f9f7605cde70d
BLAKE2b-256 4857f302417b43967b3083491e4962bdfd8ae381f93586825ff67975c09854fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for subway_access-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: subway_access-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 44.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa50a0bfe607478044d7dc6170959be75a6c40628a748457ed4a61adf7b963ca
MD5 1d197db2072253a83f28143e326666fc
BLAKE2b-256 d57e3d512c8349c523796891b5b27219d8389f07ee4f2737af7b622cd293586a

See more details on using hashes here.

Provenance

The following attestation bundles were made for subway_access-0.3.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