read_ebd: Read an EBD file

Description Usage Arguments Details Value Methods (by class) See Also Examples

View source: R/read.r

Description

Read an eBird Basic Dataset file using data.table::fread(), readr::read_delim(), or read.delim() depending on which packages are installed. read_ebd() reads the EBD itself, while read_sampling()' reads a sampling event data file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
read_ebd(x, reader, sep = "\t", unique = TRUE, rollup = TRUE)

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

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

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

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

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

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

Arguments

x

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

reader

character; the function to use for reading the input file, options are "fread", "readr", or "base", for data.table::fread(), readr::read_delim(), or read.delim(), respectively. This argument should typically be left empty to have the function choose the best reader based on the installed packages.

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.

Details

This functions performs the following processing steps:

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.

Methods (by class)

See Also

Other import: auk_zerofill

Examples

1
2
3
4
5
f <- system.file("extdata/ebd-sample.txt", package = "auk")
read_ebd(f)
# read a sampling event data file
x <- system.file("extdata/zerofill-ex_sampling.txt", package = "auk") %>%
  read_sampling()

CornellLabofOrnithology/auk documentation built on Sept. 4, 2018, 6:08 p.m.