Skip to content

Shiny app for quick data screening & flood frequency analysis on HYDAT dataset (Water Survey Canada streamflow data). The name CFA is in recognition of the old Consolidated Frequency Analysis tool published in the MS-DOS era but the two have no relation.

License

Notifications You must be signed in to change notification settings

nickyrong/ShinyCFA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authors


Overview

ShinyCFA is currently available at: https://nickrongkp.shinyapps.io/ShinyCFA/ Please note that it is hosted with low limit data plan and be conservative with your usage (i.e. close the tab/browser when not using the app), thank you.

This app allows the user to enter a Water Survey of Canada (WSC) station ID and access streamflow data from the Hydat Database. The data can be summarized in tabular or graphical formats and flood frequency analysis (FFA) can also be performed using a variety of distributions.

The functionality to extract data from the Hydat Database in this app is provided by the tidyhydat package.


App Functionality:

Currently the app allows the user to:

  • View the locations of Water Survey of Canada (WSC) hydrometric stations (non-searchable map)
  • Select a hydrometric station and summarize streamflow data in a table format (daily, monthly, yearly) and download the summarized data
  • View a hydrometric station historical daily hydrograph in an interactive graph
  • View a hydrometric station hydrological regime
  • Run a Flood Frequency Analysis on the annual daily or instantaneous maximum streamflow series using various distributions

Frequency Analysis Methods:

The frequency distribution(s) are fitted using L-moments method from R package lmom by J. R. M. Hosking. L-moments of the sample data are calculated and distribution parameters are then estimated from the calculated L-moments.

Return periods of annual maximum discharge are calculated using the Weibull formula: Tr = (N+1) / m where N is the sample size and m is the rank. Probability of Non-exceedance is the inverse of return period: P = 1 / Tr. The frequency distribution plot x-axis has been transformed into probabilistic scale: η = −log(−log(P)) = −log[−log(1 − 1/Tr)] where η is the reduced variate.

Further readings:

  • Hosking, J., & Wallis, J. (1997). Regional Frequency Analysis: An Approach Based on L-Moments. Cambridge: Cambridge University Press. doi:10.1017/CBO9780511529443
  • Makkonen, L. (2006). Plotting Positions in Extreme Value Analysis, Journal of Applied Meteorology and Climatology, 45(2), 334-340. doi:10.1175/JAM2349.1

License

Copyright © 2022 Nick Rong & Nate Smith

Released under the License: MIT

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Please note that this project is released with a Contributor Code of Conduct.By participating in this project you agree to abide by its terms.

Also note that this project was created under a learning objective and it is provided in the event it is useful to others. Accordingly, it is not necessarily under active development.

About

Shiny app for quick data screening & flood frequency analysis on HYDAT dataset (Water Survey Canada streamflow data). The name CFA is in recognition of the old Consolidated Frequency Analysis tool published in the MS-DOS era but the two have no relation.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages