GetRouteData: Function to query 10 or 50 stop data for species, year, and...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function imports the 10 or 50 stop species data from either the USGS BBS ftp server or another repository

Usage

1
2
3
GetRouteData(AOU = NULL, countrynum = NULL, states = NULL, year,
                weather = NULL, routes = NULL, Zeroes = TRUE, TenStops = TRUE, 
                Dir="ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/")

Arguments

AOU

Vector of species' AOU code

countrynum

Vector of country codes, either 124 (Canada), 484 (Mexico), or 840 (USA).

states

Vector of state codes. If they are unique to one country, countrynum can be NULL.

year

Year(s) for which data is wanted: must be after 1997 (pre-1997 data not included yet)

weather

Data frame with Weather data. Can be NULL, then function will extract the data

routes

Data frame with routes data. Can be NULL, then function will extract the data

Zeroes

Logical: if TRUE (the default) will return all routes sampled in relevant years, otherwise only the routes where the species was observed.

TenStops

Logical: if TRUE (the default) get 10-stop data. If false, get 50-stop data.

Dir

Directory where the data will be extracted from. Defaults to USGS server at ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/

Details

The pre-1997 data from Canada is not included.

Value

Data frame with the following columns for all data:

countrynum

The three digit identification code for country. See RegionCodes.txt file for key.

statenum

The two digit numerical code that identifies the state, province or territory where the route was run. See RegionCodes.txt file for key.

routeID

character code for route. Should be unique. made of paste of state & route IDs

route

The three digit code that identifies the route - unique within states.

rpid

Three digit run protocol identification number. See RunProtocolID.txt for key.

aou

The five digit species identification code.

Year

The year

Month

The month

Day

The day

RunType

If this run is acceptable by BBS standards, then this column is 1, otherwise it is 0.

Latitude

The latitude of the route start point in decimal degrees.

Longitude

The longitude of the route start point in decimal degrees.

SumCount

Total number of individuals of that species counted

For 10 stop data, these columns in addition:

count10

Total individuals of the species recorded on stops 1-10.

count20

Total individuals of the species recorded on stops 11-20.

count30

Total individuals of the species recorded on stops 21-30.

count40

Total individuals of the species recorded on stops 31-40.

count50

Total individuals of the species recorded on stops 41-50.

stoptotal

Total number of stops out of 50 on which the species was recorded.

speciestotal

The total number of species recorded on that run of the route.

For 10 stop data, these columns in addition:

stop1 ... stop50

Total individuals of the species recorded on that stop.

Author(s)

Bob O'Hara

References

Sauer, J. R., J. E. Hines, J. E. Fallon, K. L. Pardieck, D. J. Ziolkowski, Jr., and W. A. Link. 2014. The North American Breeding Bird Survey, Results and Analysis 1966 - 2012. Version 02.19.2014 USGS Patuxent Wildlife Research Center, Laurel, MD

See Also

GetWeather gets the weather for the routes

Examples

1
2
3
## Get data for pileated woodpecker & roadrunner for some states
 Data <- GetRouteData(AOU=c(4050, 3850), countrynum=NULL, states=c(89, 40:45), year=2010, 
                      TenStops = TRUE, Zeroes=FALSE)

oharar/rBBS documentation built on May 24, 2019, 11:55 a.m.