-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
40 lines (34 loc) · 1.1 KB
/
app.py
File metadata and controls
40 lines (34 loc) · 1.1 KB
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
import dash
from dash import html
from dash import dcc
from dash_bootstrap_templates import load_figure_template
# Instantiate the Dash app
app = dash.Dash(__name__, use_pages=True, suppress_callback_exceptions=True)
server = app.server
load_figure_template("darkly")
# Define the overall layout of the app
app.layout = html.Div(
[
html.Br(),
html.H1("Dash App for Population and GDP Data", style={'fontSize': 72, 'textAlign': 'center'}),
# Additional text with instructions
html.Div(
[
html.P("Click on 'GDP' to visualize GDP data or 'Population' to visualize population data.",
style={'fontSize': 30, 'textAlign': 'center'})
]
),
html.Div(
[
dcc.Link(page['name'] + " | ", href=page['path'], className="btn btn-dark m-2 fs-5 btn-lg")
for page in dash.page_registry.values()
],
style={'textAlign': 'center'}
),
html.Hr(),
dash.page_container
]
)
# Run the app
if __name__ == "__main__":
app.run_server()