- R is a free software environment for statistical computing and graphics
- Excellent for data visualization
- Very active community
- ..but..
- Its a very personal experience
- Sharing is not easy
Neependra Khare
Shiny = R + interactivity + web + easy
library(shiny)
shinyUI(pageWithSidebar(
headerPanel('District Wise Rural Health Care Infrastructure'),
sidebarPanel(
selectInput("dataset", "Choose a States/Union Territory:",
choices = states),
selectInput("center", "Choose a center:",
choices = centers ),
downloadButton('downloadData', 'Download')
),
mainPanel(
plotOutput('plot'),
tableOutput('table')
)
))
shinyServer(function(input, output) {
datasetInput <- reactive({
state = input$dataset
center = input$center
df = read.csv("District_Wise_Rural_HealthCare_Infrastructure.csv")
sub = subset.data.frame(df, df$States.Union.Territory == state)
ndf = data.frame(District = sub$Name.of.the.District, Centers = eval(parse(text = paste0("sub$",center))))
})
output$table <- renderTable({
datasetInput()
})
})
District-Wise Availability Of Health Centres In India as of March 2011
Data Source
Running from self-hosted Shiny Server
Running from RStudio-hosted Shiny Server
Enrolment for Ph D/M.phil across India between 2001-09
Data Source
Running from self-hosted Shiny Server
Running from RStudio-hosted Shiny Server