Created
          February 2, 2014 21:51 
        
      - 
      
- 
        Save dkincaid/8775464 to your computer and use it in GitHub Desktop. 
    Tycho data Shiny web app
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | library(shiny) | |
| fileUrl <- url("http://s3.amazonaws.com/data-excursions/states_cases.Rda") | |
| load(fileUrl) | |
| diseases <- unique(as.character(states_cases$disease)) | |
| states <- unique(as.character(states_cases$state)) | |
| shinyServer(function(input, output) { | |
| output$diseaseSelect <- renderUI({ | |
| selectInput("disease", "Disease", diseases) | |
| }) | |
| output$textDisplay <- renderText({ | |
| paste0("You selected ", input$disease) | |
| }) | |
| } | |
| ) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | library(shiny) | |
| shinyUI(pageWithSidebar( | |
| headerPanel("Tycho Data Exploration"), | |
| sidebarPanel( | |
| htmlOutput("diseaseSelect") | |
| ), | |
| mainPanel( | |
| textOutput("textDisplay") | |
| ) | |
| ) | |
| ) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment