I have a dataset that has job postings in it. For some reason, my app doesn't update the table after the first update. For example if I choose Business Intelligence Analyst and CA as inputs, I get a table with said jobs. Yet, a change in inputs gives me a blank table. Any recommendations here?
jobsdata <- read.csv("D:/UMBC IS PHD Career/IS 725 Information Extraction/Code for Project/Project/finaljobdata.csv")
ui<- fluidPage(
titlePanel("Find an Information System related Job"),
sidebarLayout(
sidebarPanel(
selectInput(inputId = "jtitle",
label = "Choose a Job title:",
choices = unique(jobsdata$JobID),
selected = "System Analyst"),
selectInput(inputId = "place",
label = "Choose a Location:",
choices = unique(jobsdata$Stateid),
selected = "MO"),
actionButton(inputId = "press",
label="Update for Job list")
),
mainPanel(
tableOutput("jobs")
)
)
)
server<- function(input, output){
RV <- reactiveValues(data=jobsdata)
output$jobs<-renderTable({
RV$data
})
observeEvent(input$press,{
RV$data <-RV$data %>%
filter(JobID==input$jtitle & Stateid == input$place)
})
}
shinyApp(server = server, ui=ui)