# Toy examples using Pacific Wren sample data
# Stratify by CWS USGS stratifications
data_strat <- stratify(by = "bbs_usgs", sample_data = TRUE)
# Stratify by Bird Conservation Regions only
data_strat <- stratify(by = "bcr", sample_data = TRUE)
# Stratify by CWS BBS stratifications
data_strat <- stratify(by = "bbs_cws", sample_data = TRUE)
# Stratify by State/Province/Territory only
data_strat <- stratify(by = "state", sample_data = TRUE)
# Stratify by blocks of 1 degree of latitude X 1 degree of longitude
data_strat <- stratify(by = "latlong", sample_data = TRUE)
# To stratify the entire dataset, simply set the sample_data = FALSE,
# or drop that argument altogher. The function then requires fetch_bbs_data()
# to have been run (takes about 10 minutes). Stratification of the entire dataset
# may take up to 3 minutes.
Run the code above in your browser using DataLab