#' # JDAT CONTENTS -----------------------------------------------------------
#' #' Descriptions of JDAT Contents
#' #'
#' #' A simple lookup table for
#' #' @format A data frame
#' #' \describe{
#' #' \item{level.1.name}{name of the top level list element}
#' #' \item{level.2.name}{name of the second-level list element}
#' #' \item{level.1.description}{description of the top level list element}
#' #' \item{level.2.description}{description of the second-level list element}
#' #' \item{class}{expected class of object}
#' #' \item{notes}{supplementary information}
#' #' \item{length}{if lowest level object is a vector, length of object}
#' #' \item{rows}{if object is array, number of rows}
#' #' \item{c}{if object is array, number of cols}
#' #' \item{s}{if object is 3-D array, number of slices}
#' #' }
#' jdat.contents <-
#' structure(
#' list(
#' level.1.name = c(
#' "C",
#' "Xg",
#' "Xg",
#' "Xg",
#' "Xp",
#' "Xp",
#' "Xp",
#' "Xp",
#' "Xp",
#' "Xp",
#' "Xp",
#' "Xp",
#' "Xp",
#' "Xp",
#' "Xp",
#' "indexing",
#' "indexing",
#' "indexing",
#' "indexing",
#' "indexing",
#' "indexing",
#' "indexing",
#' "indexing",
#' "indexing",
#' "indexing",
#' "gam",
#' "gam",
#' "gam",
#' "gam"
#' ),
#' level.1.description = c(
#' "matrix of observed counts",
#' "grid-level covariates or descriptors",
#' "grid-level covariates or descriptors",
#' "grid-level covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "site-level detection covariates or descriptors",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of indexes and scalars used for indexing within JAGS",
#' "list of data produced by mgcv::jagam",
#' "list of data produced by mgcv::jagam",
#' "list of data produced by mgcv::jagam",
#' "list of data produced by mgcv::jagam"
#' ),
#' level.2.name = c(
#' "",
#' "area",
#' "XY",
#' "prop",
#' "nobs",
#' "nmins",
#' "doy",
#' "effort_ha",
#' "obs_id",
#' "assistant",
#' "fyrroute",
#' "fyrbbs",
#' "noise",
#' "car",
#' "wind",
#' "nsites",
#' "ngrids",
#' "nyears",
#' "ngridsiteyear",
#' "gridsiteyear.id",
#' "nmaxgrids",
#' "sites.id",
#' "sites.ind",
#' "year.id",
#' "year.ind",
#' "pregam",
#' "jags.ini",
#' "jags.fn",
#' "jags.data"
#' ),
#' level.2.description = c(
#' "",
#' "area (m^2) of a given grid cell id",
#' "XY coordinates associated with grid cell id",
#' "proportion of the BBS route that falls within a given grid cell id",
#' "number of observers associated with the checklist_id",
#' "number of minutes reported by observer",
#' "day of year (where 1 = January 1 YYYY)",
#' "area searched (hectare)",
#' "observer identifier for eBird",
#' "wind index as provided by BBS (may be scaled)",
#' "wind index as provided by BBS (may be scaled)",
#' "wind index as provided by BBS (may be scaled)",
#' "wind index as provided by BBS (may be scaled)",
#' "wind index as provided by BBS (may be scaled)",
#' "wind index as provided by BBS (may be scaled)",
#' "number of unique sites (rteno, checklists) in a given dataset",
#' "number of unique grid cells in a given dataset",
#' "number of unique years in a given dataset",
#' "number of grids within which a BBS route falls ",
#' "number of grids within which a BBS route falls ",
#' "maximum number of grid cells within which a RTENO falls (max taken across all RTENO)",
#' "site identifier as given in original dataset",
#' "site identifier given from 1:nsites",
#' "year",
#' "site identifier given from 1:nsites",
#' "standard mgcv GAM setup data, as returned in jagam return list.",
#' "initialization data for smooth coefficients and smoothing parameters.",
#' "path of where the unedited JAGS GAM model was saved",
#' "list of arguments to be supplied to JAGS containing information referenced in model specification."
#' ),
#' class = c(
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "flat data",
#' "integer",
#' "integer",
#' "integer",
#' "flat data",
#' "array",
#' "integer",
#' "vector",
#' "vector",
#' "vector",
#' "vector",
#' "",
#' "",
#' "",
#' ""
#' ),
#' notes = c(
#' "bbs and ebird only",
#' "",
#' "",
#' "bbs only",
#' "eBird only",
#' "eBird only",
#' "eBird only",
#' "eBird only",
#' "eBird only",
#' "bbs only",
#' "bbs only",
#' "bbs only",
#' "bbs only",
#' "bbs only",
#' "bbs only",
#' "",
#' "",
#' "",
#' "bbs only",
#' "bbs only",
#' "bbs only",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' ""
#' ),
#' length = c(
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA,
#' NA
#' ),
#' rows = c(
#' "",
#' "number of sites",
#' "number of grid cells in dataset",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "number of sites",
#' "",
#' "",
#' "",
#' "number of sites",
#' "number of sites",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' ""
#' ),
#' columns = c(
#' "",
#' "number of years",
#' "2",
#' "number of grid cells in study area",
#' "number of years",
#' "number of years",
#' "number of years",
#' "number of years",
#' "number of years",
#' "number of years",
#' "number of years",
#' "number of years",
#' "number of years",
#' "number of years",
#' "number of years",
#' "",
#' "",
#' "",
#' "number of years",
#' "number of years",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' ""
#' ),
#' slices = c(
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "nMaxGrid",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' ""
#' ),
#' r = c(
#' "",
#' "s",
#' "g",
#' "",
#' "s",
#' "s",
#' "s",
#' "s",
#' "s",
#' "s",
#' "s",
#' "s",
#' "s",
#' "s",
#' "s",
#' "",
#' "",
#' "",
#' "s",
#' "s",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' ""
#' ),
#' c = c(
#' "",
#' "t",
#' "2",
#' "",
#' "t",
#' "t",
#' "t",
#' "t",
#' "t",
#' "t",
#' "t",
#' "t",
#' "t",
#' "t",
#' "t",
#' "",
#' "",
#' "",
#' "t",
#' "t",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' ""
#' ),
#' s = c(
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "nMaxGrid",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' "",
#' ""
#' )
#' ),
#' class = "data.frame",
#' row.names = c(NA,-29L)
#' )
#' usethis::use_data(jdat.contents, internal = FALSE, overwrite=TRUE)
#'
#' #' #' # REGION CODES ------------------------------------------------------------
#' #' #' #' Lookup Table for ISO Codes
#' #' #' #'
#' #' #' #'
#' #'
#' #' # grab ebird region codes
#' #' ebird.codes <- auk::ebird_states |>
#' #' rename()
#' #'
#' #' # grab bbs region codes
#' #' bbs.codes <- bbsAssistant::region_codes |>
#' #' dplyr::filter(!stringr::str_detect())
#' #'
#' #' setdiff(tolower(bbs.codes$State),toupper(iso.codes$name))
#' #'
#' #' iso.codes <- rnaturalearth::ne_states() |>
#' #' as.data.frame() |>
#' #' # tibble::column_to_rownames(name_en) |>
#' #' dplyr::select(name_en, iso_3166_2, iso_a2, , name_fr, name_es)
#' #'
#' #' # Add a column for eBird file identification
#' #'
#' #' # Add a column for BBS data subsetting
#' #' region.codes <- iso.codes
#' #'
#' #' usethis::use_data(region.codes, internal = FALSE, overwrite=TRUE)
#' # END DATA ----------------------------------------------------------------
#'
#'
#'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.