Fix: get back exam graphs
This commit is contained in:
parent
412e624791
commit
eb1abbe868
@ -11,7 +11,6 @@ from pathlib import Path
|
||||
from datetime import datetime
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import dash_bootstrap_components as dbc
|
||||
|
||||
|
||||
from ... import flat_df_students, pp_q_scores
|
||||
@ -75,22 +74,13 @@ layout = html.Div(
|
||||
),
|
||||
html.Div(
|
||||
[
|
||||
"Evaluation: ",
|
||||
dbc.Select(id="csv"),
|
||||
]
|
||||
),
|
||||
],
|
||||
),
|
||||
html.H2("Résultats"),
|
||||
dbc.Row(
|
||||
[
|
||||
dbc.Col(
|
||||
html.Div(
|
||||
dash_table.DataTable(
|
||||
id="final_score_table",
|
||||
columns=[
|
||||
{"id": "Eleve", "name": "Élève"},
|
||||
{"id": "Élève", "name": "Élève"},
|
||||
{"id": "Note", "name": "Note"},
|
||||
{"id": "Bareme", "name": "Barème"},
|
||||
{"id": "Barème", "name": "Barème"},
|
||||
],
|
||||
data=[],
|
||||
style_data_conditional=[
|
||||
@ -99,16 +89,38 @@ layout = html.Div(
|
||||
"backgroundColor": "rgb(248, 248, 248)",
|
||||
}
|
||||
],
|
||||
style_header={
|
||||
"backgroundColor": "rgb(230, 230, 230)",
|
||||
"fontWeight": "bold",
|
||||
},
|
||||
style_data={
|
||||
"width": "100px",
|
||||
"maxWidth": "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(
|
||||
[
|
||||
@ -218,7 +230,7 @@ def update_final_scores_hist(data):
|
||||
assessment_scores = pd.DataFrame.from_records(data)
|
||||
|
||||
if assessment_scores.empty:
|
||||
return [{'data': [], 'layout':[]}]
|
||||
return [{"data": [], "layout": []}]
|
||||
|
||||
ranges = np.linspace(
|
||||
-0.5,
|
||||
@ -265,7 +277,7 @@ def update_competence_fig(data):
|
||||
scores = flat_df_students(scores).dropna(subset=["Score"])
|
||||
|
||||
if scores.empty:
|
||||
return [{'data': [], 'layout':[]}]
|
||||
return [{"data": [], "layout": []}]
|
||||
|
||||
scores = pp_q_scores(scores)
|
||||
pt = pd.pivot_table(
|
||||
|
Loading…
Reference in New Issue
Block a user