FULL commit of all files
This commit is contained in:
parent
c3d100ece3
commit
5197de1030
@ -1,3 +1,6 @@
|
||||
C:/Users/Lewy/Desktop/Wizualizacja danych/experiments.R="98FA7FC8"
|
||||
C:/Users/Lewy/Desktop/Wizualizacja danych/projekt_1_housing.R="B49036B1"
|
||||
C:/Users/Lewy/Desktop/Wizualizacja danych/projekt_2_housing.R="569F1072"
|
||||
/home/lewy/Downloads/projekt_1_housing.r="FDB568A6"
|
||||
/home/lewy/UE_house_prices_wizualizacja/projekt_1_housing.R="305524DE"
|
||||
/home/lewy/UE_house_prices_wizualizacja/projekt_1_housing_new.r="7F985654"
|
||||
/home/lewy/UE_house_prices_wizualizacja/test.R="0EE8C830"
|
||||
/home/lewy/UE_house_prices_wizualizacja/test_checkboxes.R="7F311D9A"
|
||||
/home/lewy/UE_house_prices_wizualizacja/webapp.R="7174B648"
|
||||
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
.Rproj.user
|
||||
.Rhistory
|
||||
.RData
|
||||
.Ruserdata
|
42
test.R
Normal file
42
test.R
Normal file
@ -0,0 +1,42 @@
|
||||
## Only run examples in interactive R sessions
|
||||
if (interactive()) {
|
||||
|
||||
ui <- fluidPage(
|
||||
checkboxGroupInput("variable", "Variables to show:",
|
||||
c("Cylinders" = "cyl",
|
||||
"Transmission" = "am",
|
||||
"Gears" = "gear")),
|
||||
tableOutput("data")
|
||||
)
|
||||
|
||||
server <- function(input, output, session) {
|
||||
output$data <- renderTable({
|
||||
mtcars[, c("mpg", input$variable), drop = FALSE]
|
||||
}, rownames = TRUE)
|
||||
}
|
||||
|
||||
shinyApp(ui, server)
|
||||
|
||||
ui <- fluidPage(
|
||||
checkboxGroupInput("icons", "Choose icons:",
|
||||
choiceNames =
|
||||
list(icon("calendar"), icon("bed"),
|
||||
icon("cog"), icon("bug")),
|
||||
choiceValues =
|
||||
list("calendar", "bed", "cog", "bug")
|
||||
),
|
||||
textOutput("txt")
|
||||
)
|
||||
|
||||
server <- function(input, output, session) {
|
||||
output$txt <- renderText({
|
||||
icons <- paste(input$icons, collapse = ", ")
|
||||
paste("You chose", icons)
|
||||
})
|
||||
}
|
||||
|
||||
shinyApp(ui, server)
|
||||
}
|
||||
|
||||
|
||||
|
28
test_checkboxes.R
Normal file
28
test_checkboxes.R
Normal file
@ -0,0 +1,28 @@
|
||||
## Only run examples in interactive R sessions
|
||||
if (interactive()) {
|
||||
|
||||
# Frontend
|
||||
ui <- fluidPage(
|
||||
# Checkboxes
|
||||
checkboxGroupInput("countries", "Choose countries:",
|
||||
choiceNames = unique(merged_df$geo),
|
||||
choiceValues = unique(merged_df$geo)
|
||||
),
|
||||
|
||||
# list of chosen
|
||||
textOutput("txt")
|
||||
)
|
||||
|
||||
# Backend
|
||||
server <- function(input, output, session) {
|
||||
|
||||
# Printer
|
||||
output$txt <- renderText({
|
||||
chosen_countries <- paste(input$countries, collapse = ", ")
|
||||
paste("You chose", chosen_countries)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
shinyApp(ui, server)
|
||||
}
|
10
webapp.R
10
webapp.R
@ -11,12 +11,13 @@ ui <- fluidPage(
|
||||
# Compound interest
|
||||
sliderInput("range", "Compound interest:",min = 0, max = 10, value = c(4,8)),textOutput("Compound interest slider"),
|
||||
|
||||
|
||||
# Checkboxes
|
||||
# tags$head(tags$style(HTML(".checkbox {margin-left:15px}"))),
|
||||
#tags$head(tags$style(HTML(".checkbox {margin-left:15px}"))),
|
||||
checkboxGroupInput("countries", "Chosen countries:",
|
||||
choiceNames = map_df$region,
|
||||
choiceValues = map_df$geo,
|
||||
selected = c("PL", "DE", "CZ"),
|
||||
choiceNames = c(map_df$region),
|
||||
choiceValues = c(map_df$geo),
|
||||
selected = c("PL", "CZ", "DE"),
|
||||
inline = TRUE,
|
||||
width = "75%"
|
||||
),
|
||||
@ -24,6 +25,7 @@ ui <- fluidPage(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
width=3
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user