-
Notifications
You must be signed in to change notification settings - Fork 1
/
layout.py
116 lines (107 loc) · 4.73 KB
/
layout.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
from dash import html
from dash import dcc
import datetime as dt
import data.binance_data as bd
######################## SUMMARY BINANCE LAYOUT ########################
summary_page = html.Div(
children = [
html.Div(
className = 'row',
children = [
# Column for user control
html.Div(
className = 'four columns div-user-controls',
children = [
html.H1('Cryptocurrency Analysis Dashboard'),
html.P(
'''
Select different days using the date picker or by selecting
different time frames on the histogram.
'''
),
# Dropdown to select date range
html.Div(
className = 'div-for-dropdown'
, children = [
dcc.DatePickerRange(
id = 'cryto_date_picker',
min_date_allowed = dt.datetime(2018, 1, 1),
max_date_allowed = dt.datetime.today(),
start_date = dt.datetime(2021, 1, 1),
end_date = dt.datetime.today(),
display_format = 'MMMM D, YYYY',
style = {'border': '0px solid black'}
)
]
),
# Dropdown to select crypto currency pair
html.Div(
className = 'div-for-dropdown',
children = [
dcc.Dropdown(
id = 'crypto_pair_options',
options = [
{'label': currency, 'value': currency}
for currency in bd.get_currency_pairs()
],
multi = False,
placeholder = 'Select a currency pair',
value = 'BNBUSDT'
)
]
),
# Dropdown to select kline interval
html.Div(
className = 'div-for-dropdown',
children = [
dcc.Dropdown(
id = 'kline_intervals',
options = bd.get_kline_intervals(),
multi = False,
placeholder = 'Select an interval',
value = '1d'
)
]
),
# Submit button
html.Div(
className = 'div-for-button',
children = [
html.Button(
id = 'submit_button',
n_clicks = 0,
children = 'Submit'
)
]
)
]
),
# Column for app graphs and plots
html.Div(
className = 'eight columns div-for-charts bg-grey',
children = [
html.Div(
children = [
html.H4('Historial Prices - Candlestick Chart'),
dcc.Graph(id = 'price_candlestick')
]
),
html.Div(
children = [
html.H4('Historial Volumes and Number of Trades'),
dcc.Graph(id = 'volume_bar')
]
),
html.Div(
children = [
html.H4('Historical Prices Change'),
dcc.Graph(id = 'price_change')
]
)
]
)
]
)
]
)
######################## END SUMMARY BINANCE LAYOUT ########################