Skip to content

Add R Shiny app for NWFSC Survey Grid SST visualization#8

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/create-r-shiny-app-sst-analysis-again
Draft

Add R Shiny app for NWFSC Survey Grid SST visualization#8
Copilot wants to merge 3 commits intomainfrom
copilot/create-r-shiny-app-sst-analysis-again

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 26, 2026

Implements the requested Shiny app that renders NWFSC.Combo survey grid points on a Leaflet map colored by daily SST from NOAA ERDDAP.

app.R

  • Grid: loads surveyjoin::nwfsc_grid filtered to survey == "NWFSC.Combo", assigns sequential cell_id
  • Date picker: bounds populated at startup from rerddap::info() actual_range metadata; falls back to 1981-09-01 → today-2 if ERDDAP is unreachable
  • SST fetch: rerddap::griddap("ncdcOisst21Agg_LonPM180", ...) scoped to the grid bounding box; wrapped in eventReactive so it only fires on date change
  • Spatial join: rounds both datasets to 0.25° (native OISST resolution) for a fast left_join — no heavy spatial dependency needed
  • Map: colorNumeric(viridis::viridis(256)) circle markers + addLegend; click fires observeEvent showing Cell ID, lon/lat, and SST in both a Leaflet popup and a sidebar verbatimTextOutput
# Reactivity is scoped to date changes only
sst_data <- eventReactive(input$selected_date, {
  rerddap::griddap("ncdcOisst21Agg_LonPM180", url = erddap_url,
                   time = c(date_str, date_str),
                   longitude = c(lon_min, lon_max),
                   latitude  = c(lat_min, lat_max),
                   fields = "sst", fmt = "csv")
})

README.md

Replaces the placeholder with system prerequisites, package install commands (pak), and run instructions.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Create R Shiny app for NWFSC survey grid with SST data Add R Shiny app for NWFSC Survey Grid SST visualization Mar 26, 2026
Copilot AI requested a review from eeholmes March 26, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants