Learn R Programming

ebirdst (version 0.3.3)

load_predictions: 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() to get 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 predictiosn for the test data.

Examples

Run this code
# 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)
# }

Run the code above in your browser using DataLab