Plot Map in Julia

Hi all,

I want to know is it possible to plot map with color for different country by using Julia. like this:

Each color could represent certain cluster/grouping.

I see mapbox is expensive, we need to have credit cards just for registration. Some like me do not have such luxury.

A quick search (on my phone) in this discourse led me to

but there are also resources such as Makie, GMT, OpenStreeMapX, to name a few.

Perhaps you could try a few and post your code if you get stuck?

You could find a free SVG map and then manipulate the colors using GitHub - JuliaIO/LightXML.jl: A light-weight Julia package for XML based on libxml2.

If you want to plot a mapbox choropleth, you don’t have to pay for mapbox, when callling PotlyJS.choroplethmapox.
See an example here https://discourse.julialang.org/t/valid-geojson-object-for-choroplethmapbox-trace/72592

1 Like

Linking a related thread.

The problem is not to make the choropleth map (here’s another elaborated example in GMT.jl
The problem is on how to plot the country names without doing it one by one.

1 Like

Simply load a CSV with country centre coordinates as shown here.

Not that simple. Those simple cases could be automatically set by computing the country polygon’s centroids. The real problem comes from cases like (using the example fig)
Democratic Republic of Congo
Tunisia
Burundi
Djibouti
Lesotho

Well, if you have less than 10 country names then adjusting the position of the labels manually should be easy…

Good luck with :slight_smile: