Loads the predictor importance (PI) data from the stixel_summary.db sqlite database. PI estimates are provided for each stixel over which a model was run and are identified by a unique stixel ID in addition to the coordinates of the stixel centroid.

load_pis(path, ext, model = c("occurrence", "count"), 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().

ext

ebirdst_extent object; the spatiotemporal extent to filter the data to. The spatial component of the extent object must be provided in unprojected, latitude-longitude coordinates.

model

character; whether to make estimates for the occurrence or count model.

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 PI estimates for each stixel for either the occurrence or count models. The data are provided in a 'wide' format, with each row corresponding to the PI estimates for a give stixel for the occurrence count model, and the relative importance of each predictor in columns. Stixels are identified by a unique stixel_id, and the centroid of the stixel in space and time is specified by the latitude, longitude, and day_of_year columns. The column predictor provides a code specifying the predictor variable. These codes can be looked up in ebirdst_predictors for a brief description.

Examples

if (FALSE) {