Plot countries administrative units from GADM data

We start by download and save in cache the geopackage file with Mozambique data. Note, a downloading message will be printed only once, and in this case it will say

Downloading geographic data for country MOZ provided by the project. It may take a while. The file gadm36_MOZ.gpkg (after uncompressing) will be stored in c:/j/.gmt\cache

using GMT
mozambique = gadm("MOZ");
imshow(mozambique, proj=:guess, title="Mozambique")

Next let us add all the provincies of Mozambique. For that we'll use the country code as parent and the option children=true to indicate that we want all provincies boundaries.

mozambique = gadm("MOZ", children=true);
imshow(mozambique, proj=:guess, title="Provinces of Mozambique")

To know the provinces names such that we can use them individually for example, we use the option names=true

gadm("MOZ", names=true)
"Cabo Delgado"
"Maputo City"

Now we can plot only one of those provinces and its children

CD = gadm("MOZ", "Cabo Delgado", children=true);
imshow(CD, proj=:guess, title="Cabo Delgado")

Download a Neptune Notebook here