-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
41 lines (39 loc) · 2 KB
/
ui.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
library(shiny)
shinyUI(fluidPage(
titlePanel(title=div(img(src="NPR-Logo.jpg"), " Member Station Explorer")),
tabsetPanel(
tabPanel(title = "Explorer",
fluidRow(
column(3,
radioButtons(inputId = "GeoView",
label = "Select Map:",
choices = c("National Station Map", "State-Level Station Map"),
selected = "National Station Map"
)),
column(2,
conditionalPanel(condition = "input.GeoView == 'State-Level Station Map'",
selectInput(inputId = "State",
label = "Select State:",
choices = unique(state_rollup$State),
selected = "Michigan",
selectize = TRUE)))),
leafletOutput("national_state_map", width = "100%", height = 550),
value = "national"),
tabPanel(title = "Road Trip Map",
fluidRow(column(3,
textInput(inputId = "Origin",
label = "From:",
value = "Washington, DC 20005, United States",
placeholder = "Washington, DC 20005, United States")),
column(3, textInput(inputId = "Destination",
label = "To:",
value = "Grand Rapids, MI 49534, United States",
placeholder = "Grand Rapids, MI 49534, United States")),
column(3, actionButton(inputId = "MapIt",
label = "Map My Route",
width = "100%"))),
tags$style(type='text/css', "#MapIt { width:100%; margin-top: 25px;}"),
leafletOutput("route_map", width = "100%", height = 550),
value = "roadtrip")
)
))