Description Usage Format Source Examples
a sf
object points of African capital cities
See data-raw/afrilearndata-creation.R for how the data object is created.
1 |
Formal class 'sf'; 50 rows 5 columns
capitalname character vector capital city names
countryname character vector country names
pop numeric estimated population 2006
iso3c character vector ISO 3 letter country code
geometry sfc_POINT
Geographical coordinates WGS84 datum (CRS EPSG 4326)
https://cran.r-project.org/web/packages/maps/
1 2 3 4 5 6 7 8 9 | if (requireNamespace("sf", quietly = TRUE)) {
library(sf)
data(africapitals)
# or
filename <- system.file("extdata","africapitals.gpkg", package="afrilearndata", mustWork=TRUE)
africapitals <- sf::read_sf(filename)
#plot(sf::st_geometry(africapitals))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.