Created
December 10, 2012 22:57
-
-
Save karthik/4254106 to your computer and use it in GitHub Desktop.
rgif data test
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
library(shiny) | |
library(ggplot2) | |
library(rgbif) | |
## Set up server output | |
load('/home/karthik/ShinyApps/rgbif/results.rda') | |
shinyServer(function(input, output) { | |
# define function for server plot output | |
output$gbifplot <- reactivePlot(function() { | |
print(gbifmap(results[input$spec])) | |
}) | |
output$cbt <- reactiveText(function(){ | |
}) | |
}) |
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
library(shiny) | |
# Define UI for application that plots random distributions | |
shinyUI(pageWithSidebar( | |
headerPanel("Maps via rgbif"), | |
sidebarPanel( | |
checkboxGroupInput("spec", "Species to map:", | |
c('Sharp shinned hawk (Accipiter erythronemius)' = "1", | |
"Dark eyed junco (Junco hyemalis)" = "2", | |
"Wood duck (Aix sponsa)" = "3", | |
'Bald eagle (Haliaeetus leucocephalus)' = "4", | |
'Carrion crow (Corvus corone)' = "5", | |
'Australian White Ibis (Threskiornis molucca)' = "6", | |
'Rosy Bee-eater (Merops malimbicus)' = '7' | |
), selected=c('Rosy Bee-eater (Merops malimbicus)')) | |
), | |
mainPanel( | |
h2("Species Distribution Map"), | |
plotOutput("gbifplot") | |
) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment