Coder Social home page Coder Social logo

floodnetRfa

This package is in development and will change frequently.

Introduction

One objective of FloodNet is to provide Canadian engineers and hydrologists with a set of tools that allows them to perform flood frequency analysis (FFA) efficiently and accurately. To this end, a fork of the R-package CSHShydRology was created and the methods the recommended methods were added. Another tool available to the Canadian water science community is the R-package HYDAT that simplifies the communication between R and a local version of the National Water Data Archive. The R-package floodnetRfa is built on the top of these two R-packages and aims to create a coherent environment for carrying out the Floodnet recommendations. The package includes functions that are invoked directly from the R terminal or via a shiny app.

An overall presentation of the GUI is provided here and further descriptions of the package capabilities are presented here. Tutorials describing the functionality added to the CSHShydrology fork are available in the links below:

Installation

First, R itself must be installed, which can be download from the official website here. Once the R environment is set up, the two R-packages dependencies CSHShydRology and HYDAT must be installed. These dependencies and the floodnetRfa can be download manually from the previous GitHub pages. However, it is easier to use the R package devtools to perform these installations within the R terminal. The code below will install floodnetRfa and all its dependencies.

library(devtools)

## Install the dependencies
install_github('floodnetProject16/CSHShydRology')
install_github('CentreForHydrology/HYDAT')

## Install the package
install_github('floodnetProject16/floodnetRfa')

Note that the installation process may take some time. We also recommend downloading the most recent version of the HYDAT database (sqlite3) from the National Water Data Archive as it can be used directly as input data.

After the installation, the Graphical User Interface (GUI) can be launched from the R terminal using the following instructions.

library(floodnetRfa)
FloodnetApp()

If the user provides a file path to the function FloodnetApp, it creates instead a script that launches the GUI from the system terminal. For example, the code below creates a script on the desktop of the user 'JohnDoe'.

FloodnetApp(shortcut = "C:/Users/JohnDoe/Desktop/flood.cmd")

Supplementary material

Two companion datasets: gauged_sites.csv and descriptors.csv can be downloaded here. Their content has been collected during the FloodNet Project, and they illustrate the information needed by a user to perform FFA with floodnetRfa. Please note that the companion datasets are provided for demonstration purposes only. Some other supplementary materials related to floodnetRfa and the companion datasets are available here.

For developers

The development of the package used an HYDAT database dating of August 11th, 2019 that can be found here. For building the vignette and run the tests, the path of the database and companion dataset must be indicated in the file inst/config. See the example inst/config-example. When the package is built, the global variable can be loaded using the command.

source(system.file('config', package = 'floodnetRfa'))

and the vignette rebuilt using the command.

devtools::build_vignettes()

floodnetproject16's Projects

floodnetrfa icon floodnetrfa

Package implementing FloodNet recommendations for flood frequency analysis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.