loadCoordWR | R Documentation |
Loads and returns names, ids, iso, and coordinates for world countries, ready to use with mapping
functions and other "map" functions that accept an sf
object.
loadCoordWR(unit = c("country", "nato", "ocde",
"continent", "region", "subregion",
"region_wb", "type_income", "type_economy"),
res = c("low", "hi"), unit_subset = NULL,
matchWith = NULL, dir = NULL, use_cache = TRUE,
use_internet = TRUE, crs = NULL)
unit |
the type of world statistical unit |
res |
resolution |
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 world folder https://github.com/dataallaround/geospatial/tree/master/world.
A data.frame object with column indicating names, id, iso and the geometry to map.
Alessio Serafini
https://github.com/dataallaround/geospatial
loadCoordIT
, loadCoordEU
, loadCoordUS
, loadCoordDE
, loadCoordUK
WR_coords = loadCoordWR(res = "low")
str(WR_coords, 1)
WR_ocde = loadCoordWR(unit = "ocde",res = "low")
str(WR_ocde, 1)
WR_continent = loadCoordWR(unit = "continent",res = "low")
str(WR_continent, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.