R/load-maps.R
downloadGeojson.Rd
Download a geojson url, standardise it and cache the result
downloadGeojson(
geojsonUrl,
codeCol = "code",
nameCol = "name",
altCodeCol = NULL,
codeType = NA_character_,
simplify = FALSE,
id,
license = "unknown",
...
)
the URL of the geojson resource
- the name of the column containing the id or code
- the name of the column containing the label (optional - defaults to the same as codeCol)
- an optional column name containing another code type
- the "type" of the code - optional. defaults to NA
- do you want to simplify the map
- an id for the map that can be used to retrieve it in the future (through getMap()).
- an optional license string
- passed to .cache, param nocache=TRUE to disable caching
the sf object for this geoJson