def index_page(): page = page = html.Div(children=[ views.navbar, views.landing_text, html.H1("Dados gerais globais", className="text-center"), dbc.Container(children=[ dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("Total de casos"), dcc.Graph(id='cases', figure=visu.total_cases(countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2("Total de casos por milhão de habitantes"), dcc.Graph(id='cases-per-million', figure=visu.total_cases_mil(countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html. H2("Média móvel de 7 dias de novos casos por milhão de habitantes" ), dcc.Graph(id='new-cases-smooth-per-million', figure=visu.new_cases_smooth_mil( countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2("Mortes totais por país"), dcc.Graph(id='total-deaths', figure=visu.total_deaths(countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("Mortes totais por milhão de habitantes"), dcc.Graph(id='deaths-per-million', figure=visu.total_deaths_mil( countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html. H2("Média móvel de mortes dos últimos 7 dias por milhão de habitantes" ), dcc.Graph(id='new-deaths-smooth', figure=visu.new_deaths_smooth_mil( countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("PIB per capita"), dcc.Graph(id='gdp-per-capita', figure=visu.gdp(countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2('''Índice de Desenvolvimento Humano: mede a qualidade de vida em um país'''), dcc.Graph(id='hd-index', figure=visu.hdi(countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(dbc.Col(html.Div(children=[ html. H2("Índice de Gini - medido de 0 a 100, quanto maior, mais desigual é o país" ), dcc.Graph(id='gini-index', figure=visu.gini(countries.general())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), justify="center", className="g-5") ], fluid=True) ]) return page
def dim_red_page_pca_sick(): dim_red_page_pca_sick = html.Div(children=[ views.navbar, views.landing_text, dbc.Container(children=[ dbc.Row(children=[ dbc.Col(children=[ html. H1("Redução de dimensionalidade com relação à comorbidades" ), html. H3('''Utilizamos PCA + KMeans para agrupar os dados relacionados a proporção de diabéticos, proporção de fumantes entre homens e entre mulheres, número de leitos de hospital por mil habitantes e proporção de doenças cardiovasculares..''', className="text-muted"), dcc.Graph(id='renda_kmeans', figure=visu.dim_red_kmeans( gp_clusters.sickness(), 'comorb', 'pca')) ], xs=11, sm=11, md=8, lg=8) ], justify="center", className="g-5, text-center"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("Total de casos"), dcc.Graph(id='cases', figure=visu.total_cases( countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2("Total de casos por milhão de habitantes"), dcc.Graph(id='cases-per-million', figure=visu.total_cases_mil( countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html. H2("Média móvel de 7 dias de novos casos por milhão de habitantes" ), dcc.Graph(id='new-cases-smooth-per-million', figure=visu.new_cases_smooth_mil( countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2("Mortes totais por país"), dcc.Graph(id='total-deaths', figure=visu.total_deaths( countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("Mortes totais por milhão de habitantes"), dcc.Graph(id='deaths-per-million', figure=visu.total_deaths_mil( countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html. H2("Média móvel de mortes dos últimos 7 dias por milhão de habitantes" ), dcc.Graph(id='new-deaths-smooth', figure=visu.new_deaths_smooth_mil( countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("PIB per capita"), dcc.Graph(id='gdp-per-capita', figure=visu.gdp(countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2('''IDH - o IDH mede a qualidade de vida em um país''' ), dcc.Graph(id='hd-index', figure=visu.hdi(countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(dbc.Col(html.Div(children=[ html. H2("Índice de Gini - medido de 0 a 100, quanto maior, mais desigual é o país" ), dcc.Graph(id='gini-index', figure=visu.gini(countries.pca_sickness())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), justify="center", className="g-5") ], fluid=True) ]) return dim_red_page_pca_sick
def nordic_page(): page = html.Div(children=[ views.navbar, views.landing_text, html.H1('''Dados agrupados dos países nórdicos - Dinamarca, Finlândia, Islândia, Noruega e Suécia''', className="text-center"), dbc.Container(children=[ dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("Total de casos"), dcc.Graph(id='cases', figure=visu.total_cases(countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2("Total de casos por milhão de habitantes"), dcc.Graph(id='cases-per-million', figure=visu.total_cases_mil(countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html. H2("Média móvel de 7 dias de novos casos por milhão de habitantes" ), dcc.Graph(id='new-cases-smooth-per-million', figure=visu.new_cases_smooth_mil( countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2("Mortes totais por país"), dcc.Graph(id='total-deaths', figure=visu.total_deaths(countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("Mortes totais por milhão de habitantes"), dcc.Graph(id='deaths-per-million', figure=visu.total_deaths_mil(countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html. H2("Média móvel de mortes dos últimos 7 dias por milhão de habitantes" ), dcc.Graph(id='new-deaths-smooth', figure=visu.new_deaths_smooth_mil( countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("PIB per capita"), dcc.Graph(id='gdp-per-capita', figure=visu.gdp(countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2('''IDH dos países nórdicos - o IDH mede a qualidade de vida em um país''' ), dcc.Graph(id='hd-index', figure=visu.hdi(countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(dbc.Col(html.Div(children=[ html. H2("Índice de Gini - medido de 0 a 100, quanto maior, mais desigual é o país" ), dcc.Graph(id='gini-index', figure=visu.gini(countries.nordic())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), justify="center", className="g-5") ], fluid=True) ]) return page
def dim_red_page_tsne(): dim_red_page_tsne = html.Div(children=[ views.navbar, views.landing_text, dbc.Container(children=[ dbc.Row(children=[ dbc.Col(children=[ html.H1("Redução de dimensionalidade com relação à renda"), html. H3('''Utilizamos TSNE + KMeans para agrupar os dados relacionados a PIB per capta, expectativa de vida, número de leitos de hospital por mil habitantes, IDH e Gini.''', className="text-muted"), dcc.Graph(id='comorb_kmeans', figure=visu.dim_red_kmeans( gp_clusters.revenue(), 'renda', 'tsne')) ], xs=11, sm=11, md=8, lg=8) ], justify="center", className="g-5, text-center"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("Total de casos"), dcc.Graph(id='cases', figure=visu.total_cases( countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2("Total de casos por milhão de habitantes"), dcc.Graph(id='cases-per-million', figure=visu.total_cases_mil( countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html. H2("Média móvel de 7 dias de novos casos por milhão de habitantes" ), dcc.Graph(id='new-cases-smooth-per-million', figure=visu.new_cases_smooth_mil( countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2("Mortes totais por país"), dcc.Graph(id='total-deaths', figure=visu.total_deaths( countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("Mortes totais por milhão de habitantes"), dcc.Graph(id='deaths-per-million', figure=visu.total_deaths_mil( countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html. H2("Média móvel de mortes dos últimos 7 dias por milhão de habitantes" ), dcc.Graph(id='new-deaths-smooth', figure=visu.new_deaths_smooth_mil( countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(children=[ dbc.Col(html.Div(children=[ html.H2("PIB per capita"), dcc.Graph(id='gdp-per-capita', figure=visu.gdp(countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), dbc.Col(html.Div(children=[ html.H2('''IDH - o IDH mede a qualidade de vida em um país''' ), dcc.Graph(id='hd-index', figure=visu.hdi(countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6) ], className="g-5"), dbc.Row(dbc.Col(html.Div(children=[ html. H2("Índice de Gini - medido de 0 a 100, quanto maior, mais desigual é o país" ), dcc.Graph(id='gini-index', figure=visu.gini(countries.tsne_revenue())) ], className="p-4"), xs=11, sm=11, md=6, lg=6), justify="center", className="g-5") ], fluid=True) ]) return dim_red_page_tsne