This package provides functions to download and interact with the latest published SDG datasets from FAO. It is currently underdevelopment.
# To install this version, be sure you have devtools installed and run
devtools::install_github("michaelrahija/FAOSDGdata")
#load package
library(FAOSDGdata)
#getData returns the dataset for a single SDG indicator
PoU <- getData("2.1.1")
#getDatasets returns a list of datasets corresponding to those specified as a parameter
dfs <- getDatasets(c("2.1.1", "2.1.2"))
#For retrieving all datasets, set all = T
all_sdgs <- getDatasets(all = T)
There is a function which automatically scrapes the m49 countries and regions, with corresponding codes from the UNSD.
raw_m49 <- scrape_m49()
For analyzing SDG data downloaded using this package, it may be useful adopt the M49 datasets to include FAO special classifications, and harmonize column names with the SDG data template.
clean_m49 <- adopt_m49_for_FAO(raw_m49)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.