Compare commits

..

4 Commits

View File

@ -75,7 +75,16 @@ layout = html.Div(
), ),
html.Div( html.Div(
[ [
html.Div( "Evaluation: ",
dbc.Select(id="csv"),
]
),
],
),
html.H2("Résultats"),
dbc.Row(
[
dbc.Col(
dash_table.DataTable( dash_table.DataTable(
id="final_score_table", id="final_score_table",
columns=[ columns=[
@ -90,38 +99,16 @@ layout = html.Div(
"backgroundColor": "rgb(248, 248, 248)", "backgroundColor": "rgb(248, 248, 248)",
} }
], ],
style_header={
"backgroundColor": "rgb(230, 230, 230)",
"fontWeight": "bold",
},
style_data={ style_data={
"width": "100px", "width": "100px",
"maxWidth": "100px", "maxWidth": "100px",
"minWidth": "100px", "minWidth": "100px",
}, },
), )
id="final_score_table_container",
),
html.Div(
[
dash_table.DataTable(
id="final_score_describe",
columns=[
{"id": "count", "name": "count"},
{"id": "mean", "name": "mean"},
{"id": "std", "name": "std"},
{"id": "min", "name": "min"},
{"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(