-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
39 lines (30 loc) · 975 Bytes
/
Copy pathmain.py
File metadata and controls
39 lines (30 loc) · 975 Bytes
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
import json
import dash_auth
from dash import Dash
from assets.config import APP_TITLE, EXTERNAL_STYLESHEET
from src.create_layout import create_layout
from src.data_handler import read_data
# Read usernames/passwords
with open("assets/auth.json", 'r') as fin:
VALID_USERNAME_PASSWORD_PAIRS = json.load(fin)
data = read_data()
#print('-----------------------------')
#print(data.raw.head())
#print([dtype for dtype in data.raw.dtypes])
#print('-----------------------------')
#print(data.filtered.head())
#print([dtype for dtype in data.filtered.dtypes])
#print('-----------------------------')
#print(data.inverted.head())
#print([dtype for dtype in data.inverted.dtypes])
# Dashboard App
app = Dash(__name__, external_stylesheets=EXTERNAL_STYLESHEET)
auth = dash_auth.BasicAuth(
app,
VALID_USERNAME_PASSWORD_PAIRS
)
app.title = APP_TITLE
# Dashboard Layout
app.layout = create_layout(app, data)
if __name__ == '__main__':
app.run_server(debug=True)