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

**URL:** <https://discourse.julialang.org/t/how-to-change-the-country-name-and-then-draw-the-global-map/88076>\
**Category:** Data\
**Tags:** question, vegalite, inmemorydatasets\
**Created:** [October 1, 2022, 9:19am UTC](https://discourse.julialang.org/t/how-to-change-the-country-name-and-then-draw-the-global-map/88076 "2022-10-01T09:19:08Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [October 7, 2022, 10:50am UTC](https://discourse.julialang.org/t/how-to-change-the-country-name-and-then-draw-the-global-map/88076/21 "2022-10-07T10:50:32Z")

</div>

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.

```julia
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)

```

 ![GMTjl_tmp](https://global.discourse-cdn.com/julialang/original/3X/d/f/dfc8a770e6b74e11085c1d8d79e781e3a2c077df.png)

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.

[Previous page](https://discourse.julialang.org/t/how-to-change-the-country-name-and-then-draw-the-global-map/88076.md?page=1)
