Interactive Shiny app for cumulative snowfall by winter season (Oct–May) for multiple major US snowy cities, with historical comparison and optional statistical overlays. Choose a city from the dropdown to view that station’s data.
-
Install R dependencies (once):
source("BostonSnow/install.R") -
(Optional) Refresh the data from NOAA (multi-city):
cd BostonSnow && Rscript scripts/fetch_noaa_snow.R
This writes
snow_multicity.csvwith Boston, Buffalo, Chicago, Cleveland, Denver, Detroit, Milwaukee, Minneapolis–St Paul, New York, Philadelphia, Pittsburgh, Raleigh, Salt Lake City, Seattle, and Washington D.C. For Boston-only data you can still runscripts/fetch_noaa_boston.Rto getUSW00014739_2_24_25.csv. -
Start the app:
Rscript BostonSnow/startApp.R
Or from R:
shiny::runApp("BostonSnow"). Openhttp://localhost:80(or the port shown).
-
Create a free account at shinyapps.io.
-
Install the
rsconnectpackage and authorize your account:install.packages("rsconnect") rsconnect::setAccountInfo(name = "YOUR_ACCOUNT", token = "YOUR_TOKEN", secret = "YOUR_SECRET")
-
Push this repo to GitHub (including the CSV and the workflow below).
-
(Optional) For multiple cities in the dropdown, the app uses the multicity CSV. If you do not set
SNOW_DATA_URL, it will try the default URL from this repo (.../Snowfall/main/BostonSnow/snow_multicity.csv). To override or ensure fresh data, set an environment variable in the ShinyApps.io dashboard (your app → Settings → Environment variables):SNOW_DATA_URL=https://raw.githubusercontent.com/marcohamins/Snowfall/main/BostonSnow/snow_multicity.csv. Ensure the file exists (run the data workflow orfetch_noaa_snow.Rand push). -
Deploy from R (from the repo root):
rsconnect::deployApp("BostonSnow", appName = "boston-snowfall")
The app will read the CSV from that URL. When the GitHub Action updates the file (see below), the next app load will show the new data.
Data is refreshed automatically by GitHub Actions:
- Schedule: every Sunday at 12:00 UTC (see
.github/workflows/update-snow-data.yml). - Manual run: Actions tab → “Update snow data” → “Run workflow”.
- The workflow runs
BostonSnow/scripts/fetch_noaa_snow.R, which pulls GHCN daily data for multiple US cities from NOAA and overwritesBostonSnow/snow_multicity.csv. If the file changed, it is committed and pushed.
No redeploy of the Shiny app is needed: the app uses SNOW_DATA_URL, so updated data is used on next load.
- NOAA GHCN Daily — stations for Boston, Buffalo, Chicago, Cleveland, Denver, Detroit, Milwaukee, Minneapolis–St Paul, New York (Central Park), Philadelphia, Pittsburgh, Raleigh, Salt Lake City, Seattle, and Washington D.C. (Dulles).