myebirds: Calculate species totals gouped by year, country, and/or...

Description Usage Arguments Value Author(s) Examples

Description

myebirds calculates species totals based on data dumped by eBird (Download page: http://ebird.org/ebird/downloadMyData) after it has been cleaned with ebirdclean.

Usage

1
2
myebirds(mydata, years = 1900:format(Sys.Date(), "%Y"),
  grouping = c("Year", "Country", "Month"), wide = FALSE)

Arguments

mydata

Data frame provided by ebirdclean.

years

Range of years to calculate across, default is between 1900 and current year.

grouping

Character vector specifying how the data should be grouped for counting. Must be composed of "Year", "Country", and/or "Month". This vector is passed on directly to group_by_.

wide

String specifying whether different values should be returned in wide format and how. Must be one of the strings included in grouping. Defaults to FALSE.

Value

A data frame containing total counts divided into specified groups. If wide = FALSE then it returns a combination of the following columns, depending on grouping specified:

"Year" Year

"Country" Country using two letter codes.

"Month" Month, using full month name (from month.name()).

"n" Total species count for the specified Year, Country, and Month.

If in wide format, then the first column(s) consist of the values in grouping that are not equal to wide, while the remaining columns are unique values of the argument specified in wide.

Author(s)

Sebastian Pardo sebpardo@gmail.com

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
mylist <- ebirdclean() # CSV must be in working directory
myebirds(mylist, grouping = c("Year"))
myebirds(mylist, grouping = c("Country", "Month"))
myebirds(mylist, grouping = c("Year", "Country", "Month"))
myebirds(mylist, grouping = c("Year", "Country", "Month"), wide = "Month")
myebirds(mylist, grouping = c("Year", "Country", "Month"), wide = "Country")

## End(Not run)

sebpardo/myebird documentation built on Aug. 9, 2021, 3:58 a.m.