Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wdpa_fetch() no longer works #63

Closed
jeffreyhanson opened this issue Sep 23, 2022 · 4 comments
Closed

wdpa_fetch() no longer works #63

jeffreyhanson opened this issue Sep 23, 2022 · 4 comments
Labels

Comments

@jeffreyhanson
Copy link
Collaborator

The PhantomJS web driver is no longer supported by the RSelenium package, and so this function no longers works. I need to find another package to replace the Rselenium dependency.

@fBedecarrats
Copy link

Hi, I see that this has already been identified by @Jo-Schie, but I'm affraid that the solution doesn't work on linux:

remotes::install_github("prioritizr/wdpar", quiet = TRUE, force = TRUE,
                        upgrade = "always")
library(dplyr)
library(wdpar)

# Downloading Protected areas from Madagascar
PA_mada <- wdpa_fetch("Madagascar", wait = TRUE,
                      download_dir = "data_s3/WDPA") %>%
  filter(STATUS != "Proposed") %>%
  filter(DESIG != "Locally Managed Marine Area", DESIG != "Marine Park") 

Which returns the following error:
Screenshot from 2022-10-14 11-37-12

It is running on Ubuntu 20.04, with R 4.2.1

@jeffreyhanson
Copy link
Collaborator Author

jeffreyhanson commented Oct 14, 2022

Thank you very much for reaching out @fBedecarrats! Hmm, the webdriver::run_phantomjs() function requires the installation of the PhantomJS software. Could you please try running webdriver::install_phantomjs(), and then running the wdpa_fetch() code again? I had originally intended for the wdpar package to display a helpful error message telling people to install PhantomJS if it's not availalbe, but it would seem that I might not have got it working correctly.

@jeffreyhanson jeffreyhanson reopened this Oct 14, 2022
@fBedecarrats
Copy link

I just tried and it worked indeed! I agree that a message to the user would be useful to help solve this error. Thanks a lot.

@jeffreyhanson
Copy link
Collaborator Author

Ok excellent - thanks! Yeah, I'll update the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants