Pipeline
Signal Overlay ETL
Coverage: Coverage window unavailable for this page.
Built 2026-06-15 11:52 UTC · Commit e5cf673
Page Navigation
Data Provenance
flowchart LR
11_signal_overlay(["Signal Overlay ETL"])
f1_11_signal_overlay[/"data/osm-signals/traffic_signals_raw.json"/] --> 11_signal_overlay
f2_11_signal_overlay[/"data/GTFS/shapes.txt"/] --> 11_signal_overlay
f3_11_signal_overlay[/"data/GTFS/trips.txt"/] --> 11_signal_overlay
a1_11_signal_overlay{"OpenStreetMap Overpass API"} --> 11_signal_overlay
11_signal_overlay --> tp_route_signals[("route_signals")]
classDef page fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a,stroke-width:2px;
classDef table fill:#ecfeff,stroke:#0e7490,color:#164e63;
classDef dep fill:#fff7ed,stroke:#c2410c,color:#7c2d12,stroke-dasharray: 4 2;
classDef file fill:#eef2ff,stroke:#6366f1,color:#3730a3;
classDef api fill:#f0fdf4,stroke:#16a34a,color:#14532d;
classDef pipeline fill:#f5f3ff,stroke:#7c3aed,color:#4c1d95;
class 11_signal_overlay page;
class tp_route_signals table;
class f1_11_signal_overlay,f2_11_signal_overlay,f3_11_signal_overlay file;
class a1_11_signal_overlay api;
Findings
Findings: Signal Overlay ETL
Summary
Route-level traffic signal exposure metrics are computed from OpenStreetMap
traffic-signal nodes and written to prt.db.
Notes
- Each route's signal count is the number of unique signals within 30 m of its
densified GTFS shape;
signal_densitydivides this by the route's longest shape length. - Matching diagnostics include
n_route_pointsandmatch_rate. - Cached Overpass responses are reused when available.
Methods
Methods: Signal Overlay ETL
Question
How many traffic signals does each transit route pass, and what is its signal density?
Approach
- Fetch or read cached OpenStreetMap
highway=traffic_signalsnodes for the Allegheny County bounding box via the Overpass API. - Load GTFS route geometry; compute each route's representative length as the length of its longest single GTFS shape (an ordered polyline).
- Build a KDTree of signal points and, for each densified route shape, count the unique signals within 30 m.
- Compute
signal_density = n_signals / length_km. - Rebuild
route_signalsinprt.db.
Data
- OpenStreetMap Overpass traffic-signal nodes
- GTFS
shapes.txtandtrips.txt - Cached Overpass JSON under
data/osm-signals/
Output
route_signalstable indata/prt.db
Source Code
|
Tables Produced
| Table | Description |
|---|---|
route_signals |
Route-level traffic signal count, representative route length, and signal density. |
Sources
| Name | Type | Why It Matters | Owner | Freshness | Caveat |
|---|---|---|---|---|---|
| data/osm-signals/traffic_signals_raw.json | file | Cached OpenStreetMap Overpass response of traffic-signal nodes for Allegheny County. | Local project data owner not specified. | Snapshot file; refresh by rerunning its pipeline step. | May lag upstream source updates. |
| data/GTFS/shapes.txt | file | GTFS route shape geometry points. | Local project data owner not specified. | Snapshot file; refresh by rerunning its pipeline step. | May lag upstream source updates. |
| data/GTFS/trips.txt | file | GTFS shape-to-route mapping. | Local project data owner not specified. | Snapshot file; refresh by rerunning its pipeline step. | May lag upstream source updates. |
| OpenStreetMap Overpass API | api | Public query endpoint for OSM nodes tagged highway=traffic_signals. | Hosted by overpass-api.de. | Queried during pipeline execution; freshness depends on upstream updates. | Availability and schema can change without notice. |