SB827 analysis
This is the code used to create the map in my blog post on California SB 827. The main code is in nb/GTFS Map Matching.ipynb
. The code requires Python 3.6, gtfstk, Shapely, pyproj, Pandas, Numpy, requests, the Google-format polyline decoding library, and of course Jupyter Notebook. It connects to a Valhalla server to snap transit routes to the street network.
I used GTFS data from LA Metro and Metrolink. I used OSM data from Mapzen Metro Extracts, although that service will sadly be shut down at the end of January 2018. All of the data I used is reproduced here, although I recommend using up-to-date data if possible.
The algorithm and thinking behind it is described in detail here.