-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.py
70 lines (56 loc) · 1.66 KB
/
index.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
from dash import dcc, html
from dash.dependencies import Input, Output
import LM_geomap_plot
import LM_intro
import LM_line_datafields
import LM_line_life_expectancy
import LM_scatter_graph2
import LM_submit_social
import LM_user_algo
import LM_user_data
from app import app
server = app.server
app.layout = html.Div(
children=[
dcc.Location(id="url", refresh=False),
html.Div(id="page-content"),
dcc.Store(id="dccstore_summary"),
dcc.Store(id="dccstore_user"),
]
)
server = app.server
@app.callback(Output("page-content", "children"), Input("url", "pathname"))
def display_page(pathname):
if pathname == "/page0":
return LM_user_data.layout
if pathname == "/page1":
return LM_line_life_expectancy.layout
if pathname == "/page2":
return LM_line_datafields.layout
if pathname == "/page3":
return LM_scatter_graph2.layout
if pathname == "/page4":
return LM_geomap_plot.layout
if pathname == "/page5":
return LM_user_algo.layout
if pathname == "/page6":
return LM_submit_social.layout
return LM_intro.layout
# page 1
if __name__ == "__main__":
# app.run_server(debug=True)
app.run_server(
host="127.0.0.1",
port="8050",
# proxy=None,
debug=True,
dev_tools_props_check=None,
dev_tools_serve_dev_bundles=None,
dev_tools_hot_reload=None,
dev_tools_hot_reload_interval=None,
dev_tools_hot_reload_watch_interval=None,
dev_tools_hot_reload_max_retry=None,
dev_tools_silence_routes_logging=None,
dev_tools_prune_errors=None,
# **flask_run_options
)