-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
109 lines (77 loc) · 4.54 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
library(shiny)
library(leaflet)
library(ggplot2)
library(sf)
library(dplyr)
library(DT)
library(maps)
library(rgdal)
library(RColorBrewer)
library(ggspatial)
# Define UI for application that draws a histogram
shinyUI(
navbarPage("Cambridge Blue Bikes", id = "nav",
tabPanel("Map",
div(class = "outer",
tags$head(
# Include our custom CSS
includeCSS("styles.css")
),
leafletOutput("mymap", height ="100%", width = "100%"),
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = 100, left = "auto", right = 25, bottom = "auto",
width = "20%", height = "auto",
h4(strong("Instructions")),
#selectInput("user_type", label = "User Type",
# choices = c("All", "Subscription", "Single Ride"),
# selected = "All"),
#selectInput("start", label = "Start Station",
# choices = c("All", "MIT at Mass Ave / Amherst St", segments$start_loc[segments$start_loc != "MIT at Mass Ave / Amherst St"]),
# selected = "MIT at Mass Ave / Amherst St"),
p("These data reflect Blue Bike trips made to and from Cambridge, MA, from March to September 2020."),
p("Use these controls to change the data displayed."),
p("The chart below shows daily trip patterns by station."),
selectInput("test", label = "Direction",
choices = c("Start", "End"),
selected = "Start"),
numericInput("prop",
label = "Top N% of Routes to Display",
25,
min = 5,
max = 100,
step = 5
)
#p(textOutput(h3(strong(paste("selection"))))),
#p(strong("Top 3 Origins")),
#object calculating top 3
#p(strong("Top 3 Destinations")),
#object calcuating top 3
#textOutput(paste("Arrivals Percentile:","Rank")),
# object calculating percent by arrivals count
#textOutput(paste("Departures Percentile:","Rank"))
#renderPrint("Number of Docks"),
#renderPrint(paste("Top 3 Places People Go","Percentile %%")),
#renderPrint(paste("Top 3 Origins People Come From", "Percentile %%"))
),
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = "auto", left = 15, right = "auto", bottom = 15,
width = "50%", height = "200",
h4(strong("Arrivals and Departures by Hour")),
plotOutput("hist", height = "150")
)
)
),
tabPanel("The Data",
tabsetPanel(
tabPanel("Routes", DT::dataTableOutput("trip_table")),
tabPanel("Stations", DT::dataTableOutput("station_table"))
)
),
tabPanel("About",
p(''),
p("Data for this project were provided by", a("Blue Bikes Boston.", href = "https://www.bluebikes.com/system-data"), "Emmett McKinney visualized the data using PostgreSQL, PostGIS, Leaflet, and R."),
p("Learn more about Emmett's work through his ", a("portfolio,", href = "https://bit.ly/ezm_design_0620"), "and find him on ", a("LinkedIn, ", href = "https://www.linkedin.com/in/emmettmckinney/"), a("GitHub, ", href = "https://github.com/ezmckinn/"), "or ", a("Twitter", href = "https://twitter.com/EmmettMcKinney"))
)
)
)
## END ##