Code Monkey home page Code Monkey logo

r-swat's Introduction

R-SWAT

  • This is an interactive web-based app (written in R language with shiny package) for parallel parameter sensitivity, calibration, and uncertainty analysis with the Soil and Water Assessment Tool (SWAT). The official name of this app is R-SWAT (initially its name was SWATshiny)
  • The latest version of this app is always in the "master" branch.
  • If you would like to contribute to the code, have any suggestions, want to report errors, and have scientific collaboration, please contact me. The best way to contact me is via the google group specially designed for this app. Tutorial videos can be found in R-SWAT youtube channel
  • This is the first version, the app will be continued to be developed to serve the SWAT community. If you would like to contribute to the development of this app, please let me know. Together we can make this app much better as my time and R knowledge for this app are very limited.
  • This work has not been published in any journal. If you use this program for your publication and want to know the technical behind this app, please contact me.
  • A full documentation of R-SWAT with examples is in its wiki page.

Quick Start!

This app is designed for R beginner to advance users, you can use this app even you don't know anything about R.

To run this app, install latest R version 4.1.1 or newer version (If you use old version of R this might NOT work). Then install R studio. Then do the following steps:

  • Step 1: Click here to download the whole code of this app.
  • Step 2: Extract the downloaded file => Open RStudio
  • Step 3: Open the file ./R/loadPackages.R with R studio and install all packages list in this file (take 5-10 minutes).
  • Step 4: Open the file server.R or ui.R in R studio => then click the green button named Run App

Next time when you use this app just step 4 is needed or you can download the latest app and run it using the following commands

# Load shiny package
library(shiny)

# Automatically download this R-SWAT app (code + data) to your local machine and run it
runGitHub("R-SWAT", "tamnva")

# If you already manually downloaded it from the github, you can run the app using this command
# runApp("RSWAT_folder")

The following interface (attached screenshot on the end of this document) will appear and you can start using this app. Start with Tab '1. General setting' => '2. Parameter sampling' => and so on. On each tab there are subitems (e.g., in the first figure, start with '1. Working folder' => '2. TxtInOut folder' => and so on)

If you don't know which input is required, simply clicking to "Help?" at the right side of each respective input field. A sample of data for running this app can be downloaded from my GitHub repository, including:

  1. /data/TxtInOut: A TxtInOut folder and all associated files created by ArcSWAT
  2. swatParam.txt: An input file describing all SWAT parameters that you will need for the input field 1. General Setting => 4. Files with list of all SWAT Parameters
  3. obs_var_1.txt: Observed data file (streamflow) at the catchment outlet that you might need to input to evaluate the model performance 4.1. Objective function => 2. Get observed data files
  4. data/examples: you will see examples how to include new parameters in new files (e.g., this could be the case if you modify SWAT code)

R-SWAT user interface

r-swat's People

Contributors

tamnva avatar

Stargazers

Thanh Duc Dang avatar

Watchers

James Cloos avatar

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.