Skip to contents

Read an eBird Basic Dataset file using readr::read_delim(). read_ebd() reads the EBD itself, while read_sampling()` reads a sampling event data file.

Usage

read_ebd(x, sep = "\t", unique = TRUE, rollup = TRUE)

# S3 method for class 'character'
read_ebd(x, sep = "\t", unique = TRUE, rollup = TRUE)

# S3 method for class 'auk_ebd'
read_ebd(x, sep = "\t", unique = TRUE, rollup = TRUE)

read_sampling(x, sep = "\t", unique = TRUE)

# S3 method for class 'character'
read_sampling(x, sep = "\t", unique = TRUE)

# S3 method for class 'auk_ebd'
read_sampling(x, sep = "\t", unique = TRUE)

# S3 method for class 'auk_sampling'
read_sampling(x, sep = "\t", unique = TRUE)

Arguments

x

filename or auk_ebd object with associated output files as created by auk_filter().

sep

character; single character used to separate fields within a row.

unique

logical; should duplicate grouped checklists be removed. If unique = TRUE, auk_unique() is called on the EBD before returning.

rollup

logical; should taxonomic rollup to species level be applied. If rollup = TRUE, auk_rollup() is called on the EBD before returning. Note that this process can be time consuming for large files, try turning rollup off if reading is taking too long.

Value

A data frame of EBD observations. An additional column, checklist_id, is added to output files if unique = TRUE, that uniquely identifies the checklist from which the observation came. This field is equal to sampling_event_identifier for non-group checklists, and group_identifier for group checklists.

Details

This functions performs the following processing steps:

  • Data types for columns are manually set based on column names used in the February 2017 EBD. If variables are added or names are changed in later releases, any new variables will have data types inferred by the import function used.

  • Variables names are converted to snake_case.

  • Duplicate observations resulting from group checklists are removed using auk_unique(), unless unique = FALSE.

Methods (by class)

  • read_ebd(character): Filename of EBD.

  • read_ebd(auk_ebd): auk_ebd object output from auk_filter()

Functions

  • read_sampling(character): Filename of sampling event data file

  • read_sampling(auk_ebd): auk_ebd object output from auk_filter(). Must have had a sampling event data file set in the original call to auk_ebd().

  • read_sampling(auk_sampling): auk_sampling object output from auk_filter().

See also

Other import: auk_zerofill()

Examples

f <- system.file("extdata/ebd-sample.txt", package = "auk")
read_ebd(f)
#> # A tibble: 392 × 52
#>    checklist_id global_unique_identi…¹ last_edited_date taxonomic_order category
#>    <chr>        <chr>                  <chr>                      <dbl> <chr>   
#>  1 S8726496     URN:CornellLabOfOrnit… 2013-11-13 14:5…           21280 species 
#>  2 S11593649    URN:CornellLabOfOrnit… 2013-03-15 17:3…           21280 species 
#>  3 S47574783    URN:CornellLabOfOrnit… 2025-06-30 10:1…           21280 species 
#>  4 S6090024     URN:CornellLabOfOrnit… 2014-10-06 20:2…           21280 species 
#>  5 S6649345     URN:CornellLabOfOrnit… 2025-10-19 13:3…           21280 species 
#>  6 S119788037   URN:CornellLabOfOrnit… 2022-10-01 17:0…           21280 species 
#>  7 S8526215     URN:CornellLabOfOrnit… 2021-11-11 12:5…           21280 species 
#>  8 S7346666     URN:CornellLabOfOrnit… 2021-03-26 03:5…           21280 species 
#>  9 S286008945   URN:CornellLabOfOrnit… 2025-11-24 17:5…           21280 species 
#> 10 S9957382     URN:CornellLabOfOrnit… 2024-02-16 20:5…           21280 species 
#> # ℹ 382 more rows
#> # ℹ abbreviated name: ¹​global_unique_identifier
#> # ℹ 47 more variables: taxon_concept_id <chr>, common_name <chr>,
#> #   scientific_name <chr>, exotic_code <chr>, observation_count <chr>,
#> #   breeding_code <chr>, breeding_category <chr>, behavior_code <chr>,
#> #   age_sex <chr>, country <chr>, country_code <chr>, state <chr>,
#> #   state_code <chr>, county <chr>, county_code <chr>, iba_code <chr>, …
# read a sampling event data file
x <- system.file("extdata/zerofill-ex_sampling.txt", package = "auk") |>
  read_sampling()