-
-
Save sahooa/9031b2eb5d75e57ea301b954dcb5c19d to your computer and use it in GitHub Desktop.
First Shiny NYCSD project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyServer(function(input, output){ | |
dataInput1 <- reactive({ | |
cor(empl %>% | |
filter (region == input$in1) %>% | |
select (empl,gdp,population,avg_temp,co2),method="pearson",use ="na.or.complete") | |
}) | |
output$plot1 <- renderPlot({ | |
corrplot(dataInput1(), method = input$param1) | |
}) | |
dataInput2 <- reactive({ | |
cor(empl %>% | |
filter (country == input$in2) %>% | |
select (empl,gdp,population,avg_temp,co2),method="pearson",use ="na.or.complete") | |
}) | |
output$plot2 <- renderPlot({ | |
corrplot(dataInput2(), method = input$param2) | |
}) | |
output$gvis <- renderGvis({ | |
gvisMotionChart(empl, | |
idvar = "country", | |
timevar = "year", | |
xvar = "gdp", | |
yvar = "empl", | |
sizevar ="population", | |
colorvar = "region", | |
options=list(width="1000px", height="600px")) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment