Commit cadb1130 authored by Florent Chehab's avatar Florent Chehab
Browse files

update

parent 8fb1dc5e
......@@ -86,6 +86,7 @@
"ALL_SEMESTERS = {info['sem']:info['end_date'] for info in CONFIGURATION[\"other_semesters\"]}\n",
"ALL_SEMESTERS[CONFIGURATION[\"main_semester\"]['sem']] = CONFIGURATION[\"main_semester\"]['end_date']\n",
"MAIN_SEMESTER = CONFIGURATION[\"main_semester\"]['sem']\n",
"ALL_SEMESTERS_SORTED = sorted(list(ALL_SEMESTERS.keys()), key=lambda sem:sem[1:5]+str((ord(sem[0]) + 20)%26 ))\n",
"\n",
"for semester in ALL_SEMESTERS.keys():\n",
" if not os.path.isfile('./data/' + semester + '.json'):\n",
......@@ -93,6 +94,7 @@
" + semester \n",
" + \". Nous allons en générer pour pouvoir continer.\")\n",
" generate_data_file(semester)\n",
" ALL_SEMESTERS[semester] = datetime.strptime(ALL_SEMESTERS[semester], '%d/%m/%Y') \n",
" \n",
"\n",
"# import data\n",
......@@ -135,17 +137,30 @@
"outputs": [],
"source": [
"str_tmp = \"Les données pour chaque semestre ont été extraites aux dates : \\n\\n \"\n",
"t = [[\"Semestre\", \"Date\"]]\n",
"t = [[\"Semestre\", \"Date d'extraction\"]]\n",
"for sem in EVALS_DATE_CREATED.keys():\n",
" t.append([sem, EVALS_DATE_CREATED[sem].strftime('%d/%m/%Y')]) \n",
"Markdown(to_mardown_table_str(t))"
"Markdown(str_tmp + to_mardown_table_str(t))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Structure des données"
"### Structure des données\n",
"\n",
"Pour chaque semestre, nous avons les informations des évaluations telles que visibles par les étudiants sur l'ENT aux dates d'extraction précisées ci-dessus. Nous connaissons notamment :\n",
"- Le code de l'UV ;\n",
"- L'intitulé de l'UV ;\n",
"- Le nombre d'étudiants inscrits ;\n",
"- Le nombre d'étudiants marqués comme _absents_ ;\n",
"- Le nombre d'étudiants qui ont obtenu l'UV ;\n",
"- Le nombre d'évaluations saisies par les étudiants ;\n",
"- Les statistiques pour chacune des questions (i.e. le nombre de '++', etc. pour chaque question) ;\n",
"- La longueur du commentaire saisi par le responsable de l'UV, s'il en a saisi un ;\n",
"- La date à laquelle le responsable de l'UV a « regardé » évaluations.\n",
"\n",
"Voici un exemple pour l'UV MT23 :"
]
},
{
......@@ -154,52 +169,113 @@
"metadata": {},
"outputs": [],
"source": [
"print(list(EVALS_MAIN_SEM))"
"print(EVALS_MAIN_SEM.loc[\"MT23\"])"
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"print(EVALS_MAIN_SEM.iloc[10])"
"## Informations générales et analyse comparative\n",
"\n",
"L'analyse comparative se fait par rapport aux données des précédents semestres.\n",
"\n",
"### Taux de réponse"
]
},
{
"cell_type": "markdown",
"metadata": {},
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"## Informations générales\n",
"\n",
"### Taux de réponse"
"t = [[\"Semestre\",\"Nombre d'UVs\", \"Taux de réponse moyen des étudiants\" , \"Nombre d'UV qui ont été vu\", \"avec un commentaire\"]]\n",
"SEMESTERS_INFO = {}\n",
"for sem in ALL_SEMESTERS_SORTED:\n",
" sem_data = EVALS[sem]\n",
" nb_uvs = len(sem_data.index)\n",
" taux_eval = sem_data.loc[:, (\"nb_evals\",\"nb_etu_registered\")].min(axis=1)/sem_data[\"nb_etu_registered\"]\n",
" taux_eval = taux_eval.fillna(1) # Sometimes there 0 students in a course but there are evaluations\n",
" taux_eval = sum(taux_eval)/nb_uvs\n",
" uvs_with_evals = sem_data.loc[pd.notna(sem_data[\"date_review\"])]\n",
" nb_uvs_with_evals = len(uvs_with_evals.index)\n",
" uvs_with_com = sem_data.loc[sem_data[\"comment\"]>0]\n",
" nb_uvs_with_com = len(uvs_with_com)\n",
" SEMESTERS_INFO[sem] = {\n",
" 'nb_uvs': nb_uvs,\n",
" 'nb_uvs_with_com': nb_uvs_with_com,\n",
" 'nb_uvs_with_evals': nb_uvs_with_evals,\n",
" 'taux_rep_avg': taux_eval\n",
" }\n",
" t.append([sem, str(nb_uvs), \n",
" \"{0:.1f}%\".format(taux_eval * 100), \n",
" str(nb_uvs_with_evals)+\" ({0:.1f}%)\".format(nb_uvs_with_evals / nb_uvs * 100), \n",
" str(nb_uvs_with_com)+\" ({0:.1f}%)\".format(nb_uvs_with_com / nb_uvs * 100)])\n",
"Markdown(to_mardown_table_str(t))"
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Voici un exemple de ligne (il y a une ligne par UV) :\n",
"<div class=\"alert alert-success\">\n",
" <strong>Success!</strong> Indicates a successful or positive action.\n",
"</div>"
"traces = []\n",
"\n",
"for sem in ALL_SEMESTERS_SORTED:\n",
" info = SEMESTERS_INFO[sem]\n",
" traces += [go.Bar(\n",
" x=[\"Taux de réponse moyen des étudiants\", \"Taux d'UVs où les resps. ont 'vu' les éval.\", \"Taux d'UVs où le resp. a laissé un commentaire\"],\n",
" y=[\n",
" info['taux_rep_avg']*100,\n",
" info['nb_uvs_with_evals']/info['nb_uvs'] *100,\n",
" info['nb_uvs_with_com']/info['nb_uvs']*100\n",
" ],\n",
" name=sem\n",
" )]\n",
"\n",
"layout = go.Layout(\n",
" barmode='group',\n",
" title = \"Taux de réponses aux évaluations\",\n",
" yaxis=dict(\n",
" range=[0, 100],\n",
" title='Pourcentage',\n",
" ),\n",
")\n",
"\n",
"iplot(go.Figure(data=traces, layout=layout))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"nb_uvs = len(EVALS_MAIN_SEM.index)\n",
"print(\"Nombre d'UVs étudiées : \"+str(nb_uvs))\n",
"traces = []\n",
"\n",
"uvs_with_evals = EVALS_MAIN_SEM.loc[pd.notna(EVALS_MAIN_SEM[\"date_review\"])]\n",
"nb_uvs_with_evals = len(uvs_with_evals.index)\n",
"print(\"Nombre d'UVs où le responsable a visualisé les évaluations : \"+str(nb_uvs_with_evals))\n",
"print(\"Taux de visualisation : \"+\"{0:.0f}%\".format(float(nb_uvs_with_evals)/nb_uvs * 100))"
"for sem in ALL_SEMESTERS_SORTED:\n",
" sem_data = EVALS[sem]\n",
" taux_eval = sem_data.loc[:, (\"nb_evals\",\"nb_etu_registered\")].min(axis=1)/sem_data[\"nb_etu_registered\"]\n",
" taux_eval = taux_eval.fillna(1) # Sometimes there 0 students in a course but there are evaluations\n",
" traces += [go.Box(\n",
" y=taux_eval*100,\n",
" text=taux_eval.index,\n",
" name=sem\n",
"\n",
" )]\n",
"\n",
"layout = go.Layout(\n",
" title = \"Taux de réponse moyen des étudiants aux évaluations\",\n",
" yaxis=dict(\n",
" range=[0, 100],\n",
" title='Taux de réponse',\n",
" ),\n",
")\n",
"\n",
"iplot(go.Figure(data=traces, layout=layout))"
]
},
{
......@@ -215,9 +291,10 @@
"metadata": {},
"outputs": [],
"source": [
"uvs_with_evals = EVALS_MAIN_SEM.loc[pd.notna(EVALS_MAIN_SEM[\"date_review\"])]\n",
"graph_data = [\n",
" go.Scatter(\n",
" x=uvs_with_evals.sort_values(by=['date_review'])['date_review'],\n",
" x=uvs_with_evals['date_review'].sort_values(),\n",
" y=[100*float(i+1)/nb_uvs for i,e in enumerate(uvs_with_evals.index)],\n",
" text=uvs_with_evals.sort_values(by=['date_review']).index\n",
" )\n",
......@@ -231,12 +308,48 @@
" xaxis=dict(\n",
" title=\"Date\"\n",
" )\n",
" \n",
")\n",
"\n",
"iplot(go.Figure(data=graph_data, layout=layout))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"traces = []\n",
"for sem in ALL_SEMESTERS_SORTED:\n",
" sem_end_date = ALL_SEMESTERS[sem].toordinal()\n",
" nb_uvs = SEMESTERS_INFO[sem][\"nb_uvs\"]\n",
" sem_data = EVALS[sem]\n",
" uvs_with_evals = sem_data.loc[pd.notna(sem_data[\"date_review\"])]\n",
" \n",
" traces.append(\n",
" go.Scatter(\n",
" x=uvs_with_evals['date_review'].sort_values().apply(datetime.toordinal)-sem_end_date ,\n",
" y=[100*float(i+1)/nb_uvs for i,e in enumerate(uvs_with_evals.index)],\n",
" text=uvs_with_evals.sort_values(by=['date_review']).index,\n",
" name=sem\n",
" ) \n",
" )\n",
" \n",
"\n",
"layout = go.Layout(\n",
" title = \"Délai de réponse\",\n",
" yaxis=dict(\n",
" range=[0, 100],\n",
" title=\"Taux des resps. d'UVs qui ont 'vu' les évaluations\",\n",
" ),\n",
" xaxis=dict(\n",
" title=\"Nombre de jours après la fin des finaux.\"\n",
" )\n",
")\n",
"\n",
"iplot(go.Figure(data=traces, layout=layout))"
]
},
{
"cell_type": "markdown",
"metadata": {},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment