Beispiel #1
0
def display_obituary():
    return [
        html.H2(
            gettext(
                "Evolution of the number of deaths published on obituary websites"
            )),
        dcc.Markdown(
            get_translation(
                fr="""
            Les données rapportées sont téléchargées des sites mortuaires belges (necro.sudpress.be, dansnospensees.be). 
            Au total, nous capturons environ 1/3 des décès en Belgique. 
            Nous pensons que cela est suffisamment représentatif de la situation de surmortalité due au COVID19. 
            La Flandre et Bruxelles semblent sous représentés dans les sites belges et reflète dès lors davantage la situation en Wallonie.
            """,
                en="""
            The reported data are crawled from the Belgian (necro.sudpress.be, dansnospensees.be) mortuary sites daily.
            In total, we capture around 1/3 of the daily deaths in Belgium with these data.
            We believe that this is sufficiently representative of the excess mortality situation due to COVID19.
            Flanders and Brussels seem underrepresented in Belgian sites and therefore more closely reflect the situation in Wallonia.
            """,
            )),
        dbc.Row([
            dbc.Col(
                display_graphic(id='sud_presse',
                                figure=sud_presse(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='dans_nos_pensees',
                                figure=dans_nos_pensees(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_inmemoriam, source_necro_sudpress)
    ]
Beispiel #2
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)
    ]
Beispiel #3
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)
    ]
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)
    ]
