prioritizr / wdpar

Interface to the World Database on Protected Areas
https://prioritizr.github.io/wdpar
GNU General Public License v3.0
37 stars 5 forks source link

Fails to download country-level data #35

Closed jeffreyhanson closed 2 years ago

jeffreyhanson commented 2 years ago

The wdpa_fetch() function for downloading country data currently doesn't work due to changes on the Protected Planet website. For example, running the following code throws the following error:

library(wdpar)
lie_raw_data <- wdpa_fetch("Liechtenstein", wait = TRUE, force = TRUE)
> Error:   Summary: NoSuchElement
>         Detail: An element could not be located on the page using the given search parameters.
>         class: org.openqa.selenium.NoSuchElementException
>        Further Details: run errorDetails method
jeffreyhanson commented 2 years ago

I've just pushed a new version to GitHub that fixes this issue, but it will be a while before I can submit the updated version to CRAN. This is because I recently submitted an updated version to CRAN, and it would violate CRAN policies to submit another update so soon. I'm sorry for the inconvenience.

If you are seeing the error message above, please try installing the GitHub version of the package and see if that fixes it for you. You can install the GitHub version using the following code:

if (!require("remotes")) install.packages("remotes")
remotes::install_github("prioritizr/wdpar")

If that doesn't fix the issue for you, please let me know. I'm happy to help get this working for you.

jeffreyhanson commented 2 years ago

The version of wdpar on CRAN has been updated, so this issue is now resolved.