-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Executing the following code results in Error in req_perform(req) : HTTP 404 Not Found.
START_YEAR <- 1990
INDICATORS <- c('healthindex', 'edindex', 'incindex')
DATASET <- 'shdi'
END_YEAR <- as.integer(format(Sys.Date(), "%Y"))
sess <- sess %>%
set_dataset(DATASET) %>%
set_countries_all() %>%
set_year(START_YEAR) %>%
set_indicators(INDICATORS)
indicator_merged <- gdl_request(sess)The exact URL which is called from the above configuration is:
https://globaldatalab.org/shdi/download/1990/healthindex+edindex+incindex//?format=csv&token=IaoYqcWkagZ7q7WX1wBK68SWiZJGBOcqaWB_RiB4kwA&interpolation=1&transposition
note that there is an extra / before ?
This issue seems to be caused by the following line:
Line 93 in 877287a
| session@countries <- '' |
the countries attribute is later read by the
Lines 44 to 47 in 877287a
| # Countries? | |
| if (length(session@countries) > 0) { | |
| url <- paste0(url, paste(session@countries, collapse='+'), '/') | |
| } |
Since the length of '' is 1, the final URL ends up with an extra /
A solution could be to replace the line 93 above with
session@countries <- character(0)
Metadata
Metadata
Assignees
Labels
No labels