-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathworksheet-3.R
46 lines (35 loc) · 1.22 KB
/
worksheet-3.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# worksheet 3
# leaflet in shiny
library(shiny)
# Basic shiny app example
# Define the user interface
ui <- navbarPage(title = 'Hello, Shiny World!')
# define the server component
server <- function(input, output){}
# Create the app
shinyApp(ui = ui, server = server)
ui <- fluidPage(h1("Hello Shiny!") # add a comma when you add more
# ...("...", height = 800)
)
# ui <- fluidPage(
# leafletOutput("map", height = 800),
# absolutePanel(top = 100, right = 10, draggable = TRUE,
# ...("dateinput", "Imagery Date", value = "2018-03-28"
# )
# ))
server <- function(input, output) {
# output$map <- ...({
# # leaflet map is defined here with tiles, initial view, and layer control options
# leaflet() %>%
# addTiles(group = "OSM") %>%
# addProviderTiles(...,
# group = "Modis",
# # options = providerTileOptions(time = ...)) %>%
# options = ...(time = "2018-01-05")) %>%
# setView(lng = -76.505206, lat = 38.9767231, zoom = 7) %>%
# addLayersControl(baseGroups = c("Modis", "OSM"),
# options = layersControlOptions(collapsed = FALSE)
# )
# })
}
shinyApp(ui, server)