GenericMappingTools / GenericMappingTools/GMT.jl

Choropleth example from documentation does not work

Open
#1,621 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
221
Forks
36
Avg merge
1h 36m
Merged PRs (30d)
17

Description

I try to follow the example [here](https://www.generic-mapping-tools.org/GMTjl_doc/examples/choropleths/choro_examples/), but I get errors:

- `GMT.mk_codes_values` expects a `Vector{String}`, however `paises[!, 2]` is a `Vector{String3}`. Perhaps one solution would be to make `GMT.mk_codes_values` expect a `Vector{AbstractString}`? Converting it to a `Vector{String}` makes that call work.
- The call to `plot()` a bit below fails:
```
ERROR: MethodError: no method matching palette_init(::Ptr{Nothing}, ::Vector{GMTdataset{Float64, 2}})
The function `palette_init` exists, but no method is defined for this combination of argument types.

Closest candidates are:
palette_init(::Ptr{Nothing}, ::GMTcpt)
@ GMT ~/.julia/packages/GMT/3I1CI/src/gmt_main.jl:1245
```
- Further down, the call `countries = gmtread("/vsicurl/https://github.com/datasets/geo-countries/raw/master/data/countries.geojson")` fails, because the `master` branch on that repository was renamed to `main` (this is an easy fix, just substitute `master` with `main` in the URL and it works).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.