Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/WayneGitShell/GWSDAT

GroundWater Spatiotemporal Data Analysis Tool (GWSDAT) R-Shiny implementation.
https://github.com/WayneGitShell/GWSDAT

contamination-detection groundwater-flow plume shiny spatio-temporal-analysis

Last synced: 8 days ago
JSON representation

GroundWater Spatiotemporal Data Analysis Tool (GWSDAT) R-Shiny implementation.

Awesome Lists containing this project

README

        

# GWSDAT

This is the R Shiny application of the GroundWater Spatiotemporal Data Analysis Tool (GWSDAT) for the analysis of groundwater monitoring data. This package can be run locally or can be deployed on a Shiny Server. For more background see .

## Install and Run

For latest development version, install from github using the `devtools` R package:

```r
devtools::install_github("WayneGitShell/GWSDAT")
options(shiny.useragg = FALSE) #to avoid artefacts in spatial plots
GWSDAT::launchApp()
```

Or install from CRAN:

```r
install.packages("GWSDAT")
options(shiny.useragg = FALSE) #to avoid artefacts in spatial plots
GWSDAT::launchApp()
```
A couple of example data sets are already pre-loaded. See full options for interactive data input in section 6.1 of the GWSDAT user manual:

## Data input directly from R.

Install the package as above and pass a `GWSDAT_Options` list to `launchApp()`. The method `GWSDAT::createOptions()` creates this `GWSDAT_Options` list. The `GWSDAT_Options` list must either contain the `WellData` and `WellCoords` data.frames:

```r
library(GWSDAT)
# Define GWSDAT_Options
opt <- createOptions("Site Name")
opt$WellData <- read.csv(system.file("extdata","ComprehensiveExample_WellData.csv",package="GWSDAT"))
opt$WellCoords <- read.csv(system.file("extdata","ComprehensiveExample_WellCoords.csv",package="GWSDAT"))
launchApp(opt)
```
or the location of input csv files `WellDataFilename` and `WellCoordsFilename`.

```r
library("GWSDAT")
# Define GWSDAT_Options
GWSDAT_Options <- createOptions("Example Site")
GWSDAT_Options$WellDataFilename <- system.file("extdata","BasicExample_WellData.csv",package="GWSDAT")
GWSDAT_Options$WellCoordsFilename <- system.file("extdata","BasicExample_WellCoords.csv",package="GWSDAT")
launchApp(GWSDAT_Options)
```

## Save & Load Session File

Inside the Shiny app, a data analysis session can be saved inside the Analysis panel, in the top navigation bar under _More_ -> _Save Session_. This creates a `.rds` file that can be loaded with the `launchApp()` method:

```r
GWSDAT::launchApp(session_file = "path_to_file.rds")
```

## Deploy on Posit Connect

Create the file `app.R` with the following content and publish to Posit Connect server in the usual manner:

```r
library("GWSDAT")
launchApp()
```

## Beta: Deploy as API on Posit Connect
Create the file `app.R` with the following content and publish to Posit Connect server in the usual manner:

```r
library("GWSDAT")
launchApp(createOptions())
```
GWSDAT input arguments can be included in the URL. This example [here](https://stats-glasgow.shinyapps.io/GWSDATURL/?WellDataFilename=https://raw.githubusercontent.com/WayneGitShell/GWSDAT/master/data/BasicExample_WellData.csv&WellCoordsFilename=https://raw.githubusercontent.com/WayneGitShell/GWSDAT/master/data/BasicExample_WellCoords.csv) passes the location of the csv well and well coordinates data.
This example [here](https://stats-glasgow.shinyapps.io/GWSDATURL/?ExcelDataFilename=https://github.com/WayneGitShell/GWSDAT/raw/GWWellReport/inst/extdata/Basic_Example.xlsx) passes the location of an Excel GWSDAT Input data file.
This functionality is still in development.