-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhomepage.py
203 lines (170 loc) · 5.35 KB
/
homepage.py
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from navbar import Navbar
from app import app
nav = Navbar()
app.config['suppress_callback_exceptions']=True
card_content_1 = [
dbc.CardBody(
[
html.P(
"City of Westminster remains to be the most congested borough from 2013-2017",
className="card-text",
),
]
),
]
card_content_2 = [
dbc.CardBody(
[
#html.H1("83%", className="card-title"),
html.P(
"From 2013 to 2017, there has been an increase in 6.29 million people using Tube in the City of Westminster",
className="card-text",
),
]
),
]
card_content_3 = [
dbc.CardBody(
[
html.P("The highest increase in the use of Tube per borough which is 14.89% (or 31.41 million people) was observed in the City of London",
className="card-text",
),
#html.H1("FRIDAY", className="card-title"),
]
),
]
card_content_4 = [
dbc.CardBody(
[
#html.H1("83%", className="card-title"),
html.P(
"Waterloo station in Lambeth remains to be the most populated station from 2013 to 2017 (except 2014 when Oxford Circus in City of Westminster tops the list)",
className="card-text",
),
]
),
]
card_content_5 = [
dbc.CardBody(
[
html.P(
"People are more likely to use Tube on weekdays compared to weekends, Sunday being the least crowded day.",
className="card-text",
),
]
),
]
card_content_6 = [
dbc.CardBody(
[
html.P(
"Most number of accidents occur on",
className="card-text",
),
html.H1("FRIDAY")
]
),
]
card_content_7 = [
dbc.CardBody(
[
html.P(
"Westminster and Lambeth account for almost 11% of the accidents every year",
className="card-text",
),
]
),
]
card_content_8 = [
dbc.CardBody(
[
html.H1("83%", className="card-title"),
html.P(
"accidents occur in Fine weather condition",
className="card-text",
),
]
),
]
card_content_9 = [
dbc.CardBody(
[
html.H1("87%", className="card-title"),
html.P(
"increase in Fatal/Serious accidents from 2014 to 2018",
className="card-text",
),
]
),
]
card_content_10 = [
dbc.CardBody(
[
html.H2("Upto 75%", className="card-title"),
html.P(
"increase in Cycle Usage in June and July every year",
className="card-text",
),
]
),
]
card_content_11 = [
dbc.CardBody(
[
html.P(
"Cyclists have travelled maximum distance between Hyde Park Corner -Albert Gate stations in last 5 years",
className="card-text",
),
]
),
]
card_content_12 = [
dbc.CardBody(
[
html.P(
"Lansdowne Road station has witnessed maximum cycle usage in last 7 years",
className="card-text",
),
]
),
]
card_content_13 = [
dbc.CardBody(
[
html.P(
"Maximum number of accidents occur between 16:00 to 20:00",
className="card-text",
),
]
),
]
body = dbc.Container(
[
html.Div(
[
dbc.CardColumns(
[
dbc.Card(card_content_1, color="info", inverse=True, style={"width": "30rem", "height": "10rem"}),
dbc.Card(card_content_2, color="success", inverse=True, style={"width": "30rem", "height": "10rem"}),
dbc.Card(card_content_6, color="danger", inverse=True, style={"width": "30rem", "height": "12rem"}),
dbc.Card(card_content_10, color="success", inverse=True, style={"width": "30rem", "height": "16rem"}),
dbc.Card(card_content_7, color="danger", inverse=True, style={"width": "30rem", "height": "10rem"}),
dbc.Card(card_content_5, color="info", inverse=True, style={"width": "30rem", "height": "10rem"}),
dbc.Card(card_content_12, color="success", inverse=True, style={"width": "30rem", "height": "7rem"}),
dbc.Card(card_content_8, color="danger", inverse=True, style={"width": "30rem", "height": "13rem"}),
dbc.Card(card_content_3, color="success", inverse=True, style={"width": "30rem", "height": "14rem"}),
dbc.Card(card_content_11, color="success", inverse=True, style={"width": "30rem", "height": "10rem"}),
dbc.Card(card_content_9, color="danger", inverse=True, style={"width": "30rem", "height": "13rem"}),
dbc.Card(card_content_4, color="info", inverse=True, style={"width": "30rem", "height": "14rem"}),
dbc.Card(card_content_13, color="danger", inverse=True, style={"width": "30rem", "height": "10rem"}),
]
)
],className="offset-by-one column"
)
],
)
layout = html.Div([nav,body])