I have the below code to plot my Ebike ride as a plot on map. It works with normal plotly, but not with dash. It doesnot give any error. But Html page returns ‘error loading layout’
import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import plotly.graph_objs as go
df = pd.read_csv(‘csv_test\combine.csv’)
df.head()
app = dash.Dash()
data = [go.Scattermapbox(lat=df[‘latitude’], lon=df[‘longitude’], mode=‘markers’, marker=dict(size=8),
text=df[‘rasp_time’])]
layout = go.Layout(autosize=True, hovermode=‘closest’, mapbox=dict(bearing=0,
center=dict(lat=48.5069, lon=9.2038),
pitch=0, zoom=30))
fig = dict(data=data, layout=layout)
app.layout = html.Div([
dcc.Graph(id=‘graph’, figure=fig)
])
if name == ‘main’:
app.run_server(debug=True)