Data preparation scripts for the Congestion Management Program (CMP)
2001-2023 data are stored in Q:\CMP\LOS Monitoring 20yy. Starting with the 2023 CMP cycle, I'm trying to start storing metrics calculation outputs (and certain inputs) in Q:\CMP\metrics
Q:\Data\Observed\Transit\Muni\APC\
.
(maybe also request GTFS from SFMTA) transit_apc_volume_and_speed.py
with config files as in transit/apc/configs
. However, it's unclear to Chun Ho (Sept 2023) how the postprocessing csv file is generated.As of Aug 2023: the MTC feed (which is the official feed for SFMTA) at https://511.org/open-data/transit (Bulk Data Feed -> GTFS Feed Download) has a service_id
for each day of service in calendar_dates.txt
, and there is no calendar.txt
. I.e., no regular service is defined, and all services are defined de novo for each day (i.e. MTC does not give GTFS data based on scheduled service). Also, as of Aug 2023, the historic data feed has to include all operators (opearator_id=RG
for regional). i.e.
http://api.511.org/transit/datafeeds?api_key=[your_key]&operator_id=RG&historic=[YYYY-MM]
or
http://api.511.org/transit/datafeeds?api_key=[your_key]&operator_id=SF
.
The latest SFMTA GTFS (scheduled) is also available on Data SF: https://data.sfgov.org/Transportation/SFMTA-General-Transit-Feed-Specification-GTFS-Prod/dni7-qpv3
For more historical SFMTA GTFS data (scheduled rather than each day as a special case as on 511.org), reach out to SFMTA (as of 2023: Simon.Hochberg@sfmta.com)
Place the data at Q:\Data\Networks\Transit\Muni\GTFS\
.
calendar.txt
to find the weekday service_id
(for the period of analysis).transit/apc/legacy/qaqc/SF_CMP2021_Transit_APC_QAQC.ipynb
has python code to do this extraction.
From PeMS data, use PeMS/.....py
speed/inrix/sample_size_analysis.py
is used to determine which CMP segments need to have data collected on floating car runs to supplement the INRIX data.parse_raw_data.py
.compare_years.ipynb
to compare floating car data across years.
For intersection and midblock counts, see the READMEs in Counts/intersection and Counts/midblock.
"AM"/"PM" peak (period), but e.g. "7 a.m.".