Chapter 3 Stratification

3.1 Strata

All of the models supported by bbsBayes expect the BBS route-level data to be grouped into geographic strata. These strata are subregions of the survey area, and allow the parameters that model abundance and trend to vary across a species’ range.

Use the stratify() function to group the BBS data into one of the included stratifications. Select the stratification using the argument by to stratify by the following options:

  • bbs_cws – stratify(by = "bbs_cws") Political region X Bird Conservation region intersection (Canadian Wildlife Service [CWS] method). Identical to bbs_usgs, except all routes in BCR 7 are combined into a single stratum, and all routes in PEI and Nova Scotia are combined into a single stratum.

  • bbs_usgs – stratify(by = "bbs_usgs") Political region X Bird Conservation region intersection (United Status Geological Survey [USGS] method)

  • bcr – stratify(by = "bcr") Bird Conservation Region only

  • state – stratify(by = "state") Political Region only

  • latlong – stratify(by = "latlong") Degree blocks (1 degree of latitude X 1 degree of longitude)

Now that we know the built-in stratification options, let’s stratify our copy of the BBS data. Here, we will choose to stratify our data using the “bbs_cws” method:

# set up for the annual CWS status and trend analysis
strat_data <- stratify(by = "bbs_cws")

The stratified_data object includes 3 dataframes.

  • strat_data$species_strat is a table of all species included in the dataset. It has columns for species common names in English, French, and Spanish, as well as information on the order, family, genus, species, and the numerical species indicators used in the BBS database in both character format (with leading 0s) and integer format.
knitr::kable(head(strat_data$species_strat[,c(3,4,5,8,9,10)]))
english french spanish genus species sp.bbs
Black-bellied Whistling-Duck Dendrocygne à ventre noir Dendrocygna autumnalis Dendrocygna autumnalis 1770
Fulvous Whistling-Duck Dendrocygne fauve Dendrocygna bicolor Dendrocygna bicolor 1780
Emperor Goose Oie empereur Anser canagicus Anser canagicus 1760
Snow Goose (all forms) Oie des neiges (toutes les formes) Anser caerulescens Anser caerulescens 1690
(Blue Goose) Snow Goose Oie des neiges (forme bleue) Anser caerulescens (blue form) Anser caerulescens (blue form) 1691
Ross’s Goose Oie de Ross Anser rossii Anser rossii 1700
  • strat_data$bird_strat is a very large table of each observed count for a given species X route X year combination. This is the table that includes all of the non-zero observations in the BBS database.
knitr::kable(head(strat_data$bird_strat[,c(1,2,6,7,14,16,17)]))
statenum Route Year AOU SpeciesTotal rt.uni rt.uni.y
11 1 1997 5880 28 11-1 11-1-1997
11 1 1997 5671 6 11-1 11-1-1997
11 1 1997 6850 3 11-1 11-1-1997
11 1 1991 6882 22 11-1 11-1-1991
11 1 2012 3160 1 11-1 11-1-2012
11 1 1991 4860 9 11-1 11-1-1991
  • strat_data$route_strat is a large table of each BBS survey conducted. It includes a single row for each survey-event (i.e., a route X year X observer combination). It also includes the information on the weather conditions, timing, date, etc.
knitr::kable(head(strat_data$route_strat[,c(2,3,8,13,33:35)]))
statenum Route BCR Year strat_name rt.uni rt.uni.y
11 1 5 1995 CA-BC-5 11-1 11-1-1995
11 1 5 1994 CA-BC-5 11-1 11-1-1994
11 1 5 1976 CA-BC-5 11-1 11-1-1976
11 1 5 1977 CA-BC-5 11-1 11-1-1977
11 1 5 1974 CA-BC-5 11-1 11-1-1974
11 1 5 1975 CA-BC-5 11-1 11-1-1975

3.1.1 Accessing the strata maps

The package includes a function to directly access the strata maps (other than the generate_map() function, which displays a map of estimated trends). However this code below should suffice to find the map files in your local installation.

library(sf)
library(ggplot2)
laea = st_crs("+proj=laea +lat_0=40 +lon_0=-95") # Lambert equal area coordinate reference system for pretty mapping


stratifications <- c("bbs_cws","bbs_usgs","bcr","latlong","state")

strata_map = load_map(stratifications[2]) #selecting the map for "bbs_usgs" stratification
strata_map = st_transform(strata_map,crs = laea) #transforming the coordinate reference system
# mapping using geom_sf()
st_gg = ggplot(data = strata_map)+
geom_sf()+
labs(title = paste("stratify(by =",stratifications[2],")"))

plot(st_gg)