Title: | A collection of shiny apps and modules to visualize/handle model results |
---|---|
Description: | A collection of tools which allow to manipulate and analyze code. |
Authors: | Jan Philipp Dietrich [aut, cre], Florian Humpenoeder [aut], Pascal Sauer [aut] |
Maintainer: | Jan Philipp Dietrich <[email protected]> |
License: | BSD_2_clause + file LICENSE |
Version: | 0.31.3 |
Built: | 2024-12-08 05:48:06 UTC |
Source: | https://github.com/pik-piam/shinyresults |
A collection of tools which allow to manipulate and analyze code.
Maintainer: Jan Philipp Dietrich [email protected]
Authors:
Florian Humpenoeder [email protected]
Pascal Sauer [email protected]
Useful links:
Report bugs at https://github.com/pik-piam/shinyresults/issues
Shiny app to analyze statistics collected with runstatistics
and merged with mergestatistics
appModelstats( files = c("https://www.pik-potsdam.de/rd3mod/magpie.rds", "https://www.pik-potsdam.de/rd3mod/remind.rds"), resultsfolder = NULL )
appModelstats( files = c("https://www.pik-potsdam.de/rd3mod/magpie.rds", "https://www.pik-potsdam.de/rd3mod/remind.rds"), resultsfolder = NULL )
files |
path to rds-files from which statistics should be read |
resultsfolder |
path to a folder containing model results of the corresponding runs |
Jan Philipp Dietrich
appResults allows to explore and visualize time series of modelling results.
appResults(cfg = getOption("appResults"), readFilePar = FALSE, ...)
appResults(cfg = getOption("appResults"), readFilePar = FALSE, ...)
cfg |
config-file containing information about one or more models on the items listed below. Usually you provide these settings in your .Rprofile as a list constructed as follows (to explore REMIND results please replace all occurrences of magpie with remind): url <- https://rse.pik-potsdam.de/data/magpie/results/rev1 options(appResults = list(MAgPIE = list(file = paste0(url, "/reduced_overview.rds"), resultsfolder=url, valfile=paste0(url, "/validation.rds"), username="xxx", password="yyy"))) file - Overview file in rds format containing a list of all runs available. To get access to all available filters use overview.rds (takes 15s longer to load) instead of reduced_overview.rds. resultsfolder - folder in which model results are stored in rds format. valfile - validation data. Can be a CSV/MIF file or rds file with a quitte object (saved with saveRDS). NULL by default; in this case the user can upload files directly in the tool. username - username to access "file" and "resultsfolder". password - password to access "file" and "resultsfolder". |
readFilePar |
read report data files in parallel (faster) (TRUE) or in sequence (FALSE) |
... |
additional information to overwrite one of the settings from the cfg directly: file, resultsfolder, valfile, username or password. |
Florian Humpenoeder, Jan Philipp Dietrich, Lavinia Baumstark, Pascal Sauer
version of appResults which is optimized to run on a local model folder. In contrast to appResults, appResultsLocal only requires the path to an output folder (with subfolders for each run).
appResultsLocal(folder = "output/", valfile = NULL)
appResultsLocal(folder = "output/", valfile = NULL)
folder |
output folder containing the runs to be analyzed as subfolders (e.g. folder "output" in a MAgPIE model folder) |
valfile |
Path to a validation file, preferably in rds format, but can also be provided as mif (in the latter case it will be converted to rds first). If not path is given the function will look automatically for an validation file in the output folder |
Jan Philipp Dietrich, Lavinia Baumstark
Groups variable names by groups based on the |+| separators given in the variable names
extractVariableGroups(x)
extractVariableGroups(x)
x |
a vector of variable names |
a data frame with variables and corresponding groups as columns.
Jan Philipp Dietrich
x <- c("a|+|1|+|aa","a|+|2|abc","a|+|1|+|bb","a|+|1|+|cc","a|+|3|+|aa","a|+|3|+|bb","b|2") shinyresults:::extractVariableGroups(x)
x <- c("a|+|1|+|aa","a|+|2|abc","a|+|1|+|bb","a|+|1|+|cc","a|+|3|+|aa","a|+|3|+|bb","b|2") shinyresults:::extractVariableGroups(x)
Shiny module which works together with modAreaPlotUI
to produce an area plot tab
modAreaPlot(input, output, session, report)
modAreaPlot(input, output, session, report)
input , output , session
|
Default input, output and session objects coming from shiny |
report |
A reactive containing the report to be visualized |
Jan Philipp Dietrich, Florian Humpenoeder
Shiny module which works together with modAreaPlot
to produce an area plot tab
modAreaPlotUI(id)
modAreaPlotUI(id)
id |
id of the filter |
Florian Humpenoeder, Jan Philipp Dietrich
Shiny module which works together with modFilterUI
to filter a data set based on user input
modFilter( input, output, session, data, exclude = NULL, showAll = FALSE, multiple = NULL, xdata = NULL, xdataExclude = NULL, order = NULL, name = NULL, preselectYear = NULL, preselectMinDate = NULL )
modFilter( input, output, session, data, exclude = NULL, showAll = FALSE, multiple = NULL, xdata = NULL, xdataExclude = NULL, order = NULL, name = NULL, preselectYear = NULL, preselectMinDate = NULL )
input , output , session
|
Default input, output and session objects coming from shiny |
data |
A reactive returning a data.table with observations in rows and filter options in columns |
exclude |
names of columns that should be not used as filter |
showAll |
FALSE | If set to TRUE all available filter are shown and the filter selector is hidden |
multiple |
vector with booleans for each filter defining whether multiple selections are allowed or not. If information is not provided it is assumed that multiple selection is allowed |
xdata |
additional data.tables which should be filtered by the same rules as data. If provided the format of the return value changes |
xdataExclude |
similar to exclude a vector of filters that should be ignored for xdata. Useful if xdata should only filtered for a subset of filters applied to data |
order |
order the filter should be listed (provided as a vector of filter names). Filter not listed here will be shown after the ones mentioned. |
name |
name used to identify the filter in the log |
preselectYear |
if provided the year filter will be preselected with this value |
preselectMinDate |
if provided the date filter will be preselected with this as lower value |
a reactive list with x as the filtered data and xdata containing the list of additional, filtered data element.
Jan Philipp Dietrich
Corresponding user interface to modFilter
to filter a data set based on user input
modFilterUI(id)
modFilterUI(id)
id |
id of the filter |
Jan Philipp Dietrich
Shiny module which works together with modLinePlotUI
to produce a line plot tab
modLinePlot(input, output, session, report, validation)
modLinePlot(input, output, session, report, validation)
input , output , session
|
Default input, output and session objects coming from shiny |
report |
A reactive containing the report to be visualized |
validation |
A reactive containing validation data to be shown |
Florian Humpenoeder, Jan Philipp Dietrich
Shiny module which works together with modLinePlot
to produce a line plot tab
modLinePlotUI(id)
modLinePlotUI(id)
id |
id of the filter |
Florian Humpenoeder, Jan Philipp Dietrich
Corresponding server logic to modRunSelectUI
to select modules runs for further analysis
modRunSelect( input, output, session, file, resultsfolder, username = NULL, password = NULL, readFilePar = FALSE )
modRunSelect( input, output, session, file, resultsfolder, username = NULL, password = NULL, readFilePar = FALSE )
input , output , session
|
Default input, output and session objects coming from shiny |
file |
report data. Can be a CSV/MIF file or rds file with a quitte object (saved with saveRDS). file can also be a vector of rds files. NULL by default; in this case the user can upload files directly in the tool |
resultsfolder |
folder in which MAgPIE run results are stored. File must come with a overview list called "files" |
username |
username to be used to access file and resultsfolder |
password |
password to access file and resultsfolder |
readFilePar |
read report data files in parallel (faster) (TRUE) or in sequence (FALSE) |
a reactive containing a merged data.frame containing results of selected runs
Jan Philipp Dietrich
Corresponding user interface to modRunSelect
to select modules runs for further analysis
modRunSelectUI(id)
modRunSelectUI(id)
id |
id of the filter |
Jan Philipp Dietrich