Commit 043f6b13 authored by Stephanie's avatar Stephanie

now working settup

parent 2df58055
......@@ -9,21 +9,6 @@
library(shiny)
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
# generate bins based on input$bins from ui.R
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
# draw the histogram with the specified number of bins
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
server <- function(input, output) {
set.seed(122)
}
)
......@@ -3,7 +3,7 @@ library(shiny)
library(shinydashboard)
library(leaflet)
ui<-dashboardPage(
ui <- dashboardPage(
dashboardHeader(title="CoCoVisR"),
dashboardSidebar(
sidebarMenu(
......@@ -30,9 +30,8 @@ ui<-dashboardPage(
h2("This is the Dashboard"),
fluidRow(
box( title="Histogram",
#background="maroon",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
plotOutput("plot1", height = 250)),
box(title="Map",
......@@ -40,8 +39,14 @@ ui<-dashboardPage(
solidHeader = TRUE,
collapsible = TRUE,
plotOutput("plot1", height = 250)),
box(plotOutput("plot3", height = 250)),
box(plotOutput("plot4", height = 250))
box(title="Timeline",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,plotOutput("plot3", height = 250)),
box(title="Linechart",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,plotOutput("plot4", height = 250))
#box(
# title = "Controls",
#sliderInput("slider", "Number of observations:", 1, 100, 50)
......@@ -58,9 +63,9 @@ ui<-dashboardPage(
))
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
#server <- function(input, output) {
# set.seed(122)
#histdata <- rnorm(500)
#output$plot1 <- renderPlot({
#data <- histdata[seq_len(input$slider)]
......@@ -76,5 +81,5 @@ server <- function(input, output) {
#m <- addMarkers(m,lng=longitude[x], lat=latitude[x]) #addPolylines does not work
#x=x+1}
#m
}
shinyApp(ui,server)
#}
#shinyApp(ui, server)
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
# Define server logic required to draw a histogram
server(function(input, output) {
output$distPlot <- renderPlot({
# generate bins based on input$bins from ui.R
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
# draw the histogram with the specified number of bins
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
})
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fillPage(
# Application title
titlePanel("Old Faithful Geyser Data"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment