loadCoordDE | R Documentation |
Loads and returns names, id, and coordinates for Germany statistical unit, to use with mapping
functions and other "map" functions that accept an sf
object.
loadCoordDE(unit = c("state", "district", "municipal", "municipality"),
unit_subset = NULL, matchWith = NULL, dir = NULL,
use_cache = TRUE, use_internet = TRUE, crs = NULL)
unit |
the type of Italian statistical unit to link |
unit_subset |
character vector of unit names to extract |
matchWith |
the type of id |
dir |
local directory in which shape files are stored |
use_cache |
a logical value indicating whether to use the cache |
use_internet |
a logical value indicating wheter the coordinates are downloaded from https://github.com/dataallaround/geospatial. If |
crs |
coordinate reference system. Look at |
Coordinates are download from the Github repo https://github.com/dataallaround/geospatial from DE folder https://github.com/dataallaround/geospatial/tree/master/DE.
If unit
is not specified, state borders are loaded.
A data.frame object with column indicating names, id, and the geometry to map.
Alessio Serafini
https://github.com/dataallaround/geospatial
loadCoordEU
, loadCoordWR
, loadCoordUS
, loadCoordUK
DE_coords = loadCoordDE(unit = "state")
str(DE_coords)
## Load subset
coords_de <- loadCoordDE(unit = "district",
unit_subset = "bayern",
matchWith = "state")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.