Code and data
Public R packages, installable and documented. Each runs on any dataset in the documented shape — not only mine.
All of these install from GitHub and run on other people’s data — none hard-code my study system. Each does one part of the chain: read the survey archive, build the covariates, fit the model, draw the figure.
remotes::install_github("chross22/taupatch")
Models
Builds monthly habitat suitability models for high-abundance zooplankton patches ("tau-patches"), where a patch is defined by a species-specific abundance threshold. Point-and-click Shiny app or YAML-driven package.
remotes::install_github("chross22/taupatch")
config <- load_config("study.yaml")
run_taupatch_app() # or use the configFits a set of candidate detection functions to line-transect distance data and compares them on the quantities that actually matter for abundance — effective strip half-width and its coefficient of variation — rather than on the Akaike information criterion alone. Includes the gamma key that Distance::ds() does not offer.
remotes::install_github("chross22/dsfit")
sw <- sweep_models(
model_set(key = c("hn", "hr")),
data = detections
)Survey data
Reads marine mammal survey data recorded in the North Atlantic Right Whale Consortium (NARWC) database format and puts it into a single, predictable shape, reconciling the column names that different survey programs use for the same thing.
remotes::install_github("chross22/narwcr")
dat <- read_narwc("extract.csv")
narwc_column_mapping(dat)Turns aerial line-transect survey data from the NARWC database into effort segments ready for Distance and dsm — each with a location, an amount of effort, and counts of what was seen along it. Where the survey recorded declination angles, perpendicular distances come out in the shape a detection function wants.
remotes::install_github("chross22/distsamp")
dat <- read_narwc(path)
validate_narwc(dat) # never stops
segs <- segment_survey(dat, 5)Environmental covariates
Fetches Copernicus Marine and other ocean and atmosphere data and joins it to point observations in space and time, at the source data's own resolution. The join is a general spatiotemporal nearest-feature match, so either side may be the species data.
remotes::install_github("chross22/datamatch")
sst <- accessCopernicus("thetao", bb)
pts <- matchData(sightings, sst)
source_of(pts)Computes derived oceanographic covariates from gridded ocean data — spatial and temporal gradients, time-integrated variables, calendar-unit lags, eddy kinetic energy, Lyapunov exponents, and distances to fronts and shore.
remotes::install_github("chross22/derivoce")
grad <- horizontal_gradient(sst)
shore <- distance_to_shore(grid)Visualization
Turns fitted models into manuscript-ready figures. Every effect curve is paired with a rug of the raw data stacked directly above it, so a bend in the curve can be read against how much data actually supports it. GAMs via gratia, everything else via marginaleffects.
remotes::install_github("chross22/fancyfx")
fit <- mgcv::gam(y ~ s(sst), data = d)
plotEffects(fit, d, "sst")Skills
Expertise: R · Python · git · bash / Unix shell · Linux Experience: MATLAB · Java · ArcGIS · R Shiny · Leaflet Limited experience: JavaScript · HTML · CSS · SQL