Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/countries.json
1 change: 1 addition & 0 deletions data/final_raw_sample_0_percent.csv
1 change: 0 additions & 1 deletion data/morts_par_jour-1970-1979.pkl

This file was deleted.

1 change: 0 additions & 1 deletion data/morts_par_jour-1980-1989.pkl

This file was deleted.

1 change: 0 additions & 1 deletion data/morts_par_jour-1990-1999.pkl

This file was deleted.

1 change: 0 additions & 1 deletion data/morts_par_jour-2000-2009.pkl

This file was deleted.

1 change: 0 additions & 1 deletion data/morts_par_jour-2010-2019.pkl

This file was deleted.

1 change: 0 additions & 1 deletion data/morts_par_jour-2020-2022.pkl

This file was deleted.

1 change: 0 additions & 1 deletion data/pegase_import_petrole.csv

This file was deleted.

1 change: 0 additions & 1 deletion data/pegase_prix_bois_particulier.csv

This file was deleted.

1 change: 0 additions & 1 deletion data/pegase_prix_petrole_particulier.csv

This file was deleted.

1 change: 0 additions & 1 deletion data/prix_reglemente_electricite.csv

This file was deleted.

1 change: 0 additions & 1 deletion data/subWDIdata.pkl

This file was deleted.

128 changes: 0 additions & 128 deletions deces/data/get_data.ipy

This file was deleted.

Binary file removed deces/data/morts_par_jour-1970-1979.pkl
Binary file not shown.
Binary file removed deces/data/morts_par_jour-1980-1989.pkl
Binary file not shown.
Binary file removed deces/data/morts_par_jour-1990-1999.pkl
Binary file not shown.
Binary file removed deces/data/morts_par_jour-2000-2009.pkl
Binary file not shown.
Binary file removed deces/data/morts_par_jour-2010-2019.pkl
Binary file not shown.
Binary file removed deces/data/morts_par_jour-2020-2022.pkl
Binary file not shown.
119 changes: 0 additions & 119 deletions deces/deces.py

This file was deleted.

35 changes: 11 additions & 24 deletions delta.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
import dash
from dash import dcc
from dash import html
from energies import energies
from population import population
from deces import deces
from stats import stats
from maps import maps

# external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']

app = dash.Dash(__name__, title="Delta", suppress_callback_exceptions=True) # , external_stylesheets=external_stylesheets)
server = app.server
pop = population.WorldPopulationStats(app)
nrg = energies.Energies(app)
dec = deces.Deces(app)
maps = maps.MapStats(app)
stats = stats.Stats(app)

main_layout = html.Div([
html.Div(className = "row",
children=[
dcc.Location(id='url', refresh=False),
html.Div(className="two columns",
children = [
html.Center(html.H2("Δelta δata")),
dcc.Link(html.Button("Prix d'énergies", style={'width':"100%"}), href='/energies'),
html.Center(html.H2("$$$ for environment")),
dcc.Link(html.Button("Statistics", style={'width':"100%"}), href='/stats'),
html.Br(),
dcc.Link(html.Button('Natalité vs revenus', style={'width':"100%"}), href='/population'),
dcc.Link(html.Button('Maps', style={'width':"100%"}), href='/maps'),
html.Br(),
dcc.Link(html.Button('Décès journaliers', style={'width':"100%"}), href='/deces'),
html.Br(),
html.Br(),
html.Br(),
html.Center(html.A('Code source', href='https://github.com/oricou/delta')),
]),
html.Div(id='page_content', className="ten columns"),
]),
Expand All @@ -49,23 +44,15 @@

app.layout = main_layout

# "complete" layout (not sure that I need that)
app.validation_layout = html.Div([
main_layout,
to_be_done_page,
pop.main_layout,
])

# Update the index
@app.callback(dash.dependencies.Output('page_content', 'children'),
[dash.dependencies.Input('url', 'pathname')])
def display_page(pathname):
if pathname == '/energies':
return nrg.main_layout
elif pathname == '/population':
return pop.main_layout
elif pathname == '/deces':
return dec.main_layout
if pathname == '/stats':
return stats.main_layout
elif pathname == '/maps':
return maps.main_layout
else:
return home_page

Expand Down
Loading