Partial dependence (PD) plots depict the relationship between the modeled occurrence probability and each of the predictor variables used in the model. Status and Trends provides the data to generate these plots for every stixel.

load_pds(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 PD estimates for each stixel for either the occurrence or count model. The data frame will have the following columns:

• stixel_id: unique stixel identifier

• latitude and longitude: stixel centroid

• day_of_year: center day of year for stixel

• predictor: name of the predictor that the PD data correspond to, for a full list of predictors consult the ebirdst_predictors data frame

• predictor_value: value of the predictor variable at which PD is evaluated

• response: predicted response, occurrence or count, at the given value of the predictor averaged across all the values of the other predictors

## Examples

if (FALSE) {
path <- get_species_path("example_data")

# load partial dependence data for occurrence model

# plot the top 15 predictor importances
# define a spatiotemporal extent to plot data from
bb_vec <- c(xmin = -86.6, xmax = -82.2, ymin = 41.5, ymax = 43.5)
e <- ebirdst_extent(bb_vec, t = c("05-01", "05-31"))
plot_pds(pds, "solar_noon_diff_mid", ext = e, n_bs = 5)
}