Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.