Skip to content

Choropleth example from documentation does not work #1621

@fa-bien

Description

@fa-bien

I try to follow the example here, 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions