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

Species occurrence download from a list does not work #37

Open
arildodias opened this issue Oct 24, 2022 · 3 comments
Open

Species occurrence download from a list does not work #37

arildodias opened this issue Oct 24, 2022 · 3 comments

Comments

@arildodias
Copy link

Hi, I am trying to download the BIEN occurrence for a species list, but it does not download the data. Below is an example of what I tried and the error message I got:

here is the species name list I take to download the occurrences

spcs <- df %>% pull(scrubbed_species_binomial)

here I tried to download all the occurrences of those species restring the occurrence to the New World

spocc <- BIEN_occurrence_species(species = spcs, new.world = T)

here is the error message I got

There was a problem with the query. This is most often due to internet connection issues, but may also be due other factors >such as an outdated version of the package.

No species occurrence is downloaded after the code run. As my internet connection is quite good, and the BIEN package version I am using is the most recent one (BIEN 1.2.5), I don’t know why this is happening.
I have tried to download these occurrences several times across the last 3 to 4 days, but always with success.
Thanks

@bmaitner
Copy link
Owner

bmaitner commented Nov 2, 2022

Hi @arildodias I'm having trouble replicating this issue:

library(BIEN)
library(tidyverse)
library(TNRS)

trying with just one, works on my end

BIEN_occurrence_species("Acer rubrum")

pulling species from BIEN, works

BIEN_list_country("Bahamas") %>%
pull(scrubbed_species_binomial) %>%
unique() %>%
BIEN_occurrence_species(limit=100)

pulling names from the TNRS testfile, works on my end

tnrs_testfile %>%
pull(taxon) %>%
unique() %>%
TNRS::TNRS(taxonomic_names = .) %>%
pull(Accepted_name) %>%
BIEN_occurrence_species()

@arildodias
Copy link
Author

Hi @bmaitner,

here is an example of what I am trying but without success.

first I got all the species for each maximum height trait is availble:

plantheight <- BIEN_trait_trait(trait = 'maximum whole plant height')

then I try to download the occurrences for the species from the dataset above

spocc <- BIEN_occurrence_species(species = plantheight[,1], new.world = T)

But the occurrences are not downloaded and the following message come out:

"There was a problem with the query. This is most often due to internet connection issues, but may also be due other factors such as an outdated version of the package."

@bmaitner
Copy link
Owner

Strange, the same code works for me. Your twitter comment that the previous version of BIEN works for you suggests the issue may be related to some changes we made related to error handling to ensure CRAN compliance. However, because the old version returned more useful error message when it failed, I left it in as an option. Can you try the following code and let me know what happens?

plantheight <- BIEN_trait_trait(trait = 'maximum whole plant height')
spocc <- BIEN_occurrence_species(species = plantheight[,1], new.world = T)

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

No branches or pull requests

2 participants