Repo is organized to lead the user through the process of updating the models for the ice jam monitoring project.
01_dataRetrieval.rPulls data from NWIS AQ, and other sources02_dataAggegator.rPieces all data to a large table03_dataCleaning.rPlotly tooltip to find major event dates, filtering techniques04_exploratoryPlotting.rHas reach-multiplots prelim regressions, screening etc...05_autoPullAndPlot.rPull recent nwis data and plot against gam models06_fitParamBuild.pyModel and save fit params07_modelCompareTableStats.rBuild table, return stats on params, find best fit08_pubModels.rBuild final table of model results and observed data09_pubPlots.rBest fit models and plots ready for publication0100_modelResults.pyBuild and save json of model parameters and site info
-
Data pulled from:
- NWIS through dataRetrieval R package
- Aquarius time series web portal
-
Data filtered by:
- Non-navigational Seasons (Nov - Apr) from Fall 2012 - Spring 2023,
- For water
${ \ temps> 1 ^{\deg} \ C }$ - Major events that were left in the dataset after these filters were
applied were found by inspection using plotly tooltip
and further screened in R
-
Data modelled with:
- Non-linear least squares
scipy.optimize.curvefitfunction in sciPy library used to model Stage (${S}$ ) - Polynomial for Lock 9 :
${S = a \times Q^{b} + c } $
- Linear model for Lock 8, Freeman's Bridge, and Rexford:
${S = S_{DS} + a \times Q + b }$
- Non-linear least squares
-
Used
ifnnCleanData.csvcleaned up data set for all models: in../../iceJamData/csvData/CompleteSets -
Saved
publicationModels.csvas complete table with best-fit models and recently (12/23-03/24) observed stages in "../../iceJamData/csvData/"
-
A table with seven models per site run against recent data was saved as
bestFitsInpsect.csvin../../iceJamData/csvData/fitInspection/ -
./ancillary/- The ancillary folder contains code that was used for the exploration and fitting of data for the ice jam modeling project, but that was ultimately unused in the final publication-ready models and plots.
(last updated on 03/06/2024):
L9: [a, b, c] = [8.738932e-02, 0.50406682, 10.784357492]
L8: [a, b] = [5.99570998e-05, -1.48471579e-01]
FB: [a, b] = [4.763305e-05, -0.13590172]
RX: [a, b] = [2.376977e-05, -0.08692065]- Lock 9
- 01354230
- 42°52'41.8"N 74°02'26.7"W
- Lock 8
- 01354330
- 42°49'41.37"N 73°59'25.34"W
- Freeman's Bridge
- 01354500
- 42°49'49.9"N 73°55'50.7"W
- Rexford
- 01355475
- 42°51'04.0"N 73°53'14.1"W
- Lock 7
- 01356000
- 42°48'15.1"N 73°50'51.6"W
-
00065 (Stage)
-
00060 (Discharge)
-
00010 (Water Temp)
-
00020 (Air Temp)