{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import xlsxwriter\n",
"import sqlite3\n",
"import pandas as pd\n",
"import numpy as np\n",
"from math import ceil\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"from pprint import pprint"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from repytex.tools.evaluation import Evaluation\n",
"from repytex.tools.sqlite_getters import all_ev_description"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Récupération de la structure du DNB blanc"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"conn = sqlite3.connect('../recopytex.db')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"ev = Evaluation.from_sqlite(20, conn)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" term | \n",
" t_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 20 | \n",
" DNB blanc1 | \n",
" 2 | \n",
" 2 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name term t_id\n",
"0 20 DNB blanc1 2 2"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.ev_df"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" grade | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2 | \n",
" 306 | \n",
" 3e | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name grade\n",
"0 2 306 3e"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.t_df"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" surname | \n",
" mail | \n",
" commment | \n",
" tribe_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 27 | \n",
" ABDALLAH | \n",
" Rachma | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
" 1 | \n",
" 28 | \n",
" ABDOU | \n",
" Kassim | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
" 2 | \n",
" 29 | \n",
" AHAMADI | \n",
" Irchadi | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
" 3 | \n",
" 30 | \n",
" AHAMED | \n",
" Mikidadi | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
" 4 | \n",
" 31 | \n",
" ANLI | \n",
" El Anziz | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name surname mail commment tribe_id\n",
"0 27 ABDALLAH Rachma None 2\n",
"1 28 ABDOU Kassim None 2\n",
"2 29 AHAMADI Irchadi None 2\n",
"3 30 AHAMED Mikidadi None 2\n",
"4 31 ANLI El Anziz None 2"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.s_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" eval_id | \n",
" date | \n",
" comment | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 58 | \n",
" 1 Dalle de béton | \n",
" 20 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" 59 | \n",
" 2 Soirée Basket | \n",
" 20 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" 60 | \n",
" 3 Recette de gateau | \n",
" 20 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" 61 | \n",
" 4 Dessiner une figure | \n",
" 20 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" 62 | \n",
" 5 Cross du collège | \n",
" 20 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name eval_id date comment\n",
"0 58 1 Dalle de béton 20 2018-02-07 00:00:00.000000 \n",
"1 59 2 Soirée Basket 20 2018-02-07 00:00:00.000000 \n",
"2 60 3 Recette de gateau 20 2018-02-07 00:00:00.000000 \n",
"3 61 4 Dessiner une figure 20 2018-02-07 00:00:00.000000 \n",
"4 62 5 Cross du collège 20 2018-02-07 00:00:00.000000 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.ex_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" question_id | \n",
" student_id | \n",
" value | \n",
"
\n",
" \n",
" \n",
" \n",
"
\n",
"
"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [id, question_id, student_id, value]\n",
"Index: []"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.sc_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Evaluation DNB blanc1 306 - T2\n",
"Ex 1 Dalle de béton\n",
"\tQu 1: Multiplications total HT (3, Cal)\n",
"\tQu 1: Division quantité (2, Cal)\n",
"\tQu 1: Somme Total HT et TC (4, Cal)\n",
"\tQu 2 a et b: Lecture de tableur (4, Rep)\n",
"\tQu 2 c et d: Formule tableur (4, Rep)\n",
"Ex 2 Soirée Basket\n",
"\tQu 1 à 3: Lire un tableau (6, Cher)\n",
"\tQu 4 à 5: Calculs de points (6, Mod)\n",
"\tQu 6: Paniers à 2 points (4, Rai)\n",
"\tQu 7: Champion de la soirée (3, Rai)\n",
"Ex 3 Recette de gateau\n",
"\tQu 1: Multiplier les quantités (3, Mod)\n",
"\tQu 1: Rapport 3 (3, Mod)\n",
"\tQu 1: Multiplication de la fraction (1, Mod)\n",
"\tQu 2: Quantité restante (2, Cal)\n",
"\tQu 2: Fractions (2, Cal)\n",
"Ex 4 Dessiner une figure\n",
"\tQu 1: Dessin du lutin (3, Rep)\n",
"\tQu 2: Modifications (6, Rep)\n",
"Ex 5 Cross du collège\n",
"\tQu 1 et 2: Calculs de longueur (6, Rep)\n",
"\tQu 3: Pythagore (5, Mod)\n",
"\tQu 4: Longueur d'un tour (5, Mod)\n",
"\tQu 5: Longueur pour les 3e (4, Cal)\n",
"Ex 6 Voyage en famille\n",
"\tQu 1: Calcul temps et conversion demi heure (4, Cal)\n",
"\tQu 2: Lectures graphiques (6, Rep)\n",
"\tQu 3: Véracité de l'affirmation (4, Rai)\n",
"Ex Présentation\n",
"\tQu : (10, Com)\n",
"\n"
]
}
],
"source": [
"print(ev.description())"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Construction des df à partir du tableur pour les 306"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ev_df = ev.ev_df"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"ex_df = ev.ex_df"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"q_df = ev.q_df"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"t_df = ev.t_df"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"s_df = ev.s_df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Extraction des scores"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"excelname = './306-DNB blanc1-pro.xlsx'"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"xls_df = pd.read_excel(excelname).T"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Présentation | \n",
" Ex 1 Dalle de béton | \n",
" 0 - Multiplications total HT | \n",
" 1 - Division quantité | \n",
" 2 - Somme Total HT et TC | \n",
" 3 - Lecture de tableur | \n",
" 4 - Formule tableur | \n",
" Ex 2 Soirée Basket | \n",
" 0 - Lire un tableau | \n",
" 1 - Calculs de points | \n",
" ... | \n",
" 1 - Modifications | \n",
" Ex 5 Cross du collège | \n",
" 0 - Calculs de longueur | \n",
" 1 - Pythagore | \n",
" 2 - Longueur d'un tour | \n",
" 3 - Longueur pour les 3e | \n",
" Ex 6 Voyage en famille | \n",
" 0 - Calcul temps et conversion demi heure | \n",
" 1 - Lectures graphiques | \n",
" 2 - Véracité de l'affirmation | \n",
"
\n",
" \n",
" \n",
" \n",
" Competence | \n",
" NaN | \n",
" NaN | \n",
" Cal | \n",
" Cal | \n",
" Cal | \n",
" Rep | \n",
" Rep | \n",
" NaN | \n",
" Cher | \n",
" Mod | \n",
" ... | \n",
" Rep | \n",
" NaN | \n",
" Rep | \n",
" Mod | \n",
" Mod | \n",
" Cal | \n",
" NaN | \n",
" Cal | \n",
" Rep | \n",
" Rai | \n",
"
\n",
" \n",
" Barème | \n",
" 10 | \n",
" 17 | \n",
" 3 | \n",
" 2 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
" 19 | \n",
" 6 | \n",
" 6 | \n",
" ... | \n",
" 6 | \n",
" 20 | \n",
" 6 | \n",
" 5 | \n",
" 5 | \n",
" 4 | \n",
" 14 | \n",
" 4 | \n",
" 6 | \n",
" 4 | \n",
"
\n",
" \n",
" Ousseni Fayadhui | \n",
" 10 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" BOINA Chadia | \n",
" 9 | \n",
" 10 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" MAGNELE Chamsidine | \n",
" 9 | \n",
" 13 | \n",
" 3 | \n",
" 2 | \n",
" 4 | \n",
" 4 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 30 columns
\n",
"
"
],
"text/plain": [
" Présentation Ex 1 Dalle de béton \\\n",
"Competence NaN NaN \n",
"Barème 10 17 \n",
"Ousseni Fayadhui 10 0 \n",
"BOINA Chadia 9 10 \n",
"MAGNELE Chamsidine 9 13 \n",
"\n",
" 0 - Multiplications total HT 1 - Division quantité \\\n",
"Competence Cal Cal \n",
"Barème 3 2 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 2 2 \n",
"MAGNELE Chamsidine 3 2 \n",
"\n",
" 2 - Somme Total HT et TC 3 - Lecture de tableur \\\n",
"Competence Cal Rep \n",
"Barème 4 4 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 4 \n",
"MAGNELE Chamsidine 4 4 \n",
"\n",
" 4 - Formule tableur Ex 2 Soirée Basket 0 - Lire un tableau \\\n",
"Competence Rep NaN Cher \n",
"Barème 4 19 6 \n",
"Ousseni Fayadhui 0 0 0 \n",
"BOINA Chadia 2 0 0 \n",
"MAGNELE Chamsidine 0 1 1 \n",
"\n",
" 1 - Calculs de points ... \\\n",
"Competence Mod ... \n",
"Barème 6 ... \n",
"Ousseni Fayadhui 0 ... \n",
"BOINA Chadia 0 ... \n",
"MAGNELE Chamsidine 0 ... \n",
"\n",
" 1 - Modifications Ex 5 Cross du collège \\\n",
"Competence Rep NaN \n",
"Barème 6 20 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
" 0 - Calculs de longueur 1 - Pythagore \\\n",
"Competence Rep Mod \n",
"Barème 6 5 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
" 2 - Longueur d'un tour 3 - Longueur pour les 3e \\\n",
"Competence Mod Cal \n",
"Barème 5 4 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
" Ex 6 Voyage en famille \\\n",
"Competence NaN \n",
"Barème 14 \n",
"Ousseni Fayadhui 0 \n",
"BOINA Chadia 0 \n",
"MAGNELE Chamsidine 0 \n",
"\n",
" 0 - Calcul temps et conversion demi heure \\\n",
"Competence Cal \n",
"Barème 4 \n",
"Ousseni Fayadhui 0 \n",
"BOINA Chadia 0 \n",
"MAGNELE Chamsidine 0 \n",
"\n",
" 1 - Lectures graphiques 2 - Véracité de l'affirmation \n",
"Competence Rep Rai \n",
"Barème 6 4 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
"[5 rows x 30 columns]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xls_df = xls_df.drop(\"DNB blanc1\", axis = 1)\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Présentation | \n",
" 0 - Multiplications total HT | \n",
" 1 - Division quantité | \n",
" 2 - Somme Total HT et TC | \n",
" 3 - Lecture de tableur | \n",
" 4 - Formule tableur | \n",
" 0 - Lire un tableau | \n",
" 1 - Calculs de points | \n",
" 2 - Paniers à 2 points | \n",
" 3 - Champion de la soirée | \n",
" ... | \n",
" 4 - Fractions | \n",
" 0 - Dessin du lutin | \n",
" 1 - Modifications | \n",
" 0 - Calculs de longueur | \n",
" 1 - Pythagore | \n",
" 2 - Longueur d'un tour | \n",
" 3 - Longueur pour les 3e | \n",
" 0 - Calcul temps et conversion demi heure | \n",
" 1 - Lectures graphiques | \n",
" 2 - Véracité de l'affirmation | \n",
"
\n",
" \n",
" \n",
" \n",
" Competence | \n",
" NaN | \n",
" Cal | \n",
" Cal | \n",
" Cal | \n",
" Rep | \n",
" Rep | \n",
" Cher | \n",
" Mod | \n",
" Rai | \n",
" Rai | \n",
" ... | \n",
" Cal | \n",
" Rep | \n",
" Rep | \n",
" Rep | \n",
" Mod | \n",
" Mod | \n",
" Cal | \n",
" Cal | \n",
" Rep | \n",
" Rai | \n",
"
\n",
" \n",
" Barème | \n",
" 10 | \n",
" 3 | \n",
" 2 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
" 6 | \n",
" 6 | \n",
" 4 | \n",
" 3 | \n",
" ... | \n",
" 2 | \n",
" 3 | \n",
" 6 | \n",
" 6 | \n",
" 5 | \n",
" 5 | \n",
" 4 | \n",
" 4 | \n",
" 6 | \n",
" 4 | \n",
"
\n",
" \n",
" Ousseni Fayadhui | \n",
" 10 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" BOINA Chadia | \n",
" 9 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" MAGNELE Chamsidine | \n",
" 9 | \n",
" 3 | \n",
" 2 | \n",
" 4 | \n",
" 4 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 24 columns
\n",
"
"
],
"text/plain": [
" Présentation 0 - Multiplications total HT \\\n",
"Competence NaN Cal \n",
"Barème 10 3 \n",
"Ousseni Fayadhui 10 0 \n",
"BOINA Chadia 9 2 \n",
"MAGNELE Chamsidine 9 3 \n",
"\n",
" 1 - Division quantité 2 - Somme Total HT et TC \\\n",
"Competence Cal Cal \n",
"Barème 2 4 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 2 0 \n",
"MAGNELE Chamsidine 2 4 \n",
"\n",
" 3 - Lecture de tableur 4 - Formule tableur \\\n",
"Competence Rep Rep \n",
"Barème 4 4 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 4 2 \n",
"MAGNELE Chamsidine 4 0 \n",
"\n",
" 0 - Lire un tableau 1 - Calculs de points \\\n",
"Competence Cher Mod \n",
"Barème 6 6 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 1 0 \n",
"\n",
" 2 - Paniers à 2 points 3 - Champion de la soirée \\\n",
"Competence Rai Rai \n",
"Barème 4 3 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
" ... 4 - Fractions \\\n",
"Competence ... Cal \n",
"Barème ... 2 \n",
"Ousseni Fayadhui ... 0 \n",
"BOINA Chadia ... 0 \n",
"MAGNELE Chamsidine ... 0 \n",
"\n",
" 0 - Dessin du lutin 1 - Modifications \\\n",
"Competence Rep Rep \n",
"Barème 3 6 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
" 0 - Calculs de longueur 1 - Pythagore \\\n",
"Competence Rep Mod \n",
"Barème 6 5 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
" 2 - Longueur d'un tour 3 - Longueur pour les 3e \\\n",
"Competence Mod Cal \n",
"Barème 5 4 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
" 0 - Calcul temps et conversion demi heure \\\n",
"Competence Cal \n",
"Barème 4 \n",
"Ousseni Fayadhui 0 \n",
"BOINA Chadia 0 \n",
"MAGNELE Chamsidine 0 \n",
"\n",
" 1 - Lectures graphiques 2 - Véracité de l'affirmation \n",
"Competence Rep Rai \n",
"Barème 6 4 \n",
"Ousseni Fayadhui 0 0 \n",
"BOINA Chadia 0 0 \n",
"MAGNELE Chamsidine 0 0 \n",
"\n",
"[5 rows x 24 columns]"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ex_cols = [c for c in xls_df.columns if 'Ex' in c]\n",
"xls_df = xls_df.drop(ex_cols, axis=1)\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"cols = {}\n",
"for c in xls_df.columns:\n",
" a = q_df[q_df['comment']==c.split(' - ')[-1]]\n",
" try:\n",
" cols[c] = a.id.values[0]\n",
" except IndexError:\n",
" # id de la question de présentation\n",
" cols[c] = 278\n",
"#cols"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" 278 | \n",
" 178 | \n",
" 179 | \n",
" 180 | \n",
" 181 | \n",
" 182 | \n",
" 183 | \n",
" 184 | \n",
" 185 | \n",
" 186 | \n",
" ... | \n",
" 191 | \n",
" 192 | \n",
" 193 | \n",
" 194 | \n",
" 195 | \n",
" 196 | \n",
" 197 | \n",
" 198 | \n",
" 199 | \n",
" 200 | \n",
"
\n",
" \n",
" \n",
" \n",
" Ousseni Fayadhui | \n",
" 10 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" BOINA Chadia | \n",
" 9 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" MAGNELE Chamsidine | \n",
" 9 | \n",
" 3 | \n",
" 2 | \n",
" 4 | \n",
" 4 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" MBAROUKOU Dania | \n",
" 10 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 4 | \n",
" 4 | \n",
" 5 | \n",
" 6 | \n",
" 4 | \n",
" 3 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 6 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" TSIMPOU Zoubert | \n",
" 10 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 24 columns
\n",
"
"
],
"text/plain": [
" 278 178 179 180 181 182 183 184 185 186 ... 191 192 193 \\\n",
"Ousseni Fayadhui 10 0 0 0 0 0 0 0 0 0 ... 0 0 0 \n",
"BOINA Chadia 9 2 2 0 4 2 0 0 0 0 ... 0 0 0 \n",
"MAGNELE Chamsidine 9 3 2 4 4 0 1 0 0 0 ... 0 0 0 \n",
"MBAROUKOU Dania 10 2 2 2 4 4 5 6 4 3 ... 0 0 0 \n",
"TSIMPOU Zoubert 10 0 0 0 0 0 0 0 0 0 ... 0 0 0 \n",
"\n",
" 194 195 196 197 198 199 200 \n",
"Ousseni Fayadhui 0 0 0 0 0 0 0 \n",
"BOINA Chadia 0 0 0 0 0 0 0 \n",
"MAGNELE Chamsidine 0 0 0 0 0 0 0 \n",
"MBAROUKOU Dania 6 0 0 1 0 0 0 \n",
"TSIMPOU Zoubert 0 0 0 0 0 0 0 \n",
"\n",
"[5 rows x 24 columns]"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xls_df = xls_df.rename(columns=cols).drop([\"Competence\", 'Barème'])\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"studs = {}\n",
"for s in xls_df.index:\n",
" ss = s_df[s_df['surname'].str.contains(s.split(' ')[-1], case=False)]\n",
" ss = ss.id.values\n",
" studs[s] = ss[0]\n",
"#studs"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" 278 | \n",
" 178 | \n",
" 179 | \n",
" 180 | \n",
" 181 | \n",
" 182 | \n",
" 183 | \n",
" 184 | \n",
" 185 | \n",
" 186 | \n",
" ... | \n",
" 191 | \n",
" 192 | \n",
" 193 | \n",
" 194 | \n",
" 195 | \n",
" 196 | \n",
" 197 | \n",
" 198 | \n",
" 199 | \n",
" 200 | \n",
"
\n",
" \n",
" \n",
" \n",
" 42 | \n",
" 10 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 34 | \n",
" 9 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 38 | \n",
" 9 | \n",
" 3 | \n",
" 2 | \n",
" 4 | \n",
" 4 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 39 | \n",
" 10 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 4 | \n",
" 4 | \n",
" 5 | \n",
" 6 | \n",
" 4 | \n",
" 3 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 6 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 46 | \n",
" 10 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 24 columns
\n",
"
"
],
"text/plain": [
" 278 178 179 180 181 182 183 184 185 186 ... 191 192 193 194 195 196 197 \\\n",
"42 10 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 \n",
"34 9 2 2 0 4 2 0 0 0 0 ... 0 0 0 0 0 0 0 \n",
"38 9 3 2 4 4 0 1 0 0 0 ... 0 0 0 0 0 0 0 \n",
"39 10 2 2 2 4 4 5 6 4 3 ... 0 0 0 6 0 0 1 \n",
"46 10 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 \n",
"\n",
" 198 199 200 \n",
"42 0 0 0 \n",
"34 0 0 0 \n",
"38 0 0 0 \n",
"39 0 0 0 \n",
"46 0 0 0 \n",
"\n",
"[5 rows x 24 columns]"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xls_df = xls_df.rename(index=studs)\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"42 278 10\n",
" 178 0\n",
" 179 0\n",
" 180 0\n",
" 181 0\n",
"dtype: object"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xls_df = xls_df.stack()\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 42 | \n",
" 278 | \n",
" 10 | \n",
"
\n",
" \n",
" 1 | \n",
" 42 | \n",
" 178 | \n",
" 0 | \n",
"
\n",
" \n",
" 2 | \n",
" 42 | \n",
" 179 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" 42 | \n",
" 180 | \n",
" 0 | \n",
"
\n",
" \n",
" 4 | \n",
" 42 | \n",
" 181 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark\n",
"0 42 278 10\n",
"1 42 178 0\n",
"2 42 179 0\n",
"3 42 180 0\n",
"4 42 181 0"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_df = xls_df.reset_index().rename(columns={\"level_0\": \"student_id\", \"level_1\": \"question_id\", 0:'mark'})\n",
"sc_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 42 | \n",
" 278 | \n",
" 10 | \n",
"
\n",
" \n",
" 1 | \n",
" 42 | \n",
" 178 | \n",
" 0 | \n",
"
\n",
" \n",
" 2 | \n",
" 42 | \n",
" 179 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" 42 | \n",
" 180 | \n",
" 0 | \n",
"
\n",
" \n",
" 4 | \n",
" 42 | \n",
" 181 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark\n",
"0 42 278 10\n",
"1 42 178 0\n",
"2 42 179 0\n",
"3 42 180 0\n",
"4 42 181 0"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_df[\"mark\"] = sc_df[\"mark\"].astype(int)\n",
"sc_df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Maintenant il faut transformer tout ça en niveau de compétence"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from repytex.tools.sc_transforms import mark2level\n",
"def mark2level_row(x):\n",
" return mark2level(x[\"mark\"], x[\"score_rate\"])"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
" id | \n",
" name | \n",
" score_rate | \n",
" is_leveled | \n",
" exercise_id | \n",
" competence | \n",
" domain | \n",
" comment | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 42 | \n",
" 278 | \n",
" 10 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" 34 | \n",
" 278 | \n",
" 9 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" 38 | \n",
" 278 | \n",
" 9 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" 39 | \n",
" 278 | \n",
" 10 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" 46 | \n",
" 278 | \n",
" 10 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark id name score_rate is_leveled \\\n",
"0 42 278 10 278 10 1 \n",
"1 34 278 9 278 10 1 \n",
"2 38 278 9 278 10 1 \n",
"3 39 278 10 278 10 1 \n",
"4 46 278 10 278 10 1 \n",
"\n",
" exercise_id competence domain comment \n",
"0 86 Com Présentation \n",
"1 86 Com Présentation \n",
"2 86 Com Présentation \n",
"3 86 Com Présentation \n",
"4 86 Com Présentation "
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_q_df = pd.merge(sc_df, q_df, left_on=\"question_id\", right_on=\"id\")\n",
"sc_q_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"sc_q_df[\"value\"] = sc_q_df.apply(mark2level_row, axis=1)\n",
"sc_q_df = sc_q_df[['student_id', 'question_id', 'value']]"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"sc_df = pd.merge(sc_df, sc_q_df, on=[\"student_id\", 'question_id'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"On met tout ensemble dans l'évaluation"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"dnbBlanc = Evaluation(ev_df, t_df, s_df, ex_df)\n",
"dnbBlanc.set_scores(sc_df)\n",
"dnbBlanc.set_ex_qu_structure(ex_df, q_df)\n",
"dnbBlanc.set_competence_assessment(sc_df, q_df)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exploration"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
" value | \n",
" id | \n",
" name | \n",
" surname | \n",
" mail | \n",
" commment | \n",
" tribe_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 42 | \n",
" 278 | \n",
" 10 | \n",
" 3 | \n",
" 42 | \n",
" OUSSENI | \n",
" Fayadhui | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
" 1 | \n",
" 42 | \n",
" 178 | \n",
" 0 | \n",
" 0 | \n",
" 42 | \n",
" OUSSENI | \n",
" Fayadhui | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
" 2 | \n",
" 42 | \n",
" 179 | \n",
" 0 | \n",
" 0 | \n",
" 42 | \n",
" OUSSENI | \n",
" Fayadhui | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
" 3 | \n",
" 42 | \n",
" 180 | \n",
" 0 | \n",
" 0 | \n",
" 42 | \n",
" OUSSENI | \n",
" Fayadhui | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
" 4 | \n",
" 42 | \n",
" 181 | \n",
" 0 | \n",
" 0 | \n",
" 42 | \n",
" OUSSENI | \n",
" Fayadhui | \n",
" | \n",
" None | \n",
" 2 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark value id name surname mail commment \\\n",
"0 42 278 10 3 42 OUSSENI Fayadhui None \n",
"1 42 178 0 0 42 OUSSENI Fayadhui None \n",
"2 42 179 0 0 42 OUSSENI Fayadhui None \n",
"3 42 180 0 0 42 OUSSENI Fayadhui None \n",
"4 42 181 0 0 42 OUSSENI Fayadhui None \n",
"\n",
" tribe_id \n",
"0 2 \n",
"1 2 \n",
"2 2 \n",
"3 2 \n",
"4 2 "
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_s_df = pd.merge(dnbBlanc.sc_df, dnbBlanc.s_df, left_on='student_id', right_on='id')\n",
"sc_s_df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A priori pas de soucis avec les sommes de points"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"name surname \n",
"ABDALLAH Rachma 22\n",
"ABDOU Kassim 6\n",
"AHAMADI Irchadi 42\n",
"AHAMED Mikidadi 25\n",
"ANSSURDINE Zaidou 10\n",
"BACAR MOUSTADRANE Rakchat 13\n",
"BOINA Chadia 19\n",
"CHANFI Fayçoil 17\n",
"CHARIF Djaël 71\n",
"COMBO Doulka-Rynaini 25\n",
"IBRAHIM, Izaki 10\n",
"MAGNELE Chamsidine 24\n",
"MBAROUKOU Dania 56\n",
"MIRADJI Issoufi 68\n",
"NIDHOIMI El-Fahar 51\n",
"OUSSENI Fayadhui 10\n",
"SAID OMAR Nadjoi 43\n",
"SALIM Haïridine 10\n",
"SAÏD Dalila 50\n",
"Said Rachida 16\n",
"TSIMPOU Zoubert 10\n",
"Name: mark, dtype: int64"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_s_df.groupby([\"name\", \"surname\"]).sum()['mark']"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
" value | \n",
" id_x | \n",
" name_x | \n",
" surname | \n",
" mail | \n",
" commment | \n",
" tribe_id | \n",
" id_y | \n",
" name_y | \n",
" score_rate | \n",
" is_leveled | \n",
" exercise_id | \n",
" competence | \n",
" domain | \n",
" comment | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 42 | \n",
" 278 | \n",
" 10 | \n",
" 3 | \n",
" 42 | \n",
" OUSSENI | \n",
" Fayadhui | \n",
" | \n",
" None | \n",
" 2 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" 34 | \n",
" 278 | \n",
" 9 | \n",
" 3 | \n",
" 34 | \n",
" BOINA | \n",
" Chadia | \n",
" | \n",
" None | \n",
" 2 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" 38 | \n",
" 278 | \n",
" 9 | \n",
" 3 | \n",
" 38 | \n",
" MAGNELE | \n",
" Chamsidine | \n",
" | \n",
" None | \n",
" 2 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" 39 | \n",
" 278 | \n",
" 10 | \n",
" 3 | \n",
" 39 | \n",
" MBAROUKOU | \n",
" Dania | \n",
" | \n",
" None | \n",
" 2 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" 46 | \n",
" 278 | \n",
" 10 | \n",
" 3 | \n",
" 46 | \n",
" TSIMPOU | \n",
" Zoubert | \n",
" | \n",
" None | \n",
" 2 | \n",
" 278 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 86 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark value id_x name_x surname mail \\\n",
"0 42 278 10 3 42 OUSSENI Fayadhui \n",
"1 34 278 9 3 34 BOINA Chadia \n",
"2 38 278 9 3 38 MAGNELE Chamsidine \n",
"3 39 278 10 3 39 MBAROUKOU Dania \n",
"4 46 278 10 3 46 TSIMPOU Zoubert \n",
"\n",
" commment tribe_id id_y name_y score_rate is_leveled exercise_id \\\n",
"0 None 2 278 10 1 86 \n",
"1 None 2 278 10 1 86 \n",
"2 None 2 278 10 1 86 \n",
"3 None 2 278 10 1 86 \n",
"4 None 2 278 10 1 86 \n",
"\n",
" competence domain comment \n",
"0 Com Présentation \n",
"1 Com Présentation \n",
"2 Com Présentation \n",
"3 Com Présentation \n",
"4 Com Présentation "
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"full_df = pd.merge(dnbBlanc.sc_df, dnbBlanc.s_df, left_on=\"student_id\", right_on=\"id\")\n",
"full_df = pd.merge(full_df, dnbBlanc.q_df, left_on=\"question_id\", right_on=\"id\")\n",
"full_df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## On compile?"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from repytex.reports.eval_reports import build_target_name\n",
"from repytex.reports.produce_compile import produce_compile"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Path('.//306/report_DNB blanc 1.tex')"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"datas = {\"evaluation\": dnbBlanc}\n",
"target = build_target_name('306', 'DNB blanc 1')\n",
"target"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"template=\"tpl_reports_eval.tex\""
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
"produce_compile(template, datas, target, force=1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}