Skip to content

Commit

Permalink
added link to app in README
Browse files Browse the repository at this point in the history
  • Loading branch information
gluc committed Jan 10, 2016
1 parent 74181a2 commit 3784d89
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 45 deletions.
4 changes: 2 additions & 2 deletions R/visualize.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ GetTooltip <- function(x) {
if (x$isRoot) {
dm <- GetDecisionMakers(x)
if (length(dm) > 1) {
browser()
tt <- paste(dm, collapse = ", ")
tt <- paste0("Decision Makers: ", tt, "\n")
}
Expand All @@ -99,7 +98,8 @@ GetTooltip <- function(x) {
"consistency",
"priority",
"preferenceFunction",
"decision-makers")]
"decision-makers",
"score")]
if (length(myfields) > 0) {
mylist <- as.list.environment(x)[myfields]
props <- as.yaml(mylist)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ The basic workflow with this package is:

For more information, see the package vignette using `vignette("AHP car example")`

There is also a Shiny app that complements that package. You can try it out at http://ipub.com/apps/ahp-app/

# Example

```{code = R}
Expand Down
79 changes: 36 additions & 43 deletions inst/gui/shiny/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,61 @@ library(DiagrammeR)
# Define UI for application that draws a histogram
shinyUI(



navbarPage(
useShinyjs(),
theme = shinytheme("flatly"),
"AHP",
tabPanel(
"Model",



mainPanel(
fluidPage(
actionButton("showUpload", "Load", icon = icon("upload")),
downloadButton('downloadFile', 'Save'),
br(),
uiOutput("uploadFileOutput"),
br(),


aceEditor("ace", mode = "yaml", theme = "clouds", value = "define ahp model here")
useShinyjs(),
fluidRow(
column(2, actionButton("showUpload", "Load", icon = icon("upload"))),
column(2, downloadButton('downloadFile', 'Save'))
),
fluidRow(uiOutput("uploadFileOutput")),
fluidRow(aceEditor("ace", mode = "yaml", theme = "clouds", value = "define ahp model here"))
)
)
),

tabPanel(
"Visualize",
grVizOutput("visualizeTree"),
mainPanel(grVizOutput("visualizeTree")),
value = "visualizePanel"
),

tabPanel(
"Analyze",
mainPanel(
fluidPage(
sidebarLayout(
sidebarPanel(
radioButtons(
inputId = "ahpmethod",
label = "AHP Priority Calculation Method: ",
choices = c("Eigenvalues", "Mean of Normalized Values", "Geometric Mean"),
selected = "Eigenvalues"
),

radioButtons(
inputId = "sort",
label = "Sort Order: ",
choices = c("Total Priority", "Priority", "Original"),
selected = "Total Priority"
),

radioButtons(
inputId = "variable",
label = "Variable: ",
choices = c("Total Contribution", "Priority", "Score"),
selected = "Total Contribution"
),
sidebarLayout(
sidebarPanel(
radioButtons(
inputId = "ahpmethod",
label = "AHP Priority Calculation Method: ",
choices = c("Eigenvalues", "Mean of Normalized Values", "Geometric Mean"),
selected = "Eigenvalues"
),

uiOutput("decisionMaker"),
textInput(inputId = "cutoff", label = "Filter by weight contribution: ", value = "0"),
textInput(inputId = "level", label = "Filter n levels: ", value = "0")
radioButtons(
inputId = "sort",
label = "Sort Order: ",
choices = c("Total Priority", "Priority", "Original"),
selected = "Total Priority"
),
mainPanel(formattableOutput("table"))
)

radioButtons(
inputId = "variable",
label = "Variable: ",
choices = c("Total Contribution", "Priority", "Score"),
selected = "Total Contribution"
),

uiOutput("decisionMaker"),
textInput(inputId = "cutoff", label = "Filter by weight contribution: ", value = "0"),
textInput(inputId = "level", label = "Filter n levels: ", value = "0")
),
mainPanel(formattableOutput("table"))
)
),
value = "analysis"
Expand All @@ -94,6 +85,8 @@ shinyUI(
uiOutput("fileFormat")
)
),
position = "fixed-top",
theme = shinytheme("flatly"),
id = "navbar"
)

Expand Down

0 comments on commit 3784d89

Please sign in to comment.