Plot average salaries on a world map python

196 Views Asked by At

I have a list of countries, and the salaries for people in those countries

Using the data I have been able to calculate the average salary for each country. I want to visualize it on a world map with legend, where green would represent a certain range of salary, red another range and so on

How do I visualize my data on a world map like this? I cannot find any libraries

1

There are 1 best solutions below

0
raphael On

while I agree that this question is rather vague, here are the 2 steps you need to do to get it working:

  1. go to NaturalEarth and get yourself a shapefile with all the countries in the world (e.g. the Admin 0 – Countries dataset)
    https://www.naturalearthdata.com/downloads/50m-cultural-vectors/

  2. read the shapefile with geopandas, identify your countries, add the values as a column to the geo-dataframe and plot the data by following the instructions in their docs https://geopandas.org/en/stable/docs/user_guide/mapping.html