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

auk_breeding doesn't work since columns updated #58

Closed
julieannhart opened this issue Oct 25, 2021 · 2 comments
Closed

auk_breeding doesn't work since columns updated #58

julieannhart opened this issue Oct 25, 2021 · 2 comments

Comments

@julieannhart
Copy link

julieannhart commented Oct 25, 2021

The breeding and behavior code columns were changed in spring 2021 and the auk_breeding script still refers to the old column names. Here is the error I get when using the auk_breeding function to filter data:

 ebd_filters <- auk::auk_ebd(fname_ebirdny) %>%
     auk::auk_project("EBIRD_ATL_NY") %>%
     auk::auk_breeding() %>%
     auk::auk_state("US-NY")

Error in auk_breeding.auk_ebd(.) : Breeding code column missing from EBD

I am using the latest CRAN version 0.5.0 of auk and EBD data downloaded 10/17/2021.

@julieannhart
Copy link
Author

Some more info: the auk_ebd function is looking for column name "Breeding Bird Atlas Code" which has been replaced by "Breeding Code" and "Behavior Code". I'm not sure how the information is stored, so it may be a simple replacement or a combination of the two columns.

auk/R/auk-ebd.r

Line 104 in 015f844

"breeding bird atlas code",

The first row of the EBD I have has these columns:

GLOBAL UNIQUE IDENTIFIER LAST EDITED DATE TAXONOMIC ORDER CATEGORY COMMON NAME SCIENTIFIC NAME SUBSPECIES COMMON NAME SUBSPECIES SCIENTIFIC NAME OBSERVATION COUNT BREEDING CODE BREEDING CATEGORY BEHAVIOR CODE AGE/SEX COUNTRY COUNTRY CODE STATE STATE CODE COUNTY COUNTY CODE IBA CODE BCR CODE USFWS CODE ATLAS BLOCK LOCALITY LOCALITY ID LOCALITY TYPE LATITUDE LONGITUDE OBSERVATION DATE TIME OBSERVATIONS STARTED OBSERVER ID SAMPLING EVENT IDENTIFIER PROTOCOL TYPE PROTOCOL CODE PROJECT CODE DURATION MINUTES EFFORT DISTANCE KM EFFORT AREA HA NUMBER OBSERVERS ALL SPECIES REPORTED GROUP IDENTIFIER HAS MEDIA APPROVED REVIEWED REASON TRIP COMMENTS SPECIES COMMENTS

mstrimas added a commit that referenced this issue Oct 26, 2021
@mstrimas
Copy link
Contributor

Thanks for catching that Julie! Should be fixed now, but let me know if you're still having problems.

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