This seems peculiarly difficult. If you do the following, it looks like a step in the right direction, in that it tries to read the geojson file locally, but then hits a Cross-Origin Request Blocked
error (visible in browser tools) that I donโt know how to bypass:
- Download https://cdn.plot.ly/world_110m.json to subfolder assets
- Add this option to write_html:
fig.write_html("worldmap.html", config={"topojsonURL":"assets/"})
Iโm drawing on this post, which gives an alternative of editing plotly.min.js and also gives an alternative solution if using Dash