Warning: This project is still under development and is not fully mature
Draft documentation website on gh-pages
Code of the Shiny app developed for the FlomKart project
You can run the "demo" version of the app directly from GitHub with those commands:
# First install the supporting functions
# Make sure you have devtools installed "install.packages('shiny')" and then:
library(devtools)
install_github("NVE/FlomKart_ShinyApp", ref = "demo")
# If you don't have the R Shiny package installed:
install.packages('shiny')
# Then load Shiny and run from Github:
library(shiny)
runGitHub("FlomKart_ShinyApp", "NVE", ref = "demo")
To have a copy on your computer, first clone the git repository. Then open the FlomKart_ShinyApp R project and download both full NetCDF files to FlomKart_ShinyApp/data/.
Finally use runApp()
from the working directory:
# First clone the repository with git. You should have cloned it as
# Download the data either via the following links, or with R using the code provided below:
# https://www.dropbox.com/s/yyhbts8er96iggb/flood_database.nc?dl=0
# https://www.dropbox.com/s/ou2sxl4hsm0j9rs/gof.nc?dl=0
dl_from_dropbox <- function(x, key) {
require(RCurl)
bin <- getBinaryURL(paste0("https://dl.dropboxusercontent.com/s/", key, "/", x),
ssl.verifypeer = FALSE)
con <- file(paste("../data/", x, sep = ""), open = "wb")
writeBin(bin, con)
close(con)
message(noquote(paste(x, "read into", "~/FlomKart_Shiny/data")))
}
dl_from_dropbox("flood_database.nc", "yyhbts8er96iggb")
dl_from_dropbox("gof.nc", "ou2sxl4hsm0j9rs")
# Then use runApp().
runApp()
Required packages are specified in global.r and should get installed automatically if missing.
We read the NetCDF files created by the FlomKart repo and visualize the results via an R Shiny app. This helps better finding problems in the creation of the NetCDF files and is also a practical way to graphically explore the results. We will improve the mapping features in order to better understand how floods statistics may be regionalized.
Please try to follow those guidelines for filing issues:
One issue for one purpose. Don't add more than one bug, feature request, documentation request, question, etc.. on to the same issue.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.