Compare commits

..

4 Commits

View File

@ -75,53 +75,40 @@ layout = html.Div(
), ),
html.Div( html.Div(
[ [
html.Div( "Evaluation: ",
dash_table.DataTable( dbc.Select(id="csv"),
id="final_score_table", ]
columns=[ ),
{"id": "Eleve", "name": "Élève"}, ],
{"id": "Note", "name": "Note"}, ),
{"id": "Bareme", "name": "Barème"}, html.H2("Résultats"),
], dbc.Row(
data=[], [
style_data_conditional=[ dbc.Col(
{ dash_table.DataTable(
"if": {"row_index": "odd"}, id="final_score_table",
"backgroundColor": "rgb(248, 248, 248)", columns=[
} {"id": "Eleve", "name": "Élève"},
], {"id": "Note", "name": "Note"},
style_data={ {"id": "Bareme", "name": "Barème"},
"width": "100px", ],
"maxWidth": "100px", data=[],
"minWidth": "100px", style_data_conditional=[
}, {
), "if": {"row_index": "odd"},
id="final_score_table_container", "backgroundColor": "rgb(248, 248, 248)",
), }
html.Div( ],
[ style_header={
dash_table.DataTable( "backgroundColor": "rgb(230, 230, 230)",
id="final_score_describe", "fontWeight": "bold",
columns=[ },
{"id": "count", "name": "count"}, style_data={
{"id": "mean", "name": "mean"}, "width": "100px",
{"id": "std", "name": "std"}, "maxWidth": "100px",
{"id": "min", "name": "min"}, "minWidth": "100px",
{"id": "25%", "name": "25%"}, },
{"id": "50%", "name": "50%"}, )
{"id": "75%", "name": "75%"},
{"id": "max", "name": "max"},
],
),
dcc.Graph(
id="fig_assessment_hist",
),
dcc.Graph(id="fig_competences"),
],
id="desc_plots",
),
],
id="analysis",
), ),
html.Div( html.Div(
[ [
@ -231,7 +218,7 @@ def update_final_scores_hist(data):
assessment_scores = pd.DataFrame.from_records(data) assessment_scores = pd.DataFrame.from_records(data)
if assessment_scores.empty: if assessment_scores.empty:
return [{}] return [{'data': [], 'layout':[]}]
ranges = np.linspace( ranges = np.linspace(
-0.5, -0.5,
@ -278,7 +265,7 @@ def update_competence_fig(data):
scores = flat_df_students(scores).dropna(subset=["Score"]) scores = flat_df_students(scores).dropna(subset=["Score"])
if scores.empty: if scores.empty:
return [{}] return [{'data': [], 'layout':[]}]
scores = pp_q_scores(scores) scores = pp_q_scores(scores)
pt = pd.pivot_table( pt = pd.pivot_table(