# How to plot a world map with cities in the right locations?

The data source is a CSV with cities in various countries in the world, each city has some numeric data associated with it. df.columns looks like:

['Continent', 'Country', 'City', 'data']


I want to make a map with all these cities, shown in the right location. I want a color bar with at least some of the cities ordered by the numeric data column. On the map, the cities should be marked with the same color as in the color bar.

Probably something like Plotly could draw the map. But:

• how to get the geolocations of each city based on the first 3 columns?
• how to plot dots or disks (with color attributes) in Plotly based on lat/long pairs?

The idea is similar to this, but with cities instead of countries:

• Use some external API/data dump to get the latitudes and longitudes – Aditya Feb 5 at 1:59
• @Aditya Well, yeah, that's obvious, I was hoping to get a useful example. – Florin Andrei Feb 5 at 2:26
• To grab the data, I am not sure but I think you can use Open Street Map? Sorry me no expert in geospatial but plotting them back is not gonna be difficult I think – Aditya Feb 5 at 18:25