Getting pings from LA Metro's API and using Spark's Structured Streaming to create a history of vehicle paths.
Using Spark 3.0.0 and Li Haoyi's shiny new build tool, mill!
mill metro.pings
- gets pings fromapi.metro.net
for the agencieslametro
andlametro-rail
and writes them as JSON lines todata/pings/
, partitioned byagency_id
andlocaldate
.mill metro.pings.test
- runs pings tests
mill metro.paths
- starts Structured Streaming process, viewable in the UI athttp://localhost:4040/StreamingQuery/
, and writes paths as JSON lines todata/paths/
, partitioned byagency_id
andlocal_date
.mill metro.paths.geojson
- creates.geojson
files indata/geojson/
(TODO: for paths specified by command line options)mill metro.paths.test
- runs paths tests
The output GeoJSON can be saved as a file and fed directly into kepler.gl for animated path visualization.