Description Usage Format Source See Also Examples
a sf
object containing low resolution African country boundaries
See data-raw/afrilearndata-creation.R for how the data object is created.
1 |
Formal class 'sf'; 51 rows, 8 columns
name character vector country names
name_long character vector country names long
pop_est numeric estimated population
gdp_md_est numeric estimated gdp
lastcensus numeric year of last census
income_grp character vector income group
iso_a3 character vector ISO 3 letter country code
geometry sfc_MULTIPOLYGON
name_fr character vector French country names
name_pt character vector Portuguese country names
name_af character vector Afrikaans country names
name_sw character vector Swahili country names
Geographical coordinates WGS84 datum (CRS EPSG 4326)
https://www.naturalearthdata.com/downloads/110m-cultural-vectors/
https://cran.r-project.org/web/packages/rnaturalearth/
1 2 3 4 5 6 7 8 | if (requireNamespace("sf", quietly = TRUE)) {
library(sf)
data(africountries)
# or
filename <- system.file("extdata","africountries.shp", package="afrilearndata", mustWork=TRUE)
africountries <- sf::read_sf(filename)#'
plot(sf::st_geometry(africountries))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.