Hey,
Thanks for your work putting this together.
I'm trying to download all available data for the same four countries. Unfortunately, there doesn't appear to be a simple way to do this on V1 of their API. But, it does appear to be possible to download data for more than one country at once with a relatively minor tweak of the get_indicator() function code.
In case it's helpful for your next update or others using the package:
fnc_get_indicator_n_geos<-function (Country, indicator)
{
country_string<-paste(Country,collapse = "&areaCode=")
url <- paste0("https://unstats.un.org/sdgs/UNSDGAPIV5/v1/sdg/Indicator/Data?indicator=",
indicator, "&areaCode=",country_string)
datcall <- jsonlite::fromJSON(url)
page <- as.data.frame(datcall$data)
return(page)
}
Hey,
Thanks for your work putting this together.
I'm trying to download all available data for the same four countries. Unfortunately, there doesn't appear to be a simple way to do this on V1 of their API. But, it does appear to be possible to download data for more than one country at once with a relatively minor tweak of the get_indicator() function code.
In case it's helpful for your next update or others using the package: