-
Notifications
You must be signed in to change notification settings - Fork 0
/
about_covid.py
100 lines (89 loc) · 3.74 KB
/
about_covid.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
from modules import *
from sidebar import *
import extras
external_stylesheets = [extras.theme]
colors = {
'background': '#111111',
'text': '#FFFFFF'
}
CONTENT_STYLE = {
'color': '#FFFFFF'
}
def make_jumbo(title, text, button_name, hre):
return dbc.Jumbotron(
[
html.H2(title, className="display-4"),
html.P(text),
dbc.Button(button_name, color="primary", href=hre, size="lg")
])
what_is_covid = make_jumbo(
"What is COVID-19 ?",
"""
Coronavirus disease (COVID-19) is an infectious disease caused by a newly discovered coronavirus.
Most people infected with the COVID-19 virus will experience mild to moderate respiratory illness
and recover without requiring special treatment. Older people, and those with underlying medical
problems like cardiovascular disease, diabetes, chronic respiratory disease, and cancer are more
likely to develop serious illness.
""",
"Learn more",
"https://www.who.int/emergencies/diseases/novel-coronavirus-2019")
covid_symptoms = make_jumbo(
"Symptoms",
[
"Most common symptoms: fever, dry cough, tiredness.",
html.Br(),
"Less common symptoms: aches and pains, sore throat, diarrhoea, conjunctivitis, headache,\
loss of taste or smell, a rash on skin, or discolouration of fingers or toes.",
html.Br(),
"Serious symptoms : difficulty breathing or shortness of breath, chest pain or pressure, \
loss of speech or movement.",
html.Br(),
"On average it takes 5–6 days from when someone is infected with the virus for symptoms to show, \
however it can take up to 14 days."],
"Learn more",
"https://www.who.int/emergencies/diseases/novel-coronavirus-2019/question-and-answers-hub/q-a-detail/coronavirus-disease-covid-19#:~:text=symptoms")
covid_prevention = make_jumbo(
"Prevention",
[
"To prevent infection and to slow transmission of COVID-19, do the following:",
html.Ul([
html.Li("Wash your hands regularly with soap and water, or clean them with alcohol-based hand rub."),
html.Li("Maintain at least 1 metre distance between you and people coughing or sneezing."),
html.Li("Avoid touching your face."),
html.Li("Cover your mouth and nose when coughing or sneezing."),
html.Li("Stay home if you feel unwell."),
html.Li("Refrain from smoking and other activities that weaken the lungs."),
html.Li("Practice physical distancing by avoiding unnecessary travel and staying away from large groups of people.")
])
],
"Learn more",
"https://www.who.int/emergencies/diseases/novel-coronavirus-2019/advice-for-public"
)
covid_vaccine = make_jumbo(
"Vaccination",
"""
There are currently more than 50 COVID-19 vaccine candidates in trials.
When a safe and effective vaccine is found, COVAX (led by WHO, GAVI and CEPI) will facilitate the
equitable access and distribution of these vaccines to protect people in all countries.
People most at risk will be prioritized.
""",
"Learn more",
"https://www.raps.org/news-and-articles/news-articles/2020/3/covid-19-vaccine-tracker"
)
app = dash.Dash(__name__,
external_stylesheets=external_stylesheets,
requests_pathname_prefix="/infocenter/"
)
app.layout = html.Div([
html.Base(target="_parent"),
navbar("Infocenter"),
dbc.Row([
dbc.Col(html.Div(what_is_covid), width=12, lg=6),
dbc.Col(html.Div(covid_symptoms), width=12, lg=6),
dbc.Col(html.Div(covid_prevention), width=12, lg=6),
dbc.Col(html.Div(covid_vaccine), width=12, lg=6)
])
],
style=CONTENT_STYLE)
app.index_string = extras.ind_str
app.title = 'Corona Tracker'