I'm trying to recreate Plotly's county choropleth example in offline mode. The example works fine when passing my credentials to the plot online:
import plotly
import plotly.figure_factory as ff
fips = ['06021', '06023', '06027',
'06029', '06033', '06059',
'06047', '06049', '06051',
'06055', '06061']
values = range(len(fips))
plotly.tools.set_credentials_file(username='MaxGhenis',
api_key=KEY)
fig = ff.create_choropleth(fips=fips, values=values)
plotly.plotly.iplot(fig, filename='online choropleth')
But when it's offline it doesn't show up:
plotly.offline.init_notebook_mode(connected=True)
fig = ff.create_choropleth(fips=fips, values=values)
plotly.offline.iplot(fig, filename='offline choropleth')
I'm using Google's Colaboratory cloud Jupyter service (here's the notebook). Any ideas how to fix this?
Update: Filed https://github.com/plotly/plotly.py/issues/1045.