trashbirdecology / bbsAssistant

An R package for downloading and handling data and information from the North American Breeding Bird Survey.
Creative Commons Zero v1.0 Universal
27 stars 13 forks source link

Not working for 2022 release #122

Open see24 opened 1 year ago

see24 commented 1 year ago

The package was not working for the 2022 release even when I supplied the right sb_id there were apparently a few small changes in the data format that messed things up.

I will make a PR with changes I made to fix it.

rburner commented 11 months ago

Hi @trashbirdecology and @see24 - I'm having the same problem; do you think this will be resolved soon? Thanks!

see24 commented 11 months ago

@rburner you could try installing from my fork https://github.com/see24/bbsAssistant/tree/fix-QualityCurrentID-filter

Not sure how actively this project is being maintained.

rburner commented 11 months ago

Thank you @see24 ! I appreciate it.

For others, install can be done with: devtools::install_github("see24/bbsAssistant")

But when I try it with 2022 data (sb_id='625f151ed34e85fa62b7f926') I get the following:

Error in `$<-`:
! Assigned data `as.integer(as.character(species_list$AOU))` must be compatible with existing data.
✖ Existing data has 764 rows.
✖ Assigned data has 0 rows.
ℹ Only vectors of size 1 are recycled.
Caused by error in `vectbl_recycle_rhs_rows()`:
! Can't recycle input of size 0 to size 764.
Run `rlang::last_trace()` to see where the error occurred.
Warning message:
Unknown or uninitialised column: `AOU`. 

For 2023 data (sb_id='64ad9c3dd34e70357a292cee') I'm getting the following (different) error:

Joining with `by = join_by(Seq, AOU, English_Common_Name, Spanish_Common_Name, ORDER, Family, Genus, Species)`
Error in enc2utf8(path) : argument is not a character vector
see24 commented 11 months ago

Hi @rburner I think the issue is that you actually need a specific branch of my fork of the repo. Try: devtools::install_github("see24/bbsAssistant", ref = "fix-QualityCurrentID-filter")

rburner commented 11 months ago

@see24 Good call, that works great with 2022! Thank you!

For 2023 though I get this error now: Attempting to decompress and import files from data-in/64ad9c3dd34e70357a292cee Error in enc2utf8(path) : argument is not a character vector

I don't specifically need 2023 data, so feel free to ignore this though:) Thanks again

rburner commented 11 months ago

@see24 Although I am finding one issue with 2022 (FYI - I can overcome it by using the built-in package species list) - when I run: bbs <- grab_bbs_data(sb_id='625f151ed34e85fa62b7f926') #2022 and then look at bbs$species_list all of Passeriformes (but not other species) is missing scientific name, AOU4, and AOU6.

But, if I just look at species_list the codes are all there. If I understand the documentation correctly I think the former is the list from the current downloaded dataset, and the latter is the version loaded automatically with the package.

see24 commented 11 months ago

I just made another push to that branch, should fix the Passeriformes issue but there are still some species not matching because of different scientific names than the ones in the list that is included with the package. Probably would be better to use the IBP-AOS list that corresponds to the bbs release year but don't know where to find old ones.

trashbirdecology commented 11 months ago

Hi folx—sorry I won’t have time to look at this for a while. If you can push a change that would be extremely helpful !

On Fri, Jul 21, 2023 at 09:48 Ryan C. Burner @.***> wrote:

@see24 https://github.com/see24 Good call, that works great with 2022!

For 2023 though I get this error now: Attempting to decompress and import files from data-in/64ad9c3dd34e70357a292cee Error in enc2utf8(path) : argument is not a character vector

— Reply to this email directly, view it on GitHub https://github.com/trashbirdecology/bbsAssistant/issues/122#issuecomment-1645620947, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACL2TNJAIV3GLZSWKJB5HL3XRKCDLANCNFSM6AAAAAA2ARQK2M . You are receiving this because you were mentioned.Message ID: @.***>

--

__

Jessica L. Burnett (she/her)

Github http://github.com/trashbirdecology

ORCID: 0000-0002-0896-5099 https://orcid.org/0000-0002-0896-5099 __

Join the Community for Data Integration https://www.usgs.gov/centers/cdi! All welcome. It's cool.

rburner commented 11 months ago

Thank you both! I really appreciate the fixes.

trashbirdecology commented 11 months ago

All—-sorry, I’m so swamped that I can’t get around to this immediately to help nor to update to ensure cleanliness with 2022/23 releases. Please feel free to send a push to expedite this!

On Fri, Jul 21, 2023 at 8:48 AM Ryan C. Burner @.***> wrote:

@see24 https://github.com/see24 Although I am finding one issue with 2022 (FYI - I can overcome it by using the built-in package species list) - when I run: bbs <- grab_bbs_data(sb_id='625f151ed34e85fa62b7f926') #2022 and then look at bbs$species_list all of Passeriformes (but not other species) is missing scientific name, AOU4, and AOU6.

But, if I just look at species_list the codes are all there. If I understand the documentation correctly I think the former is the list from the current downloaded dataset, and the latter is the version loaded automatically with the package.

— Reply to this email directly, view it on GitHub https://github.com/trashbirdecology/bbsAssistant/issues/122#issuecomment-1645788757, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACL2TNP3DLVFQIEL6ZJGBHTXRKQEPANCNFSM6AAAAAA2ARQK2M . You are receiving this because you were mentioned.Message ID: @.***>

--

__

Jessica L. Burnett (she/her)

Github http://github.com/trashbirdecology

ORCID: 0000-0002-0896-5099 https://orcid.org/0000-0002-0896-5099 __

Join the Community for Data Integration https://www.usgs.gov/centers/cdi! All welcome. It's cool.