-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisuals.py
77 lines (64 loc) · 2.46 KB
/
visuals.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
import dash
from dash import dcc
from dash import html
import plotly.express as px
import pandas as pd
from datetime import date
app = dash.Dash(__name__)
colours = {'text': '#0000FF', 'background':'#FFFFFF'}
text_size = {'H1':48,'H2':40,'text':36}
app.layout = html.Div(style={'backgroundColor':colours['background'],'fontFamily':'calibri'}, children=[
html.H1(children='Room Temperature',
style = {'textAlign': 'center',
'color':colours['text'],
'fontSize':text_size['H1']}),
html.H2(children='A simple dashboard exercise',
style = {'textAlign': 'center','color':colours['text'],'fontSize':text_size['H2']}),
html.Div(children=[
html.Div(children = [
dcc.DatePickerRange(
id='date_picker',
min_date_allowed = date(2021,9,1),
max_date_allowed = date.today(),
initial_visible_month = date.today(),
end_date = date.today()
),
html.Div(id = 'date_picker_html')
],
style = {'textAlign': 'left','color':colours['text'],'fontSize':text_size['text']}
),
html.Div(children = [
html.Label("Stats",style = {'textAlign': 'right','color':colours['text'],'fontSize':text_size['text']}),
dcc.RadioItems(
options=[
{'label': 'max','value':'max'},
{'label': 'min','value':'min'},
{'label': 'mean','value':'mean'},
{'label': 'describe','value':'describe'}
]
)
], style = {'textAlign': 'right','color':colours['text'],'fontSize':text_size['text']}
)
],style = {'width':'100%','display':'inline-block'}
),
html.Br(),
html.Br(),
html.Div([
dcc.RangeSlider(
id = 'range_slider',
min = 0,
max = 23,
step = 1,
value = [0,23],
allowCross = False,
tooltip = {'placement':'bottom','always_visible':True}
),
html.Div(id='out_range_slider')
])
# dcc.Graph(
# id='example-graph',
# figure=None
# )
])
if __name__ == '__main__':
app.run_server(debug=True)