Skip to content

Instantly share code, notes, and snippets.

@amy17519
Created August 6, 2016 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amy17519/25ac6aa35a458c7b2748926bbd228195 to your computer and use it in GitHub Desktop.
Save amy17519/25ac6aa35a458c7b2748926bbd228195 to your computer and use it in GitHub Desktop.
barInput <- reactive({
newboroughkid<-boroughkid[,c("Borough",input$yvar)]
newboroughkid<-newboroughkid[newboroughkid$Borough %in% input$boroughbar,]
newboroughkid
})
output$bar <- renderGvis({
gvisColumnChart(barInput(),options = list(title="Are There Enough Seats at Pre-Kindergartens",hAxes="[{title:'Borough',
titleTextStyle: {color:'blue'}}]"
, vAxes="[{title:'Number of Eligible Kids',
titleTextStyle: {color: 'blue'}}]",
width=800,height=500,gvis.editor="Customize this graph!"))
tabPanel("Pre-K Statistics",fluidPage(
sidebarPanel(width =3,
checkboxGroupInput("boroughbar", h4("Borough:"),
c('All Boroughs'="All Boroughs",'Bronx' = "Bronx",'Brooklyn' = "Brooklyn",
'Manhattan' = "Manhattan",'Staten Island' = "Staten Island",
'Queens' = "Queens"),selected=c('Bronx','Brooklyn','Manhattan',
'Staten Island','Queens')),
checkboxGroupInput("yvar", h4("Attribute:"),c('Total Seats Available'="Seat Avalibility",
'Est. Number of Kids in 2014'="2014 Estimate",
'Number of Kids 2010 Census'="2010 Census"),
selected= c("Seat Avalibility","2014 Estimate","2010 Census")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment