Closed KornTob closed 3 months ago
Hi,
thanks for raising the issue. This is somehow odd, because in your code snippet you specify years = 2010:2023
so we should actually not try to download the data for 2008.
Also, when I follow the link printed in the error message I can actually download the file.
When I am running the code below with version 0.5.0, the packages successfully downloads the data for 2010 to 2023 (although it takes a long time). The issue is most likley the latency of the source server, which we really cannot do anything about.
So without further information on errors/warnings from your side my current suggestion is to re-run your code. In case it still
fails, try to download the file manually and put it into the right folder (e.g. file.path(outdir, "worldpop")
.
Sorry, if that is not as helpful as you might have expected...
Also, please note that the worldpop
resource we support here is only available for 2000 to 2020.
library(sf)
library(geodata)
library(mapme.biodiversity)
outdir <- tempfile()
dir.create(outdir)
mp_sf <- gadm(country="IRQ",level=2, path = outdir)
mp_sf <- st_as_sf(mp_sf)
sources <- init_portfolio(st_cast(mp_sf,"POLYGON"),
years = 2010:2023, outdir = outdir)
sources <- get_resources(x=sources, resources=c("worldpop"))
Closing here. Feel free to re-open in case you have some more info to share that would help reproducing the issue.
Hello, I ran into difficulties downloading worldpop data. The download stopped with the following error message:
My code below: