Skip to content
Advertisement

Map of a country with plotly

The aim of create a map of a country with plotly. I show you the code to make the map with dots from cities and I want to change it to regions:

JavaScript

In the scope we have by default: “world” | “usa” | “europe” | “asia” | “africa” | “north america” | “south america”. How to implement those who are not in the scope? For example Spain.

Advertisement

Answer

  • using mapbox instead of geos
  • you can add layers to mapbox scatter
  • have sourced cities and boundary geometries to demonstrate
JavaScript

enter image description here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement