Top 10 acheteurs et titulaires #65
This commit is contained in:
@@ -15,10 +15,10 @@ from dash import (
|
||||
register_page,
|
||||
)
|
||||
|
||||
from src.callbacks import get_top_org_table
|
||||
from src.figures import (
|
||||
DataTable,
|
||||
get_distance_histogram,
|
||||
get_top_org_table,
|
||||
make_card,
|
||||
make_column_picker,
|
||||
point_on_map,
|
||||
@@ -372,7 +372,7 @@ def get_last_marches_data(
|
||||
Input(component_id="acheteur_data", component_property="data"),
|
||||
)
|
||||
def get_top_titulaires(data):
|
||||
table = get_top_org_table(data, "titulaire", ["titulaire_distance", "montant"])
|
||||
table = get_top_org_table(data, "titulaire", ["titulaire_distance"])
|
||||
return make_card(fig=table, title="Top titulaires", lg=12, xl=12)
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ from src.figures import (
|
||||
get_distance_histogram,
|
||||
get_duplicate_matrix,
|
||||
get_geographic_maps,
|
||||
get_top_org_table,
|
||||
make_card,
|
||||
make_donut,
|
||||
)
|
||||
@@ -649,6 +650,16 @@ def udpate_dashboard_cards(
|
||||
)
|
||||
)
|
||||
|
||||
top_acheteurs = get_top_org_table(
|
||||
lff, org_type="acheteur", filters=False, extra_columns=[]
|
||||
)
|
||||
cards.append(make_card(title="Top acheteurs", fig=top_acheteurs, lg=12, xl=8))
|
||||
|
||||
top_titulaires = get_top_org_table(
|
||||
lff, org_type="titulaire", filters=False, extra_columns=[]
|
||||
)
|
||||
cards.append(make_card(title="Top titulaires", fig=top_titulaires, lg=12, xl=8))
|
||||
|
||||
geographic_maps: list[dbc.Col] = get_geographic_maps(dff)
|
||||
|
||||
other_cards = []
|
||||
|
||||
@@ -15,10 +15,10 @@ from dash import (
|
||||
register_page,
|
||||
)
|
||||
|
||||
from src.callbacks import get_top_org_table
|
||||
from src.figures import (
|
||||
DataTable,
|
||||
get_distance_histogram,
|
||||
get_top_org_table,
|
||||
make_column_picker,
|
||||
point_on_map,
|
||||
)
|
||||
@@ -395,7 +395,7 @@ def get_last_marches_data(
|
||||
Input(component_id="titulaire_data", component_property="data"),
|
||||
)
|
||||
def get_top_acheteurs(data):
|
||||
return get_top_org_table(data, "acheteur", ["titulaire_distance", "montant"])
|
||||
return get_top_org_table(data, "acheteur", ["titulaire_distance"])
|
||||
|
||||
|
||||
@callback(
|
||||
|
||||
Reference in New Issue
Block a user