Spatial analysis toolkit for evaluating NYC subway accessibility, reliability, and equity gaps.
Project description
subway-access
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:
- select a study area through
nyc-geo-toolkit - fetch official MTA and Census sources into a local cache
- load those cached files back into typed in-memory datasets
- create Euclidean walk catchments using a fixed walking speed
- test tract centroids against accessible-station catchments
- compute tract need, rolling reliability, and station metrics
- 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
- Hosted docs: subway-access.readthedocs.io
- Local preview:
make docs - Strict docs build:
make docs-build
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba619d209435f5bab2633253ff2aa4f87077a8c81f5773444756715d803c948e
|
|
| MD5 |
3bd956fec979677ac81f9f7605cde70d
|
|
| BLAKE2b-256 |
4857f302417b43967b3083491e4962bdfd8ae381f93586825ff67975c09854fd
|
Provenance
The following attestation bundles were made for subway_access-0.3.0.tar.gz:
Publisher:
cd.yml on random-walks/subway-access
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
subway_access-0.3.0.tar.gz -
Subject digest:
ba619d209435f5bab2633253ff2aa4f87077a8c81f5773444756715d803c948e - Sigstore transparency entry: 1239405942
- Sigstore integration time:
-
Permalink:
random-walks/subway-access@8621f95859ef642bf12c1bed68038909ef62d091 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/random-walks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@8621f95859ef642bf12c1bed68038909ef62d091 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa50a0bfe607478044d7dc6170959be75a6c40628a748457ed4a61adf7b963ca
|
|
| MD5 |
1d197db2072253a83f28143e326666fc
|
|
| BLAKE2b-256 |
d57e3d512c8349c523796891b5b27219d8389f07ee4f2737af7b622cd293586a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
subway_access-0.3.0-py3-none-any.whl -
Subject digest:
fa50a0bfe607478044d7dc6170959be75a6c40628a748457ed4a61adf7b963ca - Sigstore transparency entry: 1239405945
- Sigstore integration time:
-
Permalink:
random-walks/subway-access@8621f95859ef642bf12c1bed68038909ef62d091 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/random-walks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@8621f95859ef642bf12c1bed68038909ef62d091 -
Trigger Event:
release
-
Statement type: