Visualizing realtime data from RIPTA's API using Dash.
PRs Welcome!
An animation sped up for effect:
- pandas
- numpy
- matplotlib
- plotly
- dash
- dash_core_components
- dash_html_components
- If you don't already have one, setup an account with Plotly and with Mapbox.
- Copy
config-template.json
toconfig.json
:cp config-template.json config.json
- In
config.json
add in your Plotly username and API Key and your Mapbox access token.
- run
python app.py
- press
control + c
to terminate
A dictionary with two keys: "header" and "entity". "header" is another dictionary that contains metadata. "entity" is a list of dictionaries. Each "entity" contains a "vehicle" dictionary with data about a specific bus and location, speed, route etc.
A dictionary with two keys: "header" and "entity". "header" is another dictionary that contains metadata. "entity" is a list of dictionaries. Each "entity" is dictionary whose value is a list of other dictionaries, each of which contains data about a specific bus route including it stops and their delay times and the particular bus (vehicle_id) that is on the route.
Learn more about Dash.
View their documentation.