Skip to content

Commit

Permalink
No, that was a silly idea
Browse files Browse the repository at this point in the history
This reverts commit 44f9e8d.
  • Loading branch information
alexwhan committed Feb 7, 2024
1 parent 44f9e8d commit f74b1db
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions dashboard/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ ui <- fluidPage(

textInput("timePeriod", "Time period (in hours)", value = 3),

uiOutput("responseUI")
plotOutput("responsePlot")
)

# Define server logic required to draw a histogram
server <- function(input, output, session) {

readData <- reactiveFileReader(1000,
session,
outputPath,
"../data/responses.csv",
read.csv,
header = FALSE)

getData <- function() {

dat <- readData()

currentTime <- Sys.time()
Expand All @@ -36,9 +35,8 @@ server <- function(input, output, session) {

}

output$responseUI <- renderUI({
if(file.exists(outputPath)) {
dat <- getData()
output$responsePlot <- renderPlot({
dat <- getData()

p <- ggplot(dat, aes(V2)) +
geom_bar() +
Expand All @@ -49,13 +47,7 @@ server <- function(input, output, session) {
labs() +
theme_minimal()

tagList(
plotOutput(p)
)} else {
tagList(
renderText("There are no responses yet")
)
}
return(p)
})
}

Expand Down

0 comments on commit f74b1db

Please sign in to comment.