A simple wrapper of the rest countries restful API - http://restcountries.eu/
restcountries
The restcountries package can be downloaded from Github using the remotes package which allows easy installation of R packages from remote repositories such as Github.
install.packages("remotes")
library(remotes)
remotes::install_github("denironyx/restcountries")
The restcountriesr datapackage can be filter by the following.
library(restcountriesr)
library(dplyr)
df <- rc_all()
##List of columns
parameter <- c("country_name", "capital", "iso2c", "iso3c", "calling_codes", "lat", "lon", "region", "currencies", "population")
# The first 6 rows of the result queried
df %>%
select(all_of(parameter)) %>%
head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.