Closed jeffreyhanson closed 2 years ago
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:
It is running on Ubuntu 20.04, with R 4.2.1
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.
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.
Ok excellent - thanks! Yeah, I'll update the error message.
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.