def display_age_groups():
    return [
        html.H2(gettext("Overall (Weekly) Mortality Only (STATBEL Data)")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='age-group-death-statbel',
                              figure=death_age_groups("stack"),
                              config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(dcc.Graph(id='age-group-death-statbel-stack',
                              figure=death_age_groups(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_statbel),
        html.H2(gettext("COVID (Daily) Mortality (Sciensano Data)")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='age-group-death',
                              figure=age_groups_death(),
                              config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(dcc.Graph(id='age-group-death-stack',
                              figure=age_groups_death("stack"),
                              config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(dcc.Graph(id='age-group-death-pie',
                              figure=age_groups_death_pie(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
def display_mobility():
    return [
        html.H2(gettext("Google Mobility Report Europe")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='google mobility report eu',
                                figure=google_mobility_plot_eu(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Google Mobility Report BE")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='google mobility report be',
                                figure=google_mobility_plot_be(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_google_mobility),
        html.H2(gettext("Apple Mobility Report Europe")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='apple mobility report eu',
                                figure=apple_mobility_plot_eu(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_apple_mobility)
    ]
Exemple #3
0
def display_hospitals_region():
    return [
        html.H2(gettext("Total hospitalizations per region")),
        html.H3(
            gettext(
                "Total number of hospitalizations per region per 100K inhabitants"
            )),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospi_total_in_region_per100k',
                                figure=hospi_total_in_region_per100k(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospi_total_in_icu_per100k',
                                figure=hospi_total_in_icu_region_per100k(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospi_newin_region_per100k',
                                figure=hospi_newin_region_per100k(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospi_newout_region_per100k',
                                figure=hospi_newout_region_per100k(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #4
0
def display_deaths_per_million():
    plot1 = lines_deaths_per_million()
    # Save html as a StringIO object in memory
    plot1_html = io.StringIO()
    plot1.save(plot1_html, 'html')

    return [
        html.H1(
            get_translation(
                en="""Deaths per million""",
                fr="""Morts par million""",
            )),
        dcc.Markdown(
            get_translation(
                en="""
                The number of reported deaths per million is a lower bound on the actual number of deaths per million inhabitants. Some countries have likely not reported all cases.
                """,
                fr="""
            Le nombre de décès signalés par million est une limite inférieure du nombre réel de décès par million d'habitants. Certains pays n'ont probablement pas signalé tous les cas.
            """,
            )),
        html.Iframe(
            id='plot',
            height='500',
            width='1000',
            sandbox='allow-scripts',

            # This is where we pass the html
            srcDoc=plot1_html.getvalue(),

            # Get rid of the border box
            style={'border-width': '0px'}),
        display_source_providers(source_hopkins)
    ]
Exemple #5
0
def display_cases_per_million():

    plot1 = lines_cases_per_million()
    # Save html as a StringIO object in memory
    plot1_html = io.StringIO()
    plot1.save(plot1_html, 'html')

    return [
        html.H1(
            get_translation(
                en="""Cases per million""",
                fr="""Cas par million""",
            )),
        dcc.Markdown(
            get_translation(
                en="""
                The number of reported cases per million is a lower bound on the actual number of infected persons per million inhabitants. Countries have had different testing capabilities and approaches.
                """,
                fr="""
            Le nombre de cas signalés par million est une limite inférieure du nombre réel de personnes infectées par million d'habitants. Les pays ont eu différentes capacités et approches pour réaliser les tests de dépistage.
            """,
            )),
        html.Iframe(
            id='plot',
            height='500',
            width='1000',
            sandbox='allow-scripts',

            # This is where we pass the html
            srcDoc=plot1_html.getvalue(),

            # Get rid of the border box
            style={'border-width': '0px'}),
        display_source_providers(source_hopkins)
    ]
Exemple #6
0
def display_traffic():
    return [
        html.H2(gettext("Google Map Usage working days 8:00-8:30")),
        dcc.Markdown(
            get_translation(
                fr="""
Google enregistre le ratio entre le taux de demande (trafic) dans cette région et le taux de demande au niveau mondial pour chacune des applications.
Nous pensons que l'application google map est intéressante à observer, car elle reflète l'impact du confinement.
Afin de comparer les pays, nous normalisons la courbe d'un pays par rapport à la moyenne des 10 premiers jours de mars.
Une valeur de 1 signifie que la proportion du trafic de ce pays et la même que les 10 premiers jours de mars.
Une valeur inférieure à 1 signifie que le pays a perdu des parts de trafic par rapport aux 10 premiers jours de mars.
La mobilité dans ce pays semble comparativement plus réduite que la normale relativement aux autres pays.
Une valeur supérieure à 1 signifie que le pays a gagné du trafic par rapport aux 10 premiers jours de mars.
La mobilité dans ce pays semble comparativement supérieure à la normale relativement aux autres pays.
    """,
                en="""
Google records the ratio between the demand rate (traffic) in this region and the global demand rate for each of the applications.
We think the google map app is interesting to study because it reflects the impact of the lockdown.
In order to compare the countries, we normalize the curve of a country compared to the average of the first 10 days of March.
A value of 1 means that the proportion of traffic from this country is the same as the first 10 days of March.
A value less than 1 means that the country has lost traffic shares compared to the first 10 days of March.
Mobility in this country seems comparatively lower than normal compared to other countries.
A value greater than 1 means that the country has gained traffic compared to the first 10 days of March.
Mobility in this country seems comparatively higher than normal compared to other countries.
        """,
            )),
        dbc.Row([
            dbc.Col(
                display_graphic(id='google map usage',
                                figure=plot_google_traffic_working_days(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_google_traffic),
    ]
def display_age_groups():
    return [
        html.H2(get_translation(fr = "Nombre de case par groupe d'age",en="Number of cases per age group")),
        html.P(gettext(
            get_translation(
                fr="""C'est le nombre de cas testés positifs rapportés par Sciensano. 
                  Le nombre de cas positifs réel peut être (beaucoup) plus important.
                  Notez que le nombre de tests quotidien augmente également. Voir notre page testing.
            """,
                en="""
            This is the number of positive test cases reported by Sciensano. 
            The number of actual positive cases can be (much) higher.
            Note that the number of daily tests is also increasing. See our testing page."""))),
        dbc.Row([
            dbc.Col(dcc.Graph(id='age-group-cases',
                              figure=age_groups_cases(),
                              config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(dcc.Graph(id='age-group-cases-pie',
                              figure=age_groups_cases_pie(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #8
0
def display_testing():
    return [
        html.H2(gettext("Number of cases and tests each day")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='cases-province-map',
                              figure=bart_plot_cases_testing(),
                              config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        html.H2(gettext("Ratio #Cases/#Tests each day")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='cases-province-map',
                              figure=plot_ration_cases_over_testing(),
                              config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        html.H2(gettext("Ratio #Cases/#Tests averaged over past 7 days")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='cases-province-map',
                              figure=plot_ration_cases_over_testing_smooth(),
                              config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        html.H2(gettext("Cumulated #Tests and #Cases")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='cases-province-map',
                              figure=plot_cumulated_testing(),
                              config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #9
0
def display_tomtom():
    return [
        html.H2(gettext("TomTom Traffic")),
        dcc.Markdown(get_translation(
            en="""
    The TomTom traffic index is the additional time needed as compared to a 30-minutes trip in uncongested conditions.
    A 53% congestion level in Brussels, for example, means that a 30-minute trip will take 53% more time than it would during Brussels’s baseline uncongested conditions.
    It thus means that you will need 45.9 minutes total average travel time instead of 30 minutes (in uncongested conditions).

    We record this data daily to measure the release of the lockdown constraints.
        """,
            fr="""
    L'indice de trafic TomTom est le temps supplémentaire nécessaire par rapport à un trajet de 30 minutes dans des conditions non encombrées.
    Un niveau de congestion de 53% à Bruxelles, par exemple, signifie qu’un voyage de 30 minutes prendra 53% de temps de plus qu’un trajet sans encombrement à Bruxelles.
    Cela signifie donc que vous aurez besoin d'un temps de trajet moyen total de 45,9 minutes au lieu de 30 minutes (dans des conditions non encombrées).

    Nous enregistrons ces données quotidiennement depuis le 14 avril pour mesurer le déconfinement.
            """, )),
        html.H2(gettext("TomTom Traffic Index Belgium Cities 07:00-9:00")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='google map usage',
                              figure=plot_tomtom_be_working_days(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_tomtom),
    ]
Exemple #10
0
def display_cases_per_million():

    return [
        html.H1(
            get_translation(
                en="""Cases per million""",
                fr="""Cas par million""",
            )),
        dcc.Markdown(
            get_translation(
                en="""
                The number of reported cases per million is a lower bound on the actual number of infected persons per million inhabitants. Countries have had different testing capabilities and approaches.
                """,
                fr="""
            Le nombre de cas signalés par million est une limite inférieure du nombre réel de personnes infectées par million d'habitants. Les pays ont eu différentes capacités et approches pour réaliser les tests de dépistage.
            """,
            )),
        dbc.Row([
            dbc.Col(dcc.Graph(id='cases per country',
                              figure=lines_cases_per_million_not_log(),
                              config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        display_source_providers(source_hopkins)
    ]
Exemple #11
0
def display_testing():
    return [
        html.H2(gettext("Number of cases and tests each day")),
        dbc.Row([
            dbc.Col(display_graphic(id='testing-barplot',
                                    figure=bart_plot_cases_testing(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        html.H2(
            gettext("Number of positive cases and positive tests each day")),
        dbc.Row([
            dbc.Col(display_graphic(id='testing-barplot',
                                    figure=plot_positive_cases_tests(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        html.H2(gettext("Positive rate")),
        dbc.Row([
            dbc.Col(display_graphic(
                id='cases-over-testing',
                figure=plot_ration_cases_over_testing_smooth(),
                config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        html.H2(gettext("Cumulated #Tests and #Cases")),
        dbc.Row([
            dbc.Col(display_graphic(id='cumulated-testing',
                                    figure=plot_cumulated_testing(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #12
0
def display_hospitals_prov():
    return [
        html.H2(gettext("Total hospitalizations per province")),
        html.H3(gettext("Absolute numbers")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-prov-map',
                          figure=map_hospi_provinces(),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-prov-scatter',
                          figure=scatter_hospi_provinces(),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-prov',
                          figure=total_hospi_provinces(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H3(gettext("Per 100K inhabitants")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization100K-prov-map',
                          figure=map_hospi_per100K_provinces(),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization100K-prov-scatter',
                          figure=scatter_hospi_per100K_provinces(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H3(gettext("Total ICU per province")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-prov',
                          figure=total_icu_provinces(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H3(gettext("Total daily new hospitalizations per province")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-prov',
                          figure=total_hospi_new_in_provinces(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H3(gettext("Total daily persons out of hospital per province")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-prov',
                          figure=total_hospi_new_out_provinces(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #13
0
def display_brussels():
    return [
        html.H3(gettext("Tunnel traffic")),
        html.P(gettext(
            get_translation(
                fr="""Nombre de véhicules passant chaque heure dans les tunnels principaux de Bruxelles.""",
                en="""Number of vehicles passing every hour through the main tunnels of Brussels."""))),
        html.H3(gettext("Brussels tunnels traffic working days 7:00-8:00")),
        dbc.Row([
            dbc.Col(display_graphic(id='brussels-tunnel',
                              figure=brussels_tunnels(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H3(gettext("Brussels all tunnels relative traffic working days 7:00-8:00")),
        html.P(gettext(
            get_translation(
                fr="""Divisé par le nombre moyen de véhicules enregistré sur la période 1er Féb - 10 Mars""",
                en="""Divided by the average number of vehicles recorded over the period Feb 1 - March 10"""))),
        dbc.Row([
            dbc.Col(display_graphic(id='brussels-tunnel-ratio',
                              figure=brussels_alltunnels_ratio(),
                              config=dict(locale=str(get_locale())))),
        ]),

        display_source_providers(source_brussels_mobility),
        html.H2(gettext("Apple Mobility Report")),
        dbc.Row([
            dbc.Col(display_graphic(id='eucities-apple',
                              figure=apple_mobility_plot_cities(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_apple_mobility),
        html.H2(gettext("Brussels Mobility: bike relative passage count through stations")),
        html.P(gettext(
            get_translation(
                fr="""Relatif signifie divisé par le nombre moyen de passages quotidien avant confinement afin de rendre les sites de comptages comparables""",
                en="""Relative means divided by the average number of daily passages before confinement in order to make the counting sites comparable"""))),
        dbc.Row([
            dbc.Col(display_graphic(id='brussels-bikes-ratio',
                              figure=bike_mobility_plot_stations(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_brussels_mobility),

    ]
def display_hospitals():
    return [
        html.H2(gettext("Total Hospitalizations")),
        dbc.Row([
            dbc.Col(display_graphic(id='hospitalization-be-tot',
                              figure=bar_hospitalization_tot(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Total ICU Hospitalizations")),
        dbc.Row([
            dbc.Col(display_graphic(id='hospitalization-be-icu',
                                    figure=bar_hospitalization_ICU(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Daily IN-OUT Hospitalizations")),
        dbc.Row([
            dbc.Col(display_graphic(id='hospitalization-be-in',
                                    figure=bar_hospitalization_in(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='hospitalization-be-in-out',
                                    figure=bar_hospitalization_in_out(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("GEES Barometer")),
        dbc.Row([
            dbc.Col(display_graphic(id='gees barometer',
                                    figure=gees_barometer(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Total ICU/ Total Hospitalization")),
        dbc.Row([
            dbc.Col(display_graphic(id='icuoverhospi',
                              figure=icu_over_hospi(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Deaths/ Total ICU (Avg over 7 past days)")),
        dbc.Row([
            dbc.Col(display_graphic(id='deathovericu',
                              figure=death_over_icu_smooth(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Deaths/ Total Hospitalization (Avg over 7 past days)")),
        dbc.Row([
            dbc.Col(display_graphic(id='hospioverdeath',
                              figure=hospi_over_death_smooth(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Average age weekly admission")),
        dbc.Row([
            dbc.Col(display_graphic(id='avg age weekly admission',
                                    figure=average_age_new_in(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #15
0
def display_hospitals():
    return [
        html.H2(gettext("Hospitalization")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='hospitalization-be',
                              figure=bar_hospitalization(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #16
0
def display_vaccines():
    return [
        html.H2(gettext("Vaccines")),
        dcc.Markdown(get_translation(
            fr="""Vaccins COVID Belgiques""",
            en="""Covid Vaccines Belgium""")),
        dbc.Row([
            dbc.Col(display_graphic(id='vaccines',
                              figure=plot_vaccines_cumulated(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano),
    ]
def display_arrondissements():
    return [
        html.H3(
            get_translation(
                en="Weekly Mortality In each admin region (STATBEL Data)",
                fr=
                "Mortalité par semaine dans chaque arrondissement (STATBEL Data)"
            )),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='death-statbel-weekly-adminregion',
                          figure=death_arrondissements_map_weekly(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_statbel),
        html.H3(
            get_translation(
                en=
                "Weekly Mortality vs Number of case In each admin region per 1000 inhabitants",
                fr=
                "Mortalité vs Nombre de case par semaine dans chaque arrondissement pour 1000 habitants"
            )),
        html.P(
            gettext(
                get_translation(
                    fr=
                    """La surface des cercles represente la population des arrondissements.""",
                    en=
                    """The circcle surface represents the population of the region."""
                ))),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='gapminder-adminregion',
                          figure=gapminder_case_death_admin_region_overtime(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_statbel),
        display_source_providers(source_sciensano),
    ]
Exemple #18
0
def display_covid_death():
    return [
        html.H2(gettext("COVID (Daily) Mortality (Sciensano Data)")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-death-stack',
                                figure=age_groups_death(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='region_death_covid',
                                figure=region_death_covid(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='region_death_covid_per_habitant',
                                figure=region_covid_death_per_habitant(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Total covid deaths Avg over 7 days")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospitalization-be',
                                figure=death_smooth(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Average age of covid deaths")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='avgagecoviddeath',
                                figure=average_age_death(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("First wave vs 2nd wave")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospitalization-be-waves',
                                figure=waves_comparison(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Since March")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-death-pie',
                                figure=age_groups_death_pie(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
def display_hospitals():
    return [
        html.H2(gettext("Hospitalization")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-be',
                          figure=bar_hospitalization(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Total Hospitalizations Avg over 7 past days")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-be',
                          figure=hospi_smooth(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("New daily hospitalizations Avg over 7 past days")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-be',
                          figure=newin_smooth(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Total Deaths Avg over 7 past days")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-be',
                          figure=death_smooth(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Total ICU/ Total Hospitalization")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-be',
                          figure=icu_over_hospi(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H2(
            gettext(
                "Total Deaths/ Total Hospitalization (Avg over 7 past days)")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='hospitalization-be',
                          figure=hospi_over_death_smooth(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #20
0
def display_who():
    return [
        html.H2(gettext("New Hospitalization WHO Indicator")),
        dcc.Markdown(get_translation(
            fr="""
            Cette page utilise des sommes et moyennes *centrées* sur 14 jour. La somme au jour J est donc calculée à partir des jours J-7 jusque J+6.
            
            Taux d’hospitalisation = Nombre de nouvelles hospitalisations dues à la COVID-19 pour 100 000 habitants et par semaine (moyenne sur deux semaines).""",
            en="""
            This page uses centered sums and means, with a 14-days window. The sum at day D is thus computed from the days D-7 until D+6.
            
            Hospitalization rate = Number of new hospitalizations due to COVID-19 per 100,000 inhabitants per week (average over two weeks).""")),
        dbc.Row([
            dbc.Col(display_graphic(id='newinoms',
                              figure=newin_oms(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Positive Rate WHO Indicator")),
        dcc.Markdown(get_translation(
            fr="""Taux de positivité = Proportion de tests positifs (moyenne sur deux semaines)""",
            en="""Positivity rate = Proportion of positive tests (average over two weeks)""")),
        dbc.Row([
            dbc.Col(display_graphic(id='posrate_oms',
                              figure=posrate_oms(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Cases Incidence WHO Indicator")),
        dcc.Markdown(get_translation(
            fr="""Incidence des cas = Nombre de cas confirmés pour 100 000 habitants et par semaine (moyenne sur deux semaines). """,
            en="""Incidence = number of confirmed cases per 100 000 inhabitants per week (averaged over two weeks). """)),
        dbc.Row([
            dbc.Col(display_graphic(id='cases_oms',
                                figure=cases_oms(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("COVID Death WHO Indicator")),
        dcc.Markdown(get_translation(
            fr="""Mortalité = Nombre de décès attribués à la COVID-19 pour 100 000 habitants et par semaine (moyenne sur deux semaines)""",
            en="""Mortality = Number of deaths attributed to COVID-19 per 100,000 population per week (two-week average) """)),
        dbc.Row([
            dbc.Col(display_graphic(id='death_oms',
                                    figure=death_oms(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano),
    ]
Exemple #21
0
def display_brussels():
    return [
        html.H2(gettext("Brussels tunnels traffic working days 7:00-8:00")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='brussels-tunnel',
                              figure=brussels_tunnels(),
                              config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Brussels tunnels relative traffic working days 7:00-8:00")),
        dbc.Row([
            dbc.Col(dcc.Graph(id='brussels-tunnel-ratio',
                              figure=brussels_tunnels_ratio(),
                              config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_brussels_mobility),

    ]
def display_age_groups():
    return [
        html.H2(gettext("Age groups")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-cases',
                          figure=age_groups_cases(),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-cases-pie',
                          figure=age_groups_cases_pie(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
Exemple #23
0
def display_hospi_international():

    return [
        html.H1(
            get_translation(
                en="""Hospitalizations per 100K""",
                fr="""Hospitationsation par 100K""",
            )),
        dbc.Row([
            dbc.Col(display_graphic(id='hospi_international',
                                    figure=hospi_international(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='icu_international',
                                    figure=icu_international(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        display_source_providers(source_opendataecdc)
    ]
Exemple #24
0
def display_Re():
    return [
        *model_warning(
            html.Iframe(src="https://www.youtube.com/embed/TXZW5Q7p2tk",
                        style=dict(border=0),
                        width="100%",
                        height="600"),
            html.H2(gettext("Daily multiplicative factor")),
            html.
            P("The daily multiplicative factor gives the relative daily increase/decrease of positive cases. When >1, the strength of the epidemy is increasing, when <1, the strength of the epidemy is decreasing."
              ),
            dbc.Row([
                dbc.Col(display_graphic(id='daily_exp_factor',
                                        figure=plot_daily_exp_factor(),
                                        config=dict(locale=str(get_locale()))),
                        className="col-12"),
            ]),
            html.H2(
                gettext(
                    "Effective number of secondary infections (Re factor)")),
            html.P("""
                The concept of effective number of secondary infections per infection case Re is an interesting indicator to compute easily interpretable for everyone.
                When specific actions are taken to ensure protection and social distancing or when the number of immune persons grows up, Re is supposed to decrease.

                It should not be confused with R0 (pronounced, “R naught”) indicating how contagious the disease  is when everyone is susceptible.
                R0 directly depends on the nature of the infectious disease.
                """),
            html.P("""
                If Re is greater than one then the number of infected persons grows faster than the number of recovered or deceased persons and this leads to an outbreak of the epidemic. 
                It is thus crucial that the Re factor is not higher than 1 for a long period. 
                If Re is less than one then the outbreak will tend to  extinct because fewer and fewer people are infected."""
                   ),
            html.
            P("As we only have access to the cases tested positive at time t (without knowing exactly when they are not active anymore), we have to make some hypotheses to estimate the Re:"
              ),
            dcc.Markdown('''
    * if we consider that it takes n days for an active patient to recover (n is thus a parameter of our model), 
    * if we make a moving average over 7 days of the positive patients,
    * if we consider that the population that has developed is not significant (<<10\%-20\%), and
    * if we consider that the number of persons tested positive is proportional to the actual number of positive persons.
    '''), html.P("We can also visualize the Re factor:"),
            html.
            P("Here are the curves that we obtain since the lockdown in Belgium:"
              ),
            dbc.Row([
                dbc.Col(display_graphic(id='Re',
                                        figure=plot_Re()[2],
                                        config=dict(locale=str(get_locale()))),
                        className="col-12"),
            ]), html.H2(gettext("Additional visualisations")),
            dcc.Markdown(Markdown_text, dangerously_allow_html=True),
            dbc.Row([
                dbc.Col(display_graphic(id='infection-rate-increase',
                                        figure=plot_Re()[0],
                                        config=dict(locale=str(get_locale()))),
                        className="col-12"),
            ]),
            dbc.Row([
                dbc.Col(display_graphic(id='infection-rate-decrease',
                                        figure=plot_Re()[1],
                                        config=dict(locale=str(get_locale()))),
                        className="col-12"),
            ]), display_source_providers(source_sciensano, source_SI_modelRe))
    ]
Exemple #25
0
def display_euromomo():
    return [
        html.H2(gettext("EUROMOMO data analysis")),
        html.H3(gettext("Overmortality Comparison")),
        dcc.Markdown(
            get_translation(fr="""\
                EuroMOMO surveille et rapporte la mortalité dans 24 pays (ou morceaux de pays).
                Les mortalités ne sont pas données en chiffres brut, mais plutôt en z-scores, qui sont le nombre
                de déviations standard autour du nombre attendu de décès.
                
                Par exemple, étant donné un pays qui a environ 300 morts par jour (moyenne attendue), et que ce nombre
                varie habituellement avec une déviation standard de 30 (autrement dit, ~95% des décès se situent dans
                la tranche entre 240 et 360 décès). Imaginons qu'un jour, 345 décès soient constatés; le z-score serait
                alors de (345-300)/30=1.5.
                
                EuroMOMO donne les courbes des z-score chaque semaine.
                Le problème est qu'un z-score ne permet pas une comparaison aisée relative entre les pays. 
                Il permet plutôt d'attirer l'attention sur une anomalie par rapport à la normale, mais il ne permet en aucun cas d'estimer l'excès de mortalité d'un pays à l'autre sur une même semaine.
                
                La formule d'un z-score est (x(t)-baseline) / sd. Il est tout à fait raisonnable de considérer que la baseline et l'écart type (sd) sont constant depuis la pandémie du COVID19.
                Si nous connaissons la mortalité hebdomadaire d'un pays pour deux semaines différentes, nous pouvons donc résoudre un système de deux équations à deux inconnues pour retrouver les valeurs baseline et sd propres à chaque pays.
                Voici les valeurs que nous avons retrouvées pour certains pays.
                 
            
                | Country      | baseline | sd |
                |--------------|----------|--------------------|
                | UK (England) | 10954    | 154                |
                | Netherlands  | 3024     | 84                 |
                | Belgium      | 2166     | 68                 |
                | France       | 10391    | 251                |
            
                Nous avons tracés ci dessous la courbe x(t) ainsi retrouvée divisée par la baseline.
                Cette courbe nous donne une bonne estimation de la surmortalité chaque semaine dans les pays.
            """,
                            en="""\
                EuroMOMO monitors the mortality of 24 countries (or parts or them) and reports them on its website.
                The mortalities are not given in raw numbers, but rather as z-scores, which are the number of 
                standard deviations around the expected number of death.
                
                For example, if a country has usually 300 deaths per day (expected baseline), but that number usually 
                varies such that its standard deviation is 30 (i.e. 95% of the seen death are between 240 and 360),
                and that the number of death seen on a particular day is 345, then the z-score is (345-300)/(30)=1.5.
                
                EuroMOMO gives the z-score curves every week.
                The problem is that a z-score does not allow an easy relative comparison between countries.
                Rather, it draws attention to an abnormality compared to normal, but it does not in any case allow to estimate the excess mortality from one country to another over the same week.
                    
                The formula for a z-score is (x(t)-baseline) / sd. It is entirely reasonable to consider that the baseline and the standard deviation (sd) have been constant since the COVID19 pandemic.
                If we know the weekly mortality of a country for two different weeks, we can therefore solve a system of two equations with two unknowns to find the baseline and sd values specific to each country.
                Here are the values that we found for certain countries.
            
            
                | Country      | baseline | sd |
                |--------------|----------|--------------------|
                | UK (England) | 10954    | 154                |
                | Netherlands  | 3024     | 84                 |
                | Belgium      | 2166     | 68                 |
                | France       | 10391    | 251                |
            
            
                We have plotted below the curve x (t) thus found divided by the baseline.
                This curve gives us a good estimate of the excess mortality each week in the countries.
            """)),
        dbc.Row([
            dbc.Col(
                display_graphic(id='euromomo-ratio',
                                figure=euromomo_ratio(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(gettext("Where are the peaks?")),
        custom_warning_box(
            gettext(
                "Z-scores CANNOT be compared country-to-country. The plot below can only be used to"
                " find when the peaks happened.")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='euromomo-zscores',
                                figure=euromomo_zscores(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_euromomo)
    ]
Exemple #26
0
def display_age_groups():
    return [
        html.H2(
            get_translation(fr="Nombre de case par groupe d'age",
                            en="Number of cases per age group")),
        html.P(
            gettext(
                get_translation(
                    fr=
                    """C'est le nombre de cas testés positifs rapportés par Sciensano. 
                  Le nombre de cas positifs réel peut être (beaucoup) plus important.
                  Notez que le nombre de tests quotidien augmente également. Voir notre page testing.
            """,
                    en="""
            This is the number of positive test cases reported by Sciensano. 
            The number of actual positive cases can be (much) higher.
            Note that the number of daily tests is also increasing. See our testing page."""
                ))),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-cases-distribution-percentage',
                                figure=age_group_cases_relative(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            get_translation(
                fr=
                "Augmentation relative sur une semaine dans chaque groupe d'age",
                en="Relative increase wrt to previous week in each age group")
        ),
        dbc.Row([
            dbc.Col(
                display_graphic(id='relative_increase_age_group_plot',
                                figure=relative_increase_age_group_plot(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            get_translation(
                fr="Nombre de cas par 100K dans la population du groupe d'age",
                en="Number of cases per 100K in the age group population")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-cases-relative100K',
                                figure=incidence_age_group_plot(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            get_translation(fr="Evolution de l'age moyen des cas",
                            en="Evolution of the average age of cases")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-cases-average-agge',
                                figure=average_age_cases(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            get_translation(
                fr="Repartition de cas depuis le début de l'épidémie",
                en="Distribution of cases since the beginning")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-cases-pie',
                                figure=age_groups_cases_pie(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
def display_a():
    return [
        html.H1(
            get_translation(
                en='Case History of the Coronavirus (COVID-19)',
                fr='Historique des cas de coronavirus (COVID-19)',
            )),
        html.Div(
            className="row",
            children=[
                html.Div(className="four columns",
                         style={
                             'width': '25%',
                             'margin-right': '5%'
                         },
                         children=[
                             html.H5(get_translation(
                                 en='Country',
                                 fr='Pays',
                             )),
                             dcc.Dropdown(id='country',
                                          options=[{
                                              'label': c,
                                              'value': c
                                          } for c in countries],
                                          value='China')
                         ]),
                html.Div(className="four columns",
                         style={
                             'width': '25%',
                             'margin-right': '5%'
                         },
                         children=[
                             html.H5(
                                 get_translation(
                                     en='State / Province',
                                     fr='Etat / Province',
                                 )),
                             dcc.Dropdown(id='state')
                         ]),
                html.Div(
                    className="four columns",
                    style={
                        'width': '25%',
                        'height':
                        '150px',
                        'margin-right': '5%'
                    },
                    children=[
                        html.H5(get_translation(
                            en='Criteria',
                            fr='Critères',
                        )),
                        dcc.Checklist(id='metrics',
                                      options=[{
                                          'label': l,
                                          'value': v
                                      } for (l, v) in [(get_translation(
                                          en='Confirmed',
                                          fr='Confirmés',
                                      ), 'Confirmed'),
                                                       (get_translation(
                                                           en='Deaths',
                                                           fr='Décès',
                                                       ), 'Deaths'),
                                                       (
                                                           get_translation(
                                                               en='Recovered',
                                                               fr='Rétablis',
                                                           ),
                                                           'Recovered',
                                                       )]],
                                      value=['Confirmed', 'Deaths'],
                                      inputStyle={
                                          "vertical-align": "middle",
                                          'margin': '2%',
                                          "margin": "auto"
                                      },
                                      labelStyle={
                                          "vertical-align": "middle",
                                          'margin': '2%'
                                      },
                                      style={
                                          "display": "inline-flex",
                                          "flex-wrap": "wrap",
                                          "justify-content": "space-between",
                                          "line-height": "28px"
                                      })
                    ])
            ]),
        dcc.Graph(id="plot_new_metrics", config={'displayModeBar': False}),
        dcc.Graph(id="plot_cum_metrics", config={'displayModeBar': False}),
        dcc.Interval(
            id='interval-component',
            interval=3600 * 1000,  # Refresh data each hour.
            n_intervals=0),
        display_source_providers(source_hopkins)
    ]
Exemple #28
0
def display_brussels():
    return [
        html.H3(gettext("Tunnel traffic")),
        html.P(
            gettext(
                get_translation(
                    fr=
                    """Nombre de véhicules passant chaque heure dans les tunnels principaux de Bruxelles.""",
                    en=
                    """Number of vehicles passing every hour through the main tunnels of Brussels."""
                ))),
        html.H3(gettext("Brussels tunnels traffic working days 7:00-8:00")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='brussels-tunnel',
                          figure=brussels_tunnels(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            gettext(
                "Brussels tunnels relative traffic working days 7:00-8:00")),
        html.P(
            gettext(
                get_translation(
                    fr=
                    """Divisé par le nombre moyen de véhicules enregistré sur la période 1er Féb - 10 Mars""",
                    en=
                    """Divided by the average number of vehicles recorded over the period Feb 1 - March 10"""
                ))),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='brussels-tunnel-ratio',
                          figure=brussels_tunnels_ratio(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            gettext(
                "Brussels all tunnels relative traffic working days 7:00-8:00")
        ),
        html.P(
            gettext(
                get_translation(
                    fr=
                    """Divisé par le nombre moyen de véhicules enregistré sur la période 1er Féb - 10 Mars""",
                    en=
                    """Divided by the average number of vehicles recorded over the period Feb 1 - March 10"""
                ))),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='brussels-tunnel-ratio',
                          figure=brussels_alltunnels_ratio(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_brussels_mobility),
        html.H2(gettext("Apple Mobility Report")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='eucities-apple',
                          figure=apple_mobility_plot_cities(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_apple_mobility),
    ]
def display_facebook_eu():
    return [
        html.H3(
            get_translation(fr="Graphs based on the number of FB users who moved between two EU countries in a 24 hour period (avg 7 days)",
                            en="Graphs based on the number of FB users who moved between two EU countries in a 24 hour period (avg 7 days)")),

        html.Label([gettext(get_translation(fr="Destination Country", en="Destination Country")), dcc.Dropdown(
            id='countries-dropdown-eu',
            options=[{'label': c, 'value': c} for c in countries],
            value='belgium',
            clearable=False
        )],
        style=dict(width='50%')),
        html.Label([gettext(get_translation(fr="Jour", en="Day")), dcc.Dropdown(
            id='countries-day-dropdown-eu',
            options=[{'label': 'all-days-moving-avg-7', 'value': 9},
                     {'label': 'all-days', 'value': 8},
                     {'label': 'monday', 'value': 0},
                     {'label': 'tuesday', 'value': 1},
                     {'label': 'wednesday', 'value': 2},
                     {'label': 'thursday', 'value': 3},
                     {'label': 'friday', 'value': 4},
                     {'label': 'saturday', 'value': 5},
                     {'label': 'sunday', 'value': 6}],
            value=8,
            clearable=False
        )],
        style=dict(width='50%')),
        dcc.Graph(id='graph-countries-eu'),

        dbc.Row([
            dbc.Col(display_graphic(id='plot_tot_travel',
                                    figure=plot_tot_travel(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='plot_tot_travel',
                                    figure=plot_tot_cases(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='plot_tot_fraction_countries',
                                    figure=plot_tot_fraction_countries(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='plot_in_per_million',
                                    figure=plot_in_per_million(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='plot_imported_cases_per_millions',
                                    figure=plot_imported_cases_per_millions(),
                                    config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='fraction_imported_cases_over_tot_cases',
                                    figure=fraction_imported_cases_over_tot_cases(),
                                    config=dict(locale=str(get_locale())))),
        ]),
    display_source_providers(source_facebook)
    ]
Exemple #30
0
def display_age_groups():
    return [
        html.H2(gettext("Overall (Weekly) Mortality Only (STATBEL Data)")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-death-statbel',
                          figure=death_age_groups("stack"),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-death-statbel-stack',
                          figure=death_age_groups(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("History of death 85+ only")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-death-statbel-hist',
                          figure=death_85plus_hist(),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='death-statbel-85+-hist-cum',
                          figure=death_85plus_hist_cum(),
                          config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("History of death all population")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-death-statbel-hist',
                          figure=death_hist(),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='death-statbell-all-hist-cum',
                          figure=death_plus_hist_cum(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_statbel),
        html.H2(gettext("COVID (Daily) Mortality (Sciensano Data)")),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-death',
                          figure=age_groups_death(),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-death-stack',
                          figure=age_groups_death("stack"),
                          config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='age-group-death-pie',
                          figure=age_groups_death_pie(),
                          config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]