An interactive R/Shiny app for exploring ground beetle (Carabidae) biodiversity across the National Ecological Observatory Network, from NEON data product DP1.10022.001 — Ground beetles sampled from pitfall traps.
Ground beetles provide useful community and disturbance context, but pitfall catch is an activity-density index rather than population density or a site-health score. The app explores observed richness, composition, seasonality, and change while keeping those limits visible. This is the carabid sibling of the NEON Small Mammal Tracker, sharing its Desert Data Labs house style and bundle-first data pattern.
▶️ Live app: https://tgilbert14.github.io/NEON-Ground-Beetle-Tracker/ — a landing page that launches the live dashboard (hosted on Posit Connect Cloud).✅ All 46 NEON terrestrial sites are bundled from real DP1.10022.001 records (
data/sites/*.rds), with the cross-site index, ordination and indicators precomputed todata/precomputed.rdsfor a near-instant boot. The tinydata-sample/beetle_demo.csvremains only as an offline fallback. Re-pull or extend the bundle anytime withscripts/refresh_data.R.
| Tab | What you see |
|---|---|
| Overview | Carabid community composition — species ranked by abundance and catch-per-100-trap-nights, plus "meet the beetles" natural-history cards. |
| Diversity | Hill numbers (q0/q1/q2 effective species), Hurlbert rarefaction (richness at equal sample size), and species accumulation across bouts. |
| Seasonality | Activity-density by month (catch per 100 trap-nights), overall or split by the top species. |
| Trends | Inter-annual catch-per-effort with a fitted OLS trend line and a plain-English verdict (rising / declining / flat, with %/yr and p-value) — the insect-trend view. |
| Biogeography | A national map sized by carabid richness — or by a chosen species' local abundance (a range map); a PCoA community ordination (Bray–Curtis) showing which site×year communities resemble each other; an indicator-species table (Dufrêne–Legendre IndVal) naming each site's signature beetles; and a sortable comparison table. |
| About | Data product, methods, and the live data-source note. |
Pick a site and it loads automatically (the date window snaps to that site's real coverage); tap a marker on the map to jump there, or hit Surprise me for a random site. Choose a Compare with site to overlay any second site on the Diversity and Seasonality charts — a prairie next to a forest.
- Effort-normalised abundance. Counts are expressed as catch per 100 trap-nights (effort = the sum of unique plot × bout trap-night totals), so sites and windows with different sampling effort compare fairly. This also absorbs NEON's protocol changes (4→3 traps/plot in 2018; 10→6 plots/site in 2023).
- Diversity — Hill numbers (Hill 1973; Jost 2006); individual-based rarefaction with an analytic SD (Hurlbert 1971; Heck et al. 1975); sample-based species accumulation averaged over random bout orders (Gotelli & Colwell 2001).
- Taxonomy — the real bundle reconciles parataxonomist IDs with the
authoritative expert taxonomist IDs (
assemble_beetles()inR/helpers.R). - Species vs. higher taxa (QA/QC). NEON records aren't all named to species —
some stop at genus (
Bembidion sp.) or family (Carabidae). Counting those as distinct species inflates richness and diversity, so every richness-type metric (richness, Hill numbers, rarefaction, accumulation, ordination, indicator species) uses species-level records only — keyed on NEON's authoritativetaxonRank(carried from the expert-taxonomist table), with a scientific-name test (is_species_level()) as backstop when rank is absent — while total abundance still counts every beetle trapped. The Diversity tab reports how many records are excluded. Design ref: Hoekman et al. 2017, Ecosphere 8(4):e01744; indicator value: Dufrêne & Legendre 1997.
install.packages(c(
"shiny", "bslib", "bsicons", "shinyjs", "shinycssloaders",
"plotly", "dplyr", "tidyr", "RColorBrewer", "leaflet", "DT", "htmltools"
))
# neonUtilities is OPTIONAL — only for the live-fetch path / refresh script:
# install.packages("neonUtilities")
shiny::runApp()The app opens to a splash; pick a state + site and Load this site, or open the Biogeography map and tap a marker. All 46 bundled sites load instantly.
Rscript scripts/refresh_data.RThis downloads DP1.10022.001 per site, assembles the carabid long table (expert-ID
reconciliation + per-trap-night effort), and writes data/sites/<SITE>.rds. The app
prefers a real bundle over the demo automatically, and the source badge turns green.
global.R libraries, theme, data loaders, national site index, lazy NEON fetch
ui.R bslib dashboard (sidebar + hero + tabs)
server.R data flow and all outputs
R/helpers.R analytical engine (Hill numbers, rarefaction, accumulation, assemble_beetles)
R/site_metadata.R site code -> name / state / domain / coords / bio
scripts/refresh_data.R build the per-site beetle bundle from NEON
data/sites/<SITE>.rds bundled per-site carabid data (real NEON — 46 sites)
data/precomputed.rds cached cross-site index + ordination + indicators (fast boot)
data-sample/beetle_demo.csv offline demo fallback (NOT real NEON data)
www/styles.css theme CSS
manifest.json Posit Connect Cloud deploy manifest (bundle-only)
Tucson, AZ · custom data apps & analytics → desertdatalabs@gmail.com Data: NEON DP1.10022.001. Not affiliated with NEON, Battelle, or the NSF. An educational data-exploration tool.