Beispiel #5
0
def display_region():
    return [
        html.H2(gettext(
            get_translation(en="Positive cases (avg 7 days)",
                            fr="Numbre de cas positifs (moy 7 jours)"))),
        dbc.Row([
            dbc.Col(display_graphic(id='casesrelregion', figure=cases_relative_region(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H2(gettext(
            get_translation(en="Positive Rate % (avg 7 days)",
                            fr="Taux de positivité % (moy 7 jours)"))),
        dbc.Row([
            dbc.Col(display_graphic(id='positive_rate_region', figure=positive_rate_region(),
                                    config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H2(gettext(
            get_translation(en="Number of tests/ 100K inhabitants (avg 7 days)",
                            fr="Nombre de tests/ 100K habitant (moy 7 jours)"))),
        dbc.Row([
            dbc.Col(display_graphic(id='number_of_test_per_inhabitant_region', figure=number_of_test_per_inhabitant_region(),
                                    config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H2(gettext(
            get_translation(en="Ratio New Hospi (avg 7 days) / Cases (avg 7 days)",
                            fr="Ratio New Hospi (moy 7 jours) / Cas (moy 7 jours)"))),
        dbc.Row([
            dbc.Col(display_graphic(id='ratio_case_hospi_region',
                                    figure=ratio_case_hospi_region(),
                                    config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        display_source_providers(source_sciensano, source_map_provinces)
    ]
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)
    ]
def display_admin():
    return [
        html.H2(gettext(
            get_translation(en="Number of cases per admin region", fr="Nombre de cas par arrondissement"))),
        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."""))),

        html.H3(gettext(
            get_translation(en="Incidence: Number of cases/100K inhabitants over the past 14 days (click to see the evolution)", fr="Incidence: Nombre de cas/100K habitants sur les 14 derniers jours (cliquez pour voir l'évolution)"))),
        html.H4(get_translation(
            en="""click on a region to see the cases barplot""",
            fr="""cliquez sur un arrondissement pour observer l'historique des cas""",
        )),
        dbc.Row([
            dbc.Col(display_graphic(id='map_cases_incidence_nis3', figure=map_cases_incidence_nis3(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='map_cases_incidence_nis3_percentage', figure=map_increase_incidence_admin_region_percentage(),
                                    config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='barplot_admin', style={"display": "none"}, figure=barplot_admin(),
                                    config=dict(locale=str(get_locale()))))
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='cases-province-scatter-incidence', figure=scatter_incidence_nis3(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H3(gettext(
            get_translation(en="Plot over time  (double click in the legend to isolate one region)", fr="Evolution dans le temps (double click dans la legende pour isoler une region)"))),
        dbc.Row([
            dbc.Col(display_graphic(id='cases-admin-daily-bar-chart', figure=plot_cases_daily_admin_region_overtime(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='cases-province-daily-bar-chart-perhabittant', figure=plot_cases_per_habittant_admin_region_overtime(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H3(gettext(get_translation(en="Total Number of cases since beginning", fr="Nombre de cas total depuis le début"))),
        dbc.Row([
            dbc.Col(display_graphic(id='tot-cases-province-map', figure=map_totcases_admin_region(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H3(gettext(get_translation(en="Total Number of cases per 1000 inhabitants since the beginning",
                                        fr="Nombre de cas total pour 1000 habitants depuis le début "))),
        dbc.Row([
            dbc.Col(display_graphic(id='perhabittant-cases-province-map', figure=map_cases_per_habittant_admin_region(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        display_source_providers(source_sciensano, source_map_provinces)
    ]
Beispiel #8
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),
    ]
Beispiel #9
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),
    ]
Beispiel #10
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),

    ]
Beispiel #11
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)
    ]
Beispiel #12
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_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(display_graphic(id='cases per country eu',
                                    figure=plot_cases_eu(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='cases per country internation',
                                    figure=plot_cases_international(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='tot cases per country',
                                    figure=lines_cases_per_million_not_log(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        display_source_providers(source_hopkins)
    ]
Beispiel #14
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)
    ]
Beispiel #15
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_overmortality():
    age_estimate, pie_estimate = overmortality_estimates_repartition()

    return [
        dcc.Markdown(
            get_translation(
                en="""
                ## Overmortality analysis
                
                Many persons have died from Covid-19, but some of them would have died even in the absence of the coronavirus
                in Belgium. The amount of deceased people that are not in this category is called the **overmortality**.
                
                This page attempts at giving ideas and estimates about the overmortality attributable to the Covid-19.
                
                ### 1. Covid-19 daily deaths against *all* expected deaths
                """,
                fr="""
                ## Analyse de la surmortalité

                Beaucoup de personnes sont décédées du Covid-19, mais plusieurs d'entre elles seraient décédées 
                d'autres causes si le coronavirus n'était pas présent en Belgique. Le nombre de personnes qui ne sont
                pas dans ce cas est appelé la **surmortalité** imputable au coronavirus.
                
                Cette page tente de donner une idée et une estimation de la surmortalité due au coronavirus.

                ### 1. Décès journaliers liés au Covid-19 comparés aux décès attendus
            """,
            )),
        display_graphic(figure=daily_deaths(),
                        config=dict(locale=str(get_locale()))),
        dcc.Markdown(
            get_translation(en="""
            This graphic plots side-by-side the amount of expected death during an average day in Belgium (in 2018, this
            amounts to approximately 300 deaths each day), and the amount of people that died from Covid-19. The number
            of coronavirus-linked deaths is already significant compared to the expected death count. 
            
            These two numbers cannot be added directly: many people that died from the coronavirus would have died from
            other causes during the year: there is an intersection between the sets.
            
            ### 2. Covid-19 daily deaths against expected deaths *from respiratory diseases*
            
            We can nevertheless estimate this intersection. In Belgium, in 2016, approximately 10% of the deaths were 
            due to a respiratory problem (more or less 30 persons per day). 
            """,
                            fr="""
            Ce graphique montre côte-à-côte le nombre de décès attendus pendant un jour moyen en Belgique (en 2018, 
            c'était environ 300 décès par jour), et le nombre de décès liés au Covid-19. On notera que le nombre
            de décès dûs au Covid-19 est déjà élevé par rapport à la mortalité attendue.
            
            Ces deux nombres (mortalité "normale" et mortalité "supplémentaire" due au coronavirus) ne peuvent pas être
            additionnée directement: plusieurs personnes décédée du Covid-19 seraient de toute façon décédée dans un 
            futur proche d'autres causes. Il y a donc une intersection entre ces deux ensembles.
            
            ### 2. Mortalité journalière du Covid-19 comparée à la mortalité attendue *des maladies respiratoires*
            
            Nous pouvons néanmoins estimer cette intersection. En Belgique, en 2016, approximativement 10% des décès 
            étaient imputables à des problèmes respiratoires (environ 30 décès par jour).
            """)),
        display_graphic(figure=daily_deaths_respiratory(),
                        config=dict(locale=str(get_locale()))),
        dcc.Markdown(
            get_translation(en="""
            As death induced by the coronavirus will be attributed to the respiratory illness category, we can compute
            the overmortality in that particular category (shown in grey in the plot). The overmortality computed this 
            way is thus a **lower bound** on the effective overmortality: some people die from respiratory diseases 
            not linked to the coronavirus, even during this period.
            
            ### 3. Overmortality per day **from respiratory diseases**
            
            We can apply this equation on every day since the beginning of the epidemy:
            """,
                            fr="""
            Etant donné que les morts dûes au coronavirus seront attribuées à la catégorie des décès causés par des
            problèmes respiratoires, nous pouvons calculer la surmortalité dans cette catégorie particulière (montrée
            en gris dans le graphique ci-dessus). La surmortalité calculée de cette manière est en fait une 
            sous-estimation de la surmortalité effective (pour cause respiratoire): malgré le coronavirus, des
            personnes continuent de mourir de cause respiratoires non liées au Covid-19.
            
            ### 3. Surmortalité journalière **de cause respiratoire**
            
            Nous pouvons appliquer ce calcul pour chaque jour depuis le début de l'épidémie:
            """)),
        display_graphic(figure=overmortality_respiratory_line(),
                        config=dict(locale=str(get_locale()))),
        dcc.Markdown(
            get_translation(en="""
            Since the beginning of the epidemy, this amounts to {total} deaths in overmortality in the respiratory 
            diseases category.
            
            ### 4. Estimating general overmortality
            """,
                            fr="""
            Depuis le début de l'épidémie, cela représente {total} décès en surmortalité (toujours, et uniquement, 
            dans la catégorie des décès liés à des problèmes respiratoires).
            
            ### 4. Estimer la surmortalité générale
            """).format(total=int(overmortality_respiratory_count()))),
        *model_warning(
            dcc.Markdown(
                get_translation(en="""
                We computed the overmortality due to respiratory illnesses; it does not give us directly information about 
                the overmortality in general. We must take into account these factors:
                - The actual overmortality in the respiratory illness category is actually higher (everyone is not dying 
                  from the Covid-19 in that category);
                - there will be undermortality due to the coronavirus in other categories (car accidents, for example, 
                  occur less due to confinement). Additionally, some people dying from coronavirus infection would have 
                  died from other causes;
                - there will be overmortality in other categories, for example an increase in suicides, and problems due to 
                  people going less often to the doctor and the hospital for other illnesses.
        
                All-in-all, we can make the hypothesis that the respiratory surmotality is a good estimate of the effective 
                overmortality (we actually expect it to be lower than the truth). This overmortality is to be compared with 
                the other sources of mortality. Let us take an example for a specific day:
                """,
                                fr="""
                Nous avons calculé ci-dessus la surmortalité dans la catégorie des maladies respiratoires; cela ne nous
                donne pas d'information à propos de la surmortalité générale. Nous devons prendre en compte ces 
                facteurs:
                - The surmortalité réelle dans la catégorie des maladies respiratoires est en vérité plus élevée que le
                  calcul ci-dessus (tout le monde dans cette catégorie ne meurt pas du Covid-19);
                - il y aura une sous-mortalité, causée par le coronavirus, dans d'autres catégorie (par exemple,
                  moins d'accidents de voiture grâce au confinement). Par ailleurs, certaines personnes décédées du
                  coronavirus seraient décédées d'autres causes dans un futur proche;
                - une surmortalité sera présente également dans d'autres catégories: par exemple, l'on peut s'attendre
                  à une augmentation des suicides dûe au confinement, et à des maladies non prises en charge à temps 
                  étant donné que la population évite les hopitaux.
                  
                En prenant tout ces facteurs en compte, l'on peut poser l'**hypothèse** que la surmortalité respiratoire 
                est une estimation raisonable de la surmortalité totale (nous nous attendons à ce qu'elle soit en fait
                une sous-estimation). Cette surmortalité doit être comparée par rapport aux autres facteurs de décès.
                On peut prendre l'exemple d'un jour moyen:
                """)),
            display_graphic(figure=age_estimate,
                            config=dict(locale=str(get_locale()))),
            display_graphic(figure=pie_estimate,
                            config=dict(locale=str(get_locale()))),
        ),
        display_source_providers(source_sciensano, source_death_causes)
    ]
Beispiel #17
0
def display_cases_correction():
    return [
        dcc.Markdown(
            get_translation(fr="""
                        ## Et si la première vague n'était pas correcte?
                    """, )),
        *model_warning(
            dcc.Markdown(
                get_translation(fr="""
                    Nous entendons souvent que la deuxième vague est fort différente de la première, car celle-ci touche 
                    beaucoup plus les jeunes (c’est-à-dire la population active <60 ans, en bleu ci-dessus) que lors de 
                    la première vague qui touchait essentiellement les >60 ans (en rouge). 
                    C’est en effet ce que montrent les données brutes.
                """, )),
            dbc.Row([
                dbc.Col(
                    display_graphic(id='age-group-cases-real',
                                    figure=age_groups_pop_active_cases(),
                                    config=dict(locale=str(get_locale())))),
            ]),
            dcc.Markdown(
                get_translation(fr=""" 
                    Cependant, une phrase de la conférence de presse de Sciensano aujourd’hui peut nous 
                    laisser penser que ceci n’est pas correct et que nous pourrions légitimement redessiner 
                    la première vague afin que celle-ci colle plus avec la réalité. C’est l’exercice que nous faisons ici.
                    
                    Faisons d’abord quelques hypothèses qui nous paraissent réalistes.
                    Supposons tout d'abord qu’une personne positive dans sa tranche d'âge aujourd’hui à la même probabilité 
                    de terminer hospitalisée qu’au début de l’épidémie. 
                    Appelons cette hypothèse la stabilité de la dangerosité du virus 
                    (cette hypothèse pourrait ne pas être vraie si sa virulence s´est affaiblie mais ceci n'a pas été 
                    démontré à l´heure actuelle).
                    
                    Sciensano annonce aujourd’hui durant la conférence de presse que, depuis le 22 juin, 
                    l'âge médian des personnes hospitalisées est de 65 ans, or avant cette date il était plutôt de 70 ans. 
                    Nous pouvons donc supposer que la distribution d’âge des personnes hospitalisées est restée relativement stable 
                    (merci à Sciensano de mettre les données à disposition pour que nous puissions confirmer ou infirmer cette hypothèse). 
                    
                    En utilisant notre hypothèse de stabilité de la dangerosité du virus, 
                    cela signifierait qu’il doit y avoir environ la même proportion de cas positifs dans les tranches d'âge 
                    aujourd’hui que durant la première vague. 
                    
                    Utilisons cette déduction pour tenter de corriger la courbe des contaminations de la première vague.
    
                    Depuis le 22 juin, 14% des tests positifs concernent des personnes de plus de 60 ans. 
                    Le testing est beaucoup plus exhaustif aujourd’hui, nous allons donc supposer que cette proportion est correcte.
    
                    Supposons que le nombre  de personnes de plus de 60 ans contaminées était correct également durant la 
                    première vague. Cette hypothèse est probablement fausse puisque nous testions alors uniquement les cas 
                    symptomatiques, mais elle est cependant conservatrice pour notre exercice de correction de la courbe.
    
                    Cela signifierait que nous pouvons multiplier le nombre de cas de moins de 60 ans par un facteur 
                    correctif 1/14% = 7.14. Nous obtenons alors cette courbe corrigée des cas positifs mettant en 
                    perspective l’importance de la première vague par rapport au rebond que nous connaissons depuis mi-juillet:
                """, )),
            dbc.Row([
                dbc.Col(
                    display_graphic(
                        id='age-group-cases-corrected',
                        figure=age_groups_pop_active_hypothetical(),
                        config=dict(locale=str(get_locale())))),
            ]), display_source_providers(source_sciensano, ))
    ]
Beispiel #18
0
def municipalities():
    return [
        html.H2(
            gettext(
                get_translation(en="Number of cases per municipality",
                                fr="Nombre de cas par commune"))),
        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 varie é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 varies also. See our testing page.
            """))),
        html.H3(
            gettext(
                get_translation(
                    en=
                    "Incidence: Number of cases/100K inhabitants over the past 14 days",
                    fr=
                    "Incidence: Nombre de cas/100K habitants sur les 14 derniers jours"
                ))),
        html.H4(
            get_translation(
                en="""click on a municipality to see the cases barplot""",
                fr=
                """cliquez sur une commune pour observer l'historique des cas""",
            )),
        dbc.Row([
            dbc.Col(display_graphic(id='map_cases_incidence_nis5',
                                    figure=map_cases_incidence_nis5(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='cases-overview-histogram',
                                style={"display": "none"},
                                figure=barplot_communes(),
                                config=dict(locale=str(get_locale()))))
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='cases-province-map',
                                    figure=bubble_map_cases_incidence_nis5(),
                                    config=dict(locale=str(get_locale()))),
                    className="col-12"),
        ]),
        html.H3(
            get_translation(
                en="""Percentage of cases in the population since beginning""",
                fr="""Percentage de cas dans la population depuis le début""",
            )),
        dbc.Row([
            dbc.Col(
                display_graphic(id='map_bubble_communes_since_beginning',
                                figure=map_bubble_communes_since_beginning(),
                                config=dict(locale=str(get_locale()))))
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='map_communes_per_inhabitant',
                                figure=map_communes_per_inhabitant(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano, source_map_communes,
                                 source_pop)
    ]
Beispiel #19
0
def display_facebook():
    return [
        html.P(
            gettext(
                get_translation(fr="""
                Toutes les données présentées dans les visualisations ci-dessous concernent uniquement les utilisateurs de Facebook ayant activé leur localisation.
                """,
                                en="""
                All data visualized below only concerns Facebook users who activate their localization.
                """))),
        html.H3(
            gettext(
                get_translation(
                    fr=
                    "Changement du nombre de tuiles visitées quotidiennement par rapport à la normale",
                    en=
                    "Change in the daily number of tiles visited wrt normality"
                ))),
        html.Span(gettext(get_translation(fr="Une ", en="A "))),
        html.
        A(gettext(get_translation(fr="tuile", en="tile")),
          href=
          "https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system",
          target="_blank"),
        html.Span(
            gettext(
                get_translation(fr="""
                est zone géographique de 600x600m. L'indicateur représenté sur le graphe présente pour chaque jour le changement dans la mobilité des utilisateurs par rapport à la normale.
                Plus précisément, c'est le nombre moyen de tuiles différentes visitées sur une journée divisé par cette valeur en temps normal.
                Les valeurs caractérisant la normalité ont été calculées sur les 45 jours précédant le début du graphe et pour chacun des jours de la semaine.
                """,
                                en="""
                is a 600x600m geographical area. The metric shown on the graph indicates the daily evolution of the mobility to a normal period.
                More precisely, it is the average number of unique tiles visited during a day divided by that same value computed for a normal period.
                Values considered as normal were computed over the 45 days before the start of this graph and for each separate weekday.
                """))),
        dbc.Row([
            dbc.Col(
                display_graphic(id='movement',
                                figure=movement(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='ratio-tiles-map',
                                figure=map_ratio_tiles_fb(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            gettext(
                get_translation(
                    fr=
                    "Fraction des utilisateurs restant dans la même tuile toute la journée (moyenne 7 jours)",
                    en=
                    "Ratio of users staying in one tile for the whole day (avg 7 days)"
                ))),
        html.Span(
            gettext(
                get_translation(
                    fr=
                    "Comme pour le graphe précédent, on considère des zones géographiques de 600x600m (",
                    en=
                    "As for the previous graph, we consider 600x600m geographical areas ("
                ))),
        html.
        A(gettext(get_translation(fr="tuiles", en="tiles")),
          href=
          "https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system",
          target="_blank"),
        html.Span(
            gettext(
                get_translation(fr=""").
                Cet indicateur donne une idée de la proportion de la population restant à (ou très proche de) son domicile toute la journée.
                Par exemple, si je rends visite à mes grand-parents qui habitent le village voisin à quelques kilomètres de chez moi,
                je vais traverser plusieurs tuiles sur la journée et ainsi faire partie des utilisateurs n'étant pas restés fixes pendant toute la journée.
                """,
                                en=""").
                This metric gives insights about the fraction of the population who stays at home (or close to it) during the whole day.
                For instance, if I visit my grandparents in a village distant by a few kilometers, I will cross several tiles and thus
                will not belong to the users who stayed put for the whole day.
                """))),
        dbc.Row([
            dbc.Col(
                display_graphic(id='staying-put',
                                figure=staying_put(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='staying-put-map',
                                figure=map_staying_put(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            gettext(
                get_translation(
                    fr="Flux d'utilisateurs entre arrondissements",
                    en="Flux of users between administrative units"))),
        html.P(
            gettext(
                get_translation(fr="""
                Pour chaque arrondissement, on observe l'évolution du flux d'utilisateurs entrant.
                """,
                                en="""
                We display for each administrative unit the evolution of incoming users by administrative unit.
                """))),
        html.Label([
            gettext(
                get_translation(fr="Arrondissement",
                                en="Administrative unit")),
            dcc.Dropdown(id='region-dropdown',
                         options=[{
                             'label': region,
                             'value': region
                         } for region in regions],
                         value='Brussel Hoofdstad',
                         clearable=False)
        ],
                   style=dict(width='50%')),
        html.Label([
            gettext(
                get_translation(fr="Heures de la journée (UTC)",
                                en="Time frame (UTC)")),
            dcc.Dropdown(id='interval-dropdown',
                         options=[{
                             'label': '20-4h',
                             'value': '0000'
                         }, {
                             'label': '4-12h',
                             'value': '0800'
                         }, {
                             'label': '12-20h',
                             'value': '1600'
                         }],
                         value='0000',
                         clearable=False)
        ],
                   style=dict(width='50%')),
        dcc.Graph(id='graph'),
        html.H3(
            gettext(
                get_translation(
                    fr=
                    "Lien de proportionnalité entre le nombre d'utilisateurs et la population réelle",
                    en=
                    "Proportionality between the number of users and the population"
                ))),
        html.P(
            gettext(
                get_translation(fr="""
                Comparaison du nombre d'utilisateurs de Facebook observés en moyenne chaque jour de la semaine (calculé sur 45 jours avant le 14 avril 2020) et de la population de chaque arrondissement.
                On observe une relation linéaire respectée dans tous les arrondissements.
                Les arrondissements de Soignies et La Louvière ne figurent pas sur cette visualisation car les données fournies par Facebook ne tiennent pas compte de la division de Soignies de janvier 2019.
                """,
                                en="""
                Comparison of the average number of Facebook users by weekday (computed over 45 days before April 14th 2020) with the population of each administrative unit.
                We observe a linear relation for all administrative units.
                Soignies and La Louvière are not shown on the visualization as Facebook data does not account for the split of Soignies in January 2019.
                """))),
        dbc.Row([
            dbc.Col(
                display_graphic(id='population-proportion',
                                figure=population_proportion(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_facebook)
    ]
def display_hospitals_prov():
    return [
        html.H3(gettext("New Hospitalization per province")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospitalization-prov-w1w2',
                                figure=hospi_new_in_per_provinces(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='in-out-prov',
                                figure=total_hospi_new_in_provinces(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='in_per100k_prov',
                                figure=new_in_per_100K_provinces(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(gettext("Total number of hospitalizations per province")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospitalization-prov-total',
                                figure=total_hospi_provinces(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            gettext(
                "Total number of hospitalizations per province per 100K inhabitants"
            )),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospi_provinces_per100k',
                                figure=hospi_provinces_per100k(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(
            gettext("Total number of hospitalizations Per 100K inhabitants")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='hospitalization100K-prov-map',
                                figure=map_hospi_per100K_provinces(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(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(
                display_graphic(id='icu-prov',
                                figure=total_icu_provinces(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H3(gettext("Total daily persons out of hospital per province")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='newout-prov',
                                figure=total_hospi_new_out_provinces(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_sciensano)
    ]
Beispiel #21
0
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)
    ]
Beispiel #22
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)
    ]
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"
                                      })
                    ])
            ]),
        display_graphic(id="plot_new_metrics",
                        config={'displayModeBar': False}),
        display_graphic(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)
    ]
Beispiel #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))
    ]
Beispiel #25
0
def display_facebook_lux():
    return [
        html.H3(
            gettext(
                get_translation(
                    fr="Flux d'utilisateurs entre arrondissements",
                    en="Flux of users between administrative units"))),
        html.P(
            gettext(
                get_translation(fr="""
                Pour chaque arrondissement, on observe l'évolution du flux d'utilisateurs entrant.
                """,
                                en="""
                We display for each administrative unit the evolution of incoming users by administrative unit.
                """))),
        html.Label([
            gettext(
                get_translation(fr="Arrondissement",
                                en="Administrative unit")),
            dcc.Dropdown(id='region-dropdown-lux',
                         options=[{
                             'label': region,
                             'value': region
                         } for region in regions],
                         value='Luxembourg',
                         clearable=False)
        ],
                   style=dict(width='50%')),
        html.Label([
            gettext(
                get_translation(fr="Heures de la journée (UTC)",
                                en="Time frame (UTC)")),
            dcc.Dropdown(id='interval-dropdown-lux',
                         options=[{
                             'label': '20-4h',
                             'value': '0000'
                         }, {
                             'label': '4-12h',
                             'value': '0800'
                         }, {
                             'label': '12-20h',
                             'value': '1600'
                         }],
                         value='0000',
                         clearable=False)
        ],
                   style=dict(width='50%')),
        dcc.Graph(id='graph-lux'),
        html.H3(
            gettext(
                get_translation(
                    fr="Flux d'utilisateurs (min 1000) vers un pays",
                    en="Flow of users (min 1000) to a country"))),
        html.Label([
            gettext(
                get_translation(fr="Destination Country",
                                en="Destination Country")),
            dcc.Dropdown(id='countries-dropdown',
                         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',
                         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'),
        html.H3(
            get_translation(fr="Imported cases per million inhabitants",
                            en="Imported cases per million inhabitants")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='facebook_imported_cases',
                                figure=facebook_imported_cases(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_facebook)
    ]
Beispiel #26
0
def display_tomtom():
    return [
        #dcc.Location(id='url', refresh=False),
        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(
                display_graphic(id='tomtom be',
                                figure=plot_tomtom_be_working_days(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("TomTom Traffic Index EU Cities 07:00-9:00")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='tomtom eu',
                                figure=plot_tomtom_eu_working_days(),
                                config=dict(locale=str(get_locale())))),
        ]),
        #html.H2(gettext("TomTom Traffic Index Belgium Cities and Neighbors 07:00-9:00")),
        #dbc.Row([
        #    dbc.Col(display_graphic(id='tomtom map usage',
        #                      figure=map_tomtom_be_working_days(),
        #                      config=dict(locale=str(get_locale())))),
        #]),
        # html.H2(gettext("TomTom Traffic Index All Cities")),
        # dbc.Row([
        #     dbc.Col(dcc.DatePickerSingle(id='tomtom-date-picker-single-id',
        #                                  min_date_allowed=dt.datetime(2020, 5, 7),
        #                                  max_date_allowed=dt.datetime.today().date(),
        #                                  date=dt.datetime.today().date()
        #                                  )),
        # ]),
        # dbc.Row([
        #     dbc.Col(dcc.Slider(id='tomtom-hour-picker-single-id',
        #                        min=0,
        #                        max=23,
        #                        step=1,
        #                        value=8,
        #                        marks={i: str(i)+"H" for i in range(24)}
        #             ))
        # ]),
        #dbc.Row([
        #    dbc.Col(display_graphic(id='tomtom-map-container-id',
        #                      #figure=map_tomtom_by_day(dt.datetime.today().date()),
        #                      config=dict(locale=str(get_locale())))),
        #    ]),
        display_source_providers(source_tomtom),
    ]
Beispiel #27
0
def display_provinces():
    return [
        html.H2(gettext(
            get_translation(en="Incidence: Number of cases/100K inhabitants over the past 14 days",
                            fr="Incidence: Nombre de cas/100K habitants sur les 14 derniers jours"))),
        dbc.Row([
            dbc.Col(display_graphic(id='map-incidence-provinces', figure=map_cases_incidence_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='scatter-incidence-province', figure=scatter_incidence_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H2(gettext(
            get_translation(en="Number of cases each day",
                            fr="Nombre de cas chaque jour"))),
        dbc.Row([
            dbc.Col(display_graphic(id='daily-cases-provinces', figure=bar_cases_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='avg-cases-provinces', figure=avg_cases_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H2(gettext(
            get_translation(en="Number of tests each day",
                            fr="Nombre de tests chaque jour"))),
        dbc.Row([
            dbc.Col(display_graphic(id='testing-provinces-bar', figure=bar_testing_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        dbc.Row([
            dbc.Col(display_graphic(id='avg-testing-provinces', figure=avg_testing_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H2(gettext(
            get_translation(fr="Taux de positivité % (#test positifs / #tests)",
                            en="Positive rate  % (#post test/#tests)"))),
        dbc.Row([
            dbc.Col(display_graphic(id='positive-rate-provinces', figure=avg_positive_rate_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H2(gettext(
            get_translation(fr="Nombre de tests / 100K habitants",
                            en="Number of tests / 100K inhabitants"))),
        dbc.Row([
            dbc.Col(display_graphic(id='avg-testing-per-habbitant_provinces', figure=avg_testing_per_habbitant_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        html.H2(gettext("Number of cases since beginning / 1000 inhabitants")),
        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='cases-province-map-since-beginning', figure=map_provinces(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
            dbc.Col(display_graphic(id='cases-province-barplot-since-beginning', figure=barplot_provinces_cases(),
                              config=dict(locale=str(get_locale()))), className="col-12"),
        ]),
        display_source_providers(source_sciensano, source_map_provinces)
    ]
Beispiel #28
0
def display_age_groups():
    return [
        html.H2(
            gettext(
                "Overall (Daily) Mortality All Population (STATBEL Data)")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-death-statbel-sinplot',
                                figure=daily_death_all(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-death-statbel-sinplot-deviation',
                                figure=daily_death_all_deviation_sin(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(
            gettext("Overall (Daily) Mortality By Age-group (STATBEL Data)")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-death-statbel-daily',
                                figure=daily_death_ag(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='age-group-death-statbel-daily',
                                figure=daily_death_ag_relative(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("Covid vs Non-Covid Death per age-group")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='fig_ag_death_decompose_time',
                                figure=fig_ag_death_decompose_time(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='fig_ag_death_decompose_aggregate',
                                figure=fig_ag_death_decompose_aggregate(),
                                config=dict(locale=str(get_locale())))),
        ]),
        html.H2(gettext("History of death all population")),
        dbc.Row([
            dbc.Col(
                display_graphic(id='death_arrondissements_map_yearly',
                                figure=death_arrondissements_map_yearly(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='death-statbell-all-hist-cum',
                                figure=death_plus_hist_cum(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='death-statbell-all-hist-cum',
                                figure=death_plus_hist_cum(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='death_cum_january_2021',
                                figure=death_cum_january_2021(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='death_cum_january',
                                figure=death_cum_january(),
                                config=dict(locale=str(get_locale())))),
        ]),
        dbc.Row([
            dbc.Col(
                display_graphic(id='death_cum_january_additional',
                                figure=death_cum_january_additional(),
                                config=dict(locale=str(get_locale())))),
        ]),
        display_source_providers(source_statbel),
    ]