sfcta / CMP_Scripts

Data preparation scripts for Congestion Management Program (CMP)
Apache License 2.0
2 stars 4 forks source link

CMP_Scripts

Data preparation scripts for the Congestion Management Program (CMP)

Definitions

Map / GIS

Data directories

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

Raw data stored elsewhere

Parsing

GTFS

Download

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\.

Analysis

Screenline volumes (Bay Bridge and San Mateo County Line)

From PeMS data, use PeMS/.....py

Speed: LOS and reliability

Floating car

  1. Not 100% sure, but I think: Before the monitoring period, 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.
  2. Run parse_raw_data.py.
  3. Use compare_years.ipynb to compare floating car data across years.

    INRIX (& merging floating car data in)

Counts

For intersection and midblock counts, see the READMEs in Counts/intersection and Counts/midblock.

House style

"AM"/"PM" peak (period), but e.g. "7 a.m.".