Beispiel #1
0
from flask_babel import lazy_gettext

from pages import AppMenu, AppLink
from pages.international.euromomo import display_euromomo
from pages.international.evolution_per_country import display_a,callback_a
from pages.international.cases_per_million import display_cases_per_million
from pages.international.deaths_per_million import display_deaths_per_million, callback_deaths_per_million
from pages.international.hospitalisations import display_hospi_international, callback_display_hospi_international

international_menu = AppMenu("International", "/international", [
    #AppLink("EUROMOMO", "EUROMOMO", "/euromomo", display_euromomo),
    AppLink(lazy_gettext("Evolution per country"), lazy_gettext("Evolution per country"), "/evolution_per_country", display_a, callback_fn=callback_a,invisible=True),
    AppLink(lazy_gettext("Cases per million"), lazy_gettext("Cases per million"), "/cases_per_million", display_cases_per_million),
    AppLink(lazy_gettext("Deaths per million"), lazy_gettext("Deaths per million"), "/deaths_per_million", display_deaths_per_million, callback_fn=callback_deaths_per_million,invisible=True),
    AppLink(lazy_gettext("Hospitalizations EU"), lazy_gettext("Hospitalizations EU"), "/hospi_per_100k",
            display_hospi_international, callback_fn=callback_display_hospi_international),

])
Beispiel #2
0
            """,
                fr="""
            Nous sommes une équipe spécialisée en [AI, Analytics] (https://aia.info.ucl.ac.be/people/) et [Informatique] (https://uclouvain.be/fr/instituts-recherche/icteam / ingi) de @UCLouvain_be et @EPL_UCLouvain.
            Nous produisons ce site Internet dans l'espoir qu'il puisse vous aider à mieux comprendre et analyser objectivement l'impact de la crise COVID sur la Belgique et ses régions.

            Les principaux contributeurs actuels de ce projet sont:
 
            - [Guillaume Derval, UCLouvain] (https://www.linkedin.com/in/guillaumederval/)
            - [Pierre Schaus, UCLouvain] (https://www.info.ucl.ac.be/~pschaus)
            - [Vincent François, UCLouvain] (http://vincent.francois-l.be)
            - [Alexey Medvedev, UNamur, UCLouvain] (http://alexeymedvedev.com)
            - [Vianney Coppé, UCLouvain] (https://aia.info.ucl.ac.be)
            
            Nous avons également reçu des contributions de 
            
            - [John Aoga, UCLouvain] (https://scholar.google.be/citations?user=SZWEYcsAAAAJ&hl=fr), graphiques des données TomTom

            """,
            ))
    ]


index_menu = AppMenu('index',
                     '', [
                         AppLink(lazy_gettext("Home"), lazy_gettext("Home"),
                                 '/index', display_index),
                         AppLink(lazy_gettext("About"), lazy_gettext("About"),
                                 '/about', display_about)
                     ],
                     fake_menu=True)
Beispiel #3
0
from flask_babel import lazy_gettext

from pages import AppMenu, AppLink
from pages.international.euromomo import display_euromomo
from pages.international.evolution_per_country import display_a,callback_a
from pages.international.cases_per_million import display_cases_per_million, callback_cases_per_million
from pages.international.deaths_per_million import display_deaths_per_million, callback_deaths_per_million

international_menu = AppMenu("International", "/international", [
    #AppLink("EUROMOMO", "EUROMOMO", "/euromomo", display_euromomo),
    AppLink(lazy_gettext("Evolution per country"), lazy_gettext("Evolution per country"), "/evolution_per_country", display_a, callback_fn=callback_a),
    AppLink(lazy_gettext("Cases per million"), lazy_gettext("Cases per million"), "/cases_per_million", display_cases_per_million, callback_fn=callback_cases_per_million),
    AppLink(lazy_gettext("Deaths per million"), lazy_gettext("Deaths per million"), "/deaths_per_million", display_deaths_per_million, callback_fn=callback_deaths_per_million),
])
Beispiel #4
0
from flask_babel import lazy_gettext

from pages import AppMenu, AppLink
from pages.cases.municipalities import municipalities_link
from pages.cases.admin_region import display_admin
from pages.cases.provinces import display_provinces
from pages.cases.age_groups import display_age_groups
from pages.cases.testing import display_testing
from pages.cases.Re import display_Re, callback_Re

from pages import get_translation

cases_menu = AppMenu(lazy_gettext("Cases"), "/cases", [
    municipalities_link,
    AppLink(get_translation(en="Cases per province", fr="Cas par provinces"),
            get_translation(en="Cases per province", fr="Cas par provinces"),
            "/provinces", display_provinces),
    AppLink(
        get_translation(en="Cases per admin region",
                        fr="Cas par arrondissement"),
        get_translation(en="Admin Region", fr="Arrondissement"),
        "/admin_region", display_admin),
    AppLink(
        get_translation(en="Cases per age-group", fr="Cas par agroupe d'age"),
        get_translation(en="Age-group", fr="Groupes d'age"), "/age_groups",
        display_age_groups),
    AppLink(lazy_gettext("Testing"), lazy_gettext("Testing"), "/testing",
            display_testing),
    AppLink(lazy_gettext("Epidemic Indicators"),
            lazy_gettext("Epidemic Indicators"),
            "/Re",
Beispiel #5
0
from flask_babel import lazy_gettext


from graphs.overmortality import overmortality_estimates_repartition_bar
from pages import AppMenu, AppLink

from pages.deaths.overmortality import display_overmortality
from pages.deaths.age_groups import display_age_groups
from pages.deaths.obituary import display_obituary
from pages.vaccines.vaccines import display_vaccines


from pages import get_translation


vaccines_menu = AppMenu(lazy_gettext("Vaccines"), "/vaccines", [
    AppLink(get_translation(fr="Vaccins", en="Vaccines"),
            lazy_gettext("Vaccines"),
            "/vaccines", display_vaccines),

])


Beispiel #6
0
from pages import AppMenu, AppLink
from pages.cases.cases_correction import display_cases_correction
from pages.cases.municipalities import municipalities_link
from pages.cases.admin_region import display_admin, admin_link
from pages.cases.region import display_region
from pages.cases.provinces import display_provinces
from pages.cases.age_groups import display_age_groups
from pages.cases.testing import display_testing
from pages.cases.Re import display_Re, callback_Re

from pages import get_translation

cases_menu = AppMenu(lazy_gettext("Cases"), "/cases", [
    AppLink(
        get_translation(
            en="Cases per age-group", fr="Cas par agroupe d'age", lazy=True),
        get_translation(en="Age-group", fr="Groupes d'age", lazy=True),
        "/age_groups", display_age_groups), municipalities_link,
    AppLink(lazy_gettext("Testing"), lazy_gettext("Testing"), "/testing",
            display_testing), admin_link,
    AppLink(get_translation(en="Provinces", fr="Provinces", lazy=True),
            get_translation(en="Provinces", fr="Provinces", lazy=True),
            "/provinces", display_provinces),
    AppLink(get_translation(en="Regions", fr="Regions", lazy=True),
            get_translation(en="Region", fr="Region", lazy=True), "/regions",
            display_region),
    AppLink(lazy_gettext("Epidemic Indicators"),
            lazy_gettext("Epidemic Indicators"),
            "/Re",
            display_Re,
            callback_fn=callback_Re),
        display_source_providers(source_sciensano, source_map_provinces)
    ]



def admin_callbacks(app):
    print("admin call back setup")
    @app.callback(
        Output("barplot_admin", "figure"),
        [Input('map_cases_incidence_nis3', 'clickData')])
    def callback_barplot(clickData):
        print("callback")
        if clickData is None:
            return barplot_admin()
        nis = clickData['points'][0]['customdata'][2]
        return barplot_admin(nis=int(nis))
    @app.callback(
        Output("barplot_admin", "style"),
        [Input('map_cases_incidence_nis3', 'clickData')])
    def callback_barplot_style(clickData):
        print("callback1")
        if clickData is None:
            return {"display": "none"}
        return {"display": "block"}


admin_link = AppLink(get_translation(en="Cases per admin region",fr="Cas par arrondissement"), get_translation(en="Admin regions",fr="Arrondissements"),
                              "/admin_region", display_fn=display_admin,
                              plot=map_cases_incidence_nis3,
                              callback_fn=admin_callbacks)
Beispiel #8
0
                          style={"display": "none"},
                          config=dict(locale=str(get_locale()))))
        ]),
        display_source_providers(source_sciensano, source_map_communes,
                                 source_pop)
    ]


def municipalities_callbacks(app):
    @app.callback(Output("cases-overview-histogram", "figure"),
                  [Input('cases-overview-map-communes', 'clickData')])
    def callback_barplot(clickData):
        if clickData is None:
            return barplot_communes()
        nis = clickData['points'][0]['customdata'][2]
        return barplot_communes(commune_nis=nis)

    @app.callback(Output("cases-overview-histogram", "style"),
                  [Input('cases-overview-map-communes', 'clickData')])
    def callback_barplot_style(clickData):
        if clickData is None:
            return {"display": "none"}
        return {"display": "block"}


municipalities_link = AppLink(lazy_gettext("Cases per municipality"),
                              lazy_gettext("Per municipality"),
                              "/municipalities", municipalities,
                              map_communes_per_inhabitant,
                              municipalities_callbacks)
Beispiel #9
0
from flask_babel import lazy_gettext

from pages import AppMenu, AppLink

from pages.hospitals.hospitals_be import display_hospitals
from pages.hospitals.hospitals_prov import display_hospitals_prov
from pages.hospitals.hospitals_region import display_hospitals_region

hospitals_menu = AppMenu(lazy_gettext("Hospitalization"), "/hospitals", [
    AppLink(lazy_gettext("Belgium"), lazy_gettext("Belgium"), "/hospitals_be",
            display_hospitals),
    AppLink(lazy_gettext("Provinces"), lazy_gettext("Provinces"),
            "/hospitals_prov", display_hospitals_prov),
    AppLink(lazy_gettext("Regions"), lazy_gettext("Region"),
            "/hospitals_regions", display_hospitals_region),
])
Beispiel #10
0
from flask_babel import lazy_gettext

from graphs.obituary import rolling_ratio_plot
from graphs.overmortality import overmortality_estimates_repartition_bar
from pages import AppMenu, AppLink

from pages.deaths.overmortality import display_overmortality
from pages.deaths.age_groups import display_age_groups
from pages.deaths.obituary import display_obituary

deaths_menu = AppMenu(lazy_gettext("Deaths"), "/deaths", [
    AppLink(lazy_gettext("Death per age group"), lazy_gettext("Age Groups"),
            "/age_groups", display_age_groups),
    AppLink(lazy_gettext("Overmortality"),
            lazy_gettext("Overmortality"),
            "/overmortality",
            display_overmortality,
            plot=overmortality_estimates_repartition_bar),
    AppLink(lazy_gettext("Obituary evolution"),
            lazy_gettext("Obituary evolution"),
            "/obituary",
            display_obituary,
            plot=rolling_ratio_plot),
])
Beispiel #11
0
from flask_babel import lazy_gettext


from graphs.overmortality import overmortality_estimates_repartition_bar
from pages import AppMenu, AppLink

from pages.deaths.overmortality import display_overmortality
from pages.deaths.age_groups import display_age_groups
from pages.deaths.obituary import display_obituary
from pages.who.who import display_who


from pages import get_translation


who_menu = AppMenu(lazy_gettext("WHO Indicators"), "/who", [
    AppLink(get_translation(fr="Indicateurs OMS", en="WHO Indicators"),
            lazy_gettext("WHO Indicators"),
            "/who", display_who),

])


Beispiel #12
0
from flask_babel import lazy_gettext

from pages import AppMenu, AppLink
from pages.cases.municipalities import municipalities_link
from pages.cases.provinces import display_provinces
from pages.cases.age_groups import display_age_groups
from pages.cases.testing import display_testing
from pages.cases.Re import display_Re, callback_Re

cases_menu = AppMenu(lazy_gettext("Cases"), "/cases", [
    municipalities_link,
    AppLink(lazy_gettext("Cases per province"), lazy_gettext("Per province"),
            "/provinces", display_provinces),
    AppLink(lazy_gettext("Cases per age groups"), lazy_gettext("Age Groups"),
            "/age_groups", display_age_groups),
    AppLink(lazy_gettext("Testing"), lazy_gettext("Testing"), "/testing",
            display_testing),
    AppLink(lazy_gettext("Epidemic Indicators"),
            lazy_gettext("Epidemic Indicators"),
            "/Re",
            display_Re,
            callback_fn=callback_Re)
])
Beispiel #13
0
from flask_babel import lazy_gettext

from pages import AppMenu, AppLink
from pages.lockdown.traffic import display_traffic
from pages.lockdown.mobility_report import display_mobility
from pages.lockdown.brussels import display_brussels
from pages.lockdown.tomtom import display_tomtom
from pages.lockdown.facebook import display_facebook, callback_fb
from pages.lockdown.facebook_eu import callback_fb_countries_eu, display_facebook_eu
from pages.lockdown.facebook_lux import callback_fb_countries,callback_fb_lux, display_facebook_lux

def call_back_fb_eu(app):
    callback_fb_countries_eu(app)

def call_back_fb_lux(app):
    facebook_lux.callback_fb_countries(app)
    facebook_lux.callback_fb_lux(app)

lockdown_menu = AppMenu(lazy_gettext("Lockdown Impact"), "/lockdown", [
    AppLink(lazy_gettext("Mobility Reports"), lazy_gettext("Mobility Report"), "/mobility-reports", display_mobility),
    AppLink(lazy_gettext("Google-Map Traffic"), lazy_gettext("Google Map Internet Traffic EU"), "/google-map", display_traffic),
    AppLink(lazy_gettext("TomTom Traffic Data"), lazy_gettext("TomTom Traffic Data"), "/tomtom", display_tomtom),
    AppLink(lazy_gettext("Brussels"), lazy_gettext("Brussels"), "/brussels", display_brussels),
    AppLink(lazy_gettext("Facebook"), lazy_gettext("Facebook"), "/facebook", display_facebook, callback_fn=callback_fb),
    AppLink(lazy_gettext("Facebook-lux"), lazy_gettext("Facebook-lux"), "/facebook_lux", display_facebook_lux, callback_fn=call_back_fb_lux,invisible=True),
    AppLink(lazy_gettext("Facebook-eu"), lazy_gettext("Facebook-eu"), "/facebook_eu", display_facebook_eu,
            callback_fn=call_back_fb_eu, invisible=True),

])

Beispiel #14
0
from flask_babel import lazy_gettext

from graphs.obituary import rolling_ratio_plot
from graphs.overmortality import overmortality_estimates_repartition_bar
from pages import AppMenu, AppLink

from pages.deaths.overmortality import display_overmortality
from pages.deaths.age_groups import display_age_groups
from pages.deaths.obituary import display_obituary
from pages.deaths.admin_region import display_arrondissements

from pages import get_translation


deaths_menu = AppMenu(lazy_gettext("Deaths"), "/deaths", [
    AppLink(get_translation(fr="Décès / Groupes d'ages", en="Deaths / Age group"), lazy_gettext("Age Groups"), "/age_groups", display_age_groups),
    AppLink(get_translation(fr = "Surmortalité", en = "Overmortality"), get_translation(fr = "Surmortalité", en = "Overmortality"), "/overmortality", display_overmortality,
            plot=overmortality_estimates_repartition_bar),
    AppLink(get_translation(fr= "Evolution Nécrologiques", en = "Obituary evolution"), get_translation(fr= "Nécrologie", en = "Obituary"), "/obituary", display_obituary,
            plot=rolling_ratio_plot),
    AppLink(get_translation(fr="Décès / Arrondissements", en="Deaths / Admin Region"),
            get_translation(fr="Arrondissements", en="Admin Region"), "/admin_region", display_arrondissements),

])
from flask_babel import lazy_gettext

from pages import AppMenu, AppLink
from pages.lockdown.traffic import display_traffic
from pages.lockdown.mobility_report import display_mobility
from pages.lockdown.brussels import display_brussels
from pages.lockdown.tomtom import display_tomtom

lockdown_menu = AppMenu(lazy_gettext("Lockdown Impact"), "/lockdown", [
    AppLink(lazy_gettext("Mobility Reports"), lazy_gettext("Mobility Report"),
            "/mobility-reports", display_mobility),
    AppLink(lazy_gettext("Google-Map Traffic"),
            lazy_gettext("Google Map Internet Traffic EU"), "/google-map",
            display_traffic),
    AppLink(lazy_gettext("TomTom Traffic Data"),
            lazy_gettext("TomTom Traffic Data"), "/tomtom", display_tomtom),
    AppLink(lazy_gettext("Brussels"), lazy_gettext("Brussels"), "/brussels",
            display_brussels),
])
            dbc.Col(dcc.Graph(id='cases-overview-histogram', figure=barplot_communes(),
                              style={"display": "none"}, config=dict(locale=str(get_locale()))))
        ]),
        display_source_providers(source_sciensano, source_map_communes, source_pop)
    ]


def municipalities_callbacks(app):
    @app.callback(
        Output("cases-overview-histogram", "figure"),
        [Input('cases-overview-map-communes', 'clickData')])
    def callback_barplot(clickData):
        if clickData is None:
            return barplot_communes()
        nis = clickData['points'][0]['customdata'][2]
        return barplot_communes(commune_nis=nis)

    @app.callback(
        Output("cases-overview-histogram", "style"),
        [Input('cases-overview-map-communes', 'clickData')])
    def callback_barplot_style(clickData):
        if clickData is None:
            return {"display": "none"}
        return {"display": "block"}


municipalities_link = AppLink(get_translation(en="Cases per municipality",fr="Cas par communne"), get_translation(en="Municipalities",fr="Communes"),
                              "/municipalities", municipalities,
                              map_communes_per_inhabitant,
                              municipalities_callbacks)
Beispiel #17
0
from flask_babel import lazy_gettext

from graphs.overmortality import overmortality_estimates_repartition_bar
from pages import AppMenu, AppLink

from pages.deaths.overmortality import display_overmortality
from pages.deaths.age_groups import display_age_groups
from pages.deaths.obituary import display_obituary
from pages.deaths.covid_deaths import display_covid_death

from pages import get_translation

deaths_menu = AppMenu(lazy_gettext("Deaths"), "/deaths", [
    AppLink(
        get_translation(fr="Décès COVID / Groupes d'ages",
                        en="COVID Deaths / Age group"),
        lazy_gettext("Covid Deaths"), "/covid", display_covid_death),
    AppLink(
        get_translation(fr="Décès totaux / Groupes d'ages",
                        en="Overal Deaths / Age group"),
        lazy_gettext("All Deaths"), "/all", display_age_groups),
    AppLink(
        get_translation(fr="Evolution Nécrologiques", en="Obituary evolution"),
        get_translation(fr="Nécrologie", en="Obituary"), "/obituary",
        display_obituary),
])