-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathui.R
92 lines (87 loc) · 4.05 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
library(shiny)
shinyUI(fluidPage(
tags$head(tags$link(rel="shortcut icon", href="favicon.png")),
titlePanel("Schelling Viz"),
sidebarPanel(
fileInput('file1', 'CSV File at the cell level',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv')),
checkboxInput('header', 'Header', FALSE),
radioButtons('sep', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
br(),
fileInput('file2', 'CSV File at the aggregated level',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv')),
checkboxInput('header', 'Header', FALSE),
radioButtons('sep', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
',')
),
mainPanel(
tabsetPanel(
tabPanel("Schelling Map",
fluidRow(
h3("Model Parameterization"),
tableOutput("paramtable"),
h3("Spatial Distributions"),
column(6,
sliderInput("step", label = "Simulation Step",
min = 0, max = 99, value = 0, step = 1, animate=T)),
column(6,
selectInput("var", label = "Quantity to map",
choices = c("Density" = "totalPop",
"% Greens" = "pctgreens",
"% Reds" = "pctreds",
"% Unsatisfied"="pctunsatisfied"
), selected = "pctgreens"))
),
plotOutput("map_cell"),
h3("Segregation measures"),
tableOutput("measurestable")),
tabPanel("Selection of Indicators",
h3("Measures correlation"),
plotOutput("plotindexes"),
h3("Redundant measures :"),
"Entropy (with dissimilarity), IsolationGreen (with ExposureGreenToRed),
IsolationRed (with ExposureRedToGreen), DeltaGreenRed (with dissimilarity),
ExposureGreenRed (with ExposureRedToGreen and DeltaRedGreen), DeltaRedGreen (with dissimilarity)",
h3("Selected measures' correlation :"),
plotOutput("plotindexes2"),
"Correlations are computed over 23550 runs of a schelling model.
Parameters are set with a Sobol suite"
),
tabPanel("Sensitivity Analysis",
h3("Sensitivity of segregation measures to parameter values"),
fluidRow(column(6,
selectInput("index", label = "Segregation Index",
choices = c("Moran's I" = "moran",
"Dissimilarity" = "dissimilarity",
"Exposure of Reds to Greens" = "exposureRedGreen",
"Entropy"="entropy",
"Isolation of Reds" ="isolationRedGreen",
"Share of Unsatisfied"="unsatisfiedRatio"
), selected = "moran")),
column(6,
selectInput("param", label = "Sensitivity to Parameter",
choices = c("Tolerance Level" = "ToleranceLevel",
"Vacancy Rate" = "VacancyRate"
), selected = "ToleranceLevel")),
column(6,
sliderInput("bins", label = "Number of bins for the parameter",
min = 2, max = 100, value = 10, step = 1))
),
# plotOutput("sensitivity1"),
plotOutput("sensitivity2"),
tableOutput("test"),
dataTableOutput("sensitivity")
)
))
))