You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calc_covariate() summarizes the conditions a Bird would have experienced prior to an observation. It uses BirdFlow models to calculate covariates for use in other models from a spatial dataset, observation location, observation date, and a covariate (or initial) date that is earlier than the observation date. The function would then calculate a probably distribution at the covariate date by calling predict() back in time, and then average a raster covariate dataset using weights from that distribution. calc_covariate(bf, obs_x, obs_y, obs_date, cov_date, covariate)
Arguments: bf - a BirdFlow model obs_x, obs_y, location of one or more observations for which the covariates are to calculated. obs_date The date (probably only one allowed) of the observations. cov_date The date (prior to obs_date) for which the covariates are to be calculated covariate - spatial dataset (a terra::spatrast) containing the covariate data for the cov_date.
Note: it would probably be nice to allow obs_date to vary and maybe replace cov_date with lag (in weeks) such that you could easily calculate covariates for observations that vary in time based on a constant lag. That would require that covariate also cover multiple points in time and might get logistically challenging. A function that worked with a predetermined dataset could hide those complications from the user (see below).
calc_climate_covariate()
This would be a variant on calc_covariate() tailored to specific datasets. It would calculate the spatial extent and times for which it needs covariate data and then download that data from an API and use it to calculate the covariates. The dataset selection should be driven by a use case and doesn't need to be climate related. Using the climate example it might look like: calc_climate_covariate(bf, obs_x, obs_y, obs_date, lag, covariates)
Arguments bf - a BirdFlow model obs_x, obs_y, location of one or more observations for which the covariates are to calculated. obs_date The dates associated with the observations. lag The lag (in weeks) prior to obs_date for which the covariates will be calculated. covariates - names of covariates from a list of datasets the function can handle.
calc_covariate()
calc_covariate()
summarizes the conditions a Bird would have experienced prior to an observation. It uses BirdFlow models to calculate covariates for use in other models from a spatial dataset, observation location, observation date, and a covariate (or initial) date that is earlier than the observation date. The function would then calculate a probably distribution at the covariate date by callingpredict()
back in time, and then average a raster covariate dataset using weights from that distribution.calc_covariate(bf, obs_x, obs_y, obs_date, cov_date, covariate)
Arguments:
bf
- a BirdFlow modelobs_x
,obs_y
, location of one or more observations for which the covariates are to calculated.obs_date
The date (probably only one allowed) of the observations.cov_date
The date (prior toobs_date
) for which the covariates are to be calculatedcovariate
- spatial dataset (aterra::spatrast
) containing the covariate data for thecov_date
.Note: it would probably be nice to allow
obs_date
to vary and maybe replacecov_date
withlag
(in weeks) such that you could easily calculate covariates for observations that vary in time based on a constant lag. That would require thatcovariate
also cover multiple points in time and might get logistically challenging. A function that worked with a predetermined dataset could hide those complications from the user (see below).calc_climate_covariate()
This would be a variant on
calc_covariate()
tailored to specific datasets. It would calculate the spatial extent and times for which it needs covariate data and then download that data from an API and use it to calculate the covariates. The dataset selection should be driven by a use case and doesn't need to be climate related. Using the climate example it might look like:calc_climate_covariate(bf, obs_x, obs_y, obs_date, lag, covariates)
Arguments
bf
- a BirdFlow modelobs_x
,obs_y
, location of one or more observations for which the covariates are to calculated.obs_date
The dates associated with the observations.lag
The lag (in weeks) prior toobs_date
for which the covariates will be calculated.covariates
- names of covariates from a list of datasets the function can handle.Covariate spatial data sources
The text was updated successfully, but these errors were encountered: