-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
96 lines (74 loc) · 2.63 KB
/
app.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
# -*- coding: utf-8 -*-
# author: Jorge Gomes for VOST Portugal
# ------------------------------
# VERSIONS
# ------------------------------
# V 0.1 11 OCTOBER 2022
# CONFIRM MEDEA PUB - BOILERPLATE ONLY
# ------------------------------
# IMPORT LIBRARIES
# ------------------------------
# IMPORT STANDARD LIBREARIES
import json
import requests
import pandas as pd
import datetime as dt
from datetime import datetime, timedelta, date
# IMPORT PLOTLY LIBRARIES ------------
import plotly.express as px
import plotly.graph_objects as go
import plotly.io as pio
# IMPORT DASH LIBRARIES ------------
import dash
import dash_daq as daq
from dash import Input, Output, dcc, html
import dash_mantine_components as dmc
# ------------------------------
# START DASH APP
# ------------------------------
app = dash.Dash(__name__,title='VOST PORTUGAL',suppress_callback_exceptions=True,update_title=None,
external_stylesheets=[
# include google fonts
"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;900&display=swap"
],
meta_tags=[{"name": "viewport", "content": "width=device-width, initial-scale=1"}],
)
app.css.config.serve_locally = False
app.scripts.config.serve_locally = False
# ------------------------------
# START APP LAYOUT
# ------------------------------
app.layout = html.Div(
[
dmc.Grid(
children=[
dmc.Col(
dmc.Text(
"VOST Portugal",
weight=700,
variant="gradient",
gradient={"from":"green", "to":"orange","deg":45},
style={"fontSize":24},
align="left",
),
span=1,xs=12,
),
dmc.Col(
dmc.Text(
"MEDEA PUBLIC INFO",
variant="gradient",
gradient={"from":"orange", "to":"red","deg":45},
style={"fontSize":24},
align="right",
),
span=2,xs=12,offset=6,
),
],
),
],
)
# -------------------------------------------------------------------------------------
# -------------------------------- START THE APP -------------------------------------
# -------------------------------------------------------------------------------------
if __name__ == "__main__":
app.run_server(host='0.0.0.0', debug=False)