Skip to content

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

Notifications You must be signed in to change notification settings

WayneGitShell/GWSDAT

Repository files navigation

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 http://www.gwsdat.net.

Install and Run

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

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

Or install from CRAN:

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: http://www.gwsdat.net/gwsdat_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:

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.

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:

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:

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:

library("GWSDAT")
launchApp(createOptions())

GWSDAT input arguments can be included in the URL. This example here passes the location of the csv well and well coordinates data. This example here passes the location of an Excel GWSDAT Input data file. This functionality is still in development.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •