How to change the country name and then draw the global map?

The file that you linked is not the same you showed in your screen-captures. The linked files uses country code of 2 chars, not 3. It also has a lot more lines (607) than countries because many countries appear repeated. However, I can get a similar map to yours. Note that zvals has NaNs but has the required data too.

zvals = polygonlevels(countries, string.(pop[!,9]), pop[!,8], att="ISO_A2");

C = makecpt(range=(4000,150000,1000));

plot(countries, region=(-180,180,-60,85), level=zvals, cmap=C, proj=:guess, colorbar=true, show=true)

EDIT: and probably more correct too, as yours shows Russia to have highest mean salary. Or they are both wrong because of the repeated countries problem.

1 Like