make_bundle | R Documentation |
Bundle Data for Use in JAGS
make_bundle( bbs, ebird, grid, drop.na.cov.obs = TRUE, mins.to.hours = TRUE, scale.covs = TRUE, fill.cov.nas = NA, max.ebird = 25, use.ebird.in.EN = TRUE, EN.arg = "max", X = "cell.lon.centroid", Y = "cell.lat.centroid", cellid = "gridcellid", yearid = "year", siteid = c("checklist_id", "rteno", "sampling_event_identifier"), obsid = c("obsn", "observer_id"), cell.covs = c("area"), drop.empty.cells = FALSE, site.covs = c("starttime", "endtime", "wind", "noise", "cars", "minute", "assistant", "obsfirstyearbbs", "obsfirstyearonbbs", "obsfirstyearroute", "obsfirstyearonroute", "time_observations_started_hsm", "time_observations_started", "duration_minutes", "protocol_type", "number_observers"), dev.mode = FALSE, dir.outputs = "/outputs/", save.neighborhood = FALSE )
bbs |
BBS data table |
ebird |
eBird data table |
grid |
spatial sampling grid/study area table |
drop.na.cov.obs |
logical if TRUE will remove ALL data where any specified covariate does not exist. If TRUE, suggest examining the data and covariates prior to specifying site.covs and grid.covs. |
mins.to.hours |
logical if TRUE will convert covariates on the minute scale to the hour scale. |
scale.covs |
logical if TRUE will automatically scale the numeric/integer covariates. |
fill.cov.nas |
value with with to fill missing covariate values. User can specify value as FALSE if no fill is requested. |
max.ebird |
integer maximum number of eBird checklists within a single grid cell and year to keep in the data. Does not apply to dev.mode. If an integer is not provided (e.g., NULL, FALSE), all checklists will be returned in the resulting data object. |
use.ebird.in.EN |
logical if TRUE will use data across both eBird and BBS observations to create basis functions. |
EN.arg |
if "max" will use the maximum value of observed birds at each grid cell to produce matrix of expected number of birds at the grid cell level. Alternatives include "min", "mean". |
X |
variable name associated with the x-coordinate (e.g., long, longitude, Easting, X) across 'grid', 'bbs', and 'ebird' |
Y |
variable name associated with the x-coordinate (e.g., latitude, Northing, Y) across 'grid', 'bbs', and 'ebird' |
cellid |
column name(s) of the grid cell identifier |
yearid |
column name of the temporal identifier |
siteid |
column name(s) of the site identifier (e.g., BBS route, eBird checklists) |
obsid |
column name(s) of the observer identifier |
cell.covs |
column name(s) of the grid-level covariates |
drop.empty.cells |
IN DEVELOPMENT NOT RELIABLE FOR MODELING PURPOSES!!! logical Default FALSE If TRUE will remove all grid cells that have no count data (neither eBird nor bbs). |
site.covs |
column name(s) of the site-level covariates |
dev.mode |
logical if TRUE will return a reduced data set to use in development/debugging purposes. This method reduces the number of time units to 2, the maximum number of grid cells to 10, and 2 sites from each data source |
dir.outputs |
directory location of where to save the JAGAM.bugs model file created by mgcv::jagam(). Defaults to ./models/ |
save.neighborhood |
logical if TRUE will save the neighborhood network to file as "neighborhood.rds" at 'dir.outputs'. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.