Description Usage Format Source Examples
a sf
object points of African airports.
See data-raw/afrilearndata-creation.R for how the data object is created.
1 |
Formal class 'sf'; 50 rows 5 columns
id id numeric
ident ident XXXX
type large_airport medium_airport small_airport
name airport name
elevation_ft elevation in feet
continent continent code AF
country_name country name
iso_country country code two letters capitalised
region_name name of region
iso_region iso region code incl country XX-YY
local_region region code excl country YY
municipality municipality
scheduled_service scheduled_service 1=yes, 2=no
gps_code gps charecter code
iata_code iata character code
local_code local code
home_link web page url
wikipedia_link wikipedia url
keywords keywords
score score
last_updated last update
geometry coordinates of the point sfc_POINT
Geographical coordinates WGS84 datum (CRS EPSG 4326)
https://ourairports.com/continents/AF/airports.csv
1 2 3 4 5 6 7 8 9 10 11 12 | if (requireNamespace("sf", quietly = TRUE)) {
library(sf)
data(afriairports)
# or read from the csv file which is stored in package as example to work with
# filename <- system.file("extdata","afriairports.csv", package="afrilearndata", mustWork=TRUE)
# dfairports <- readr::read_csv(filename)
# and convert to sf object
# afriairports <- sf::st_as_sf(dfairports, coords=c("longitude_deg", "latitude_deg"), crs=4326)
#plot(sf::st_geometry(afriairports))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.