title: Using Real Time Data (Origin Destination Delay) with Dash Plotly
body: <p>I'm trying to stream traffic data onto a map through an open-data API and dash (although happy to use another tool).</p>
  
  <p><a href="https://vicroadsopendata-vicroadsmaps.opendata.arcgis.com/datasets/bluetooth-travel-time-updates-every-2-minutes/data" rel="nofollow noreferrer">https://vicroadsopendata-vicroadsmaps.opendata.arcgis.com/datasets/bluetooth-travel-time-updates-every-2-minutes/data</a></p>
  
  <p>The above data sets. I have already built a mapping tool with just individual markers and changing heatmap intensity.</p>
  
  <p>I have been playing around with dash to try and achieve this - > the real time map is a bit more difficult it would appear.</p>
  
  <p>Grabbing the data as below,</p>
  
  <pre><code>bt_tt = "https://opendata.arcgis.com/datasets/b0c4b78ca7b7446dbcee455c42987b95_1.geojson"
  responsett = requests.get(bt_tt)
  dict_bt_tt=responsett.json()
  df_bt_tt = pd.DataFrame.from_dict(dict_bt_tt["features"])
  df_bt_tt = pd.DataFrame([x for x in df_bt_tt['properties']])
  </code></pre>
  
  <p>I want to then take the origin, destination, and the site lat and lon, </p>
  
  <pre><code>bt_sites_url = "https://opendata.arcgis.com/datasets/48fd4d7e1127453ea5f9bdc757ab00e7_0.geojson"
  params = "properties"
  response = requests.get(bt_sites_url, params)
  dict_bt=response.json()
  
  
  df_bt = pd.DataFrame.from_dict(dict_bt["features"])
  df1 = pd.DataFrame([x for x in df_bt['properties']])
  bt_df = df1[['SITE_NAME','SITE_NO','LATITUDE','LONGITUDE']].set_index("SITE_NO")
  bt_df
  </code></pre>
  
  <p>and then after having essentially wrangled out the majority of the data required - how the fuck do i create a line graph that updates with this real time api every 30 seconds?</p>
  
  <p>Thinking - using intervals with this tutorial in mind, <a href="https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-wind-streaming/app.py" rel="nofollow noreferrer">https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-wind-streaming/app.py</a> .</p>
  
  <p>Thanks in advance,</p>