load_predictions: Load eBird Status and Trends test data predictions

View source: R/load.R

load_predictionsR Documentation

Load eBird Status and Trends test data predictions

Description

During eBird Status and Trends modeling, predictions are made for checklists in a test dataset that is not included in the model fitting process. This function loads these predictions in addition to the actual observed count on the associated checklist. These data are used by ebirdst_ppms() for calculating predictive performance metrics.

Usage

load_predictions(path, return_sf = FALSE)

Arguments

path

character; directory that the Status and Trends data for a given species was downloaded to. This path is returned by ebirdst_download() or get_species_path().

return_sf

logical; whether to return an sf object of spatial points rather then the default data frame.

Value

Data frame, or sf object if return_sf = TRUE, containing observed counts and model predictions for the test data.

Examples

## Not run: 
# download example data
path <- ebirdst_download("example_data", tifs_only = FALSE)
# or get the path if you already have the data downloaded
path <- get_species_path("example_data")

# test data
test_predictions <- load_predictions(path)
dplyr::glimpse(test_predictions)

## End(Not run)

CornellLabofOrnithology/stemhelper documentation built on Feb. 5, 2023, 9:59 a.m.