diff --git a/README.md b/README.md index e690f09..3a1d39b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,5 @@ -# Encore une autre façon d'enregistrer et d'analyser mes notes +# Recopytex -Cette fois ci, on utilise: +## Backend API -- Des fichiers csv pour stocker les notes -- Des fichiers yaml pour les infos sur les élèves -- Des notebooks pour l'analyse -- Papermill pour produire les notesbooks à partir de template +## Frontend diff --git a/recoconfig.yml b/recoconfig.yml deleted file mode 100644 index 9a64f7c..0000000 --- a/recoconfig.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -source: sheets/ -output: reports/ -templates: templates/ diff --git a/recopytex/__init__.py b/recopytex/__init__.py deleted file mode 100644 index 3c672c9..0000000 --- a/recopytex/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -from .csv_extraction import flat_df_students, flat_df_for -from .df_marks_manip import pp_q_scores diff --git a/recopytex/config.py b/recopytex/config.py deleted file mode 100644 index 75413d7..0000000 --- a/recopytex/config.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -NO_ST_COLUMNS = { - "assessment": "Nom", - "term": "Trimestre", - "date": "Date", - "exercise": "Exercice", - "question": "Question", - "competence": "Competence", - "theme": "Domaine", - "comment": "Commentaire", - "is_leveled": "Est_nivele", - "score_rate": "Bareme", -} - -COLUMNS = { - **NO_ST_COLUMNS, - "student": "Eleve", - "score": "Score", - "mark": "Note", - "level": "Niveau", - "normalized": "Normalise", -} - -VALIDSCORE = { - "NOTFILLED": "", # The item is not scored yet - "NOANSWER": ".", # Student gives no answer (this score will impact the fianl mark) - "ABS": "a", # Student has absent (this score won't be impact the final mark) -} diff --git a/recopytex/csv_extraction.py b/recopytex/csv_extraction.py deleted file mode 100644 index 08e16fa..0000000 --- a/recopytex/csv_extraction.py +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -""" Extracting data from xlsx files """ - -import pandas as pd -from .config import NO_ST_COLUMNS, COLUMNS, VALIDSCORE - -pd.set_option("Precision", 2) - - -def try_replace(x, old, new): - try: - return str(x).replace(old, new) - except ValueError: - return x - - -def extract_students(df, no_student_columns=NO_ST_COLUMNS.values()): - """ Extract the list of students from df - - :param df: the dataframe - :param no_student_columns: columns that are not students - :return: list of students - """ - students = df.columns.difference(no_student_columns) - return students - - -def flat_df_students( - df, no_student_columns=NO_ST_COLUMNS.values(), postprocessing=True -): - """ Flat the dataframe by returning a dataframe with on student on each line - - :param df: the dataframe (one row per questions) - :param no_student_columns: columns that are not students - :return: dataframe with one row per questions and students - - Columns of csv files: - - - NO_ST_COLUMNS meta data on questions - - one for each students - - This function flat student's columns to "student" and "score" - """ - students = extract_students(df, no_student_columns) - scores = [] - for st in students: - scores.append( - pd.melt( - df, - id_vars=no_student_columns, - value_vars=st, - var_name=COLUMNS["student"], - value_name=COLUMNS["score"], - ).dropna(subset=[COLUMNS["score"]]) - ) - if postprocessing: - return postprocess(pd.concat(scores)) - return pd.concat(scores) - - -def flat_df_for( - df, student, no_student_columns=NO_ST_COLUMNS.values(), postprocessing=True -): - """ Extract the data only for one student - - :param df: the dataframe (one row per questions) - :param no_student_columns: columns that are not students - :return: dataframe with one row per questions and students - - Columns of csv files: - - - NO_ST_COLUMNS meta data on questions - - one for each students - - """ - students = extract_students(df, no_student_columns) - if student not in students: - raise KeyError("This student is not in the table") - st_df = df[list(no_student_columns) + [student]] - st_df = st_df.rename(columns={student: COLUMNS["score"]}).dropna( - subset=[COLUMNS["score"]] - ) - if postprocessing: - return postprocess(st_df) - return st_df - - -def postprocess(df): - """ Postprocessing score dataframe - - - Replace na with an empty string - - Replace "NOANSWER" with -1 - - Turn commas number to dot numbers - """ - - df[COLUMNS["question"]].fillna("", inplace=True) - df[COLUMNS["exercise"]].fillna("", inplace=True) - df[COLUMNS["comment"]].fillna("", inplace=True) - df[COLUMNS["competence"]].fillna("", inplace=True) - - df[COLUMNS["score"]] = pd.to_numeric( - df[COLUMNS["score"]] - .replace(VALIDSCORE["NOANSWER"], -1) - .apply(lambda x: try_replace(x, ",", ".")) - ) - df[COLUMNS["score_rate"]] = pd.to_numeric( - df[COLUMNS["score_rate"]].apply(lambda x: try_replace(x, ",", ".")), - errors="coerce", - ) - - return df - - -# ----------------------------- -# Reglages pour 'vim' -# vim:set autoindent expandtab tabstop=4 shiftwidth=4: -# cursor: 16 del diff --git a/recopytex/df_marks_manip.py b/recopytex/df_marks_manip.py deleted file mode 100644 index a39b3d0..0000000 --- a/recopytex/df_marks_manip.py +++ /dev/null @@ -1,206 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -import pandas as pd -import numpy as np -from math import ceil, floor -from .config import COLUMNS, VALIDSCORE - -# Values manipulations - - -def round_half_point(val): - try: - return 0.5 * ceil(2.0 * val) - except ValueError: - return val - except TypeError: - return val - - -def score_to_mark(x): - """ Compute the mark - - if the item is leveled then the score is multiply by the score_rate - otherwise it copies the score - - :param x: dictionnary with COLUMNS["is_leveled"], COLUMNS["score"] and COLUMNS["score_rate"] keys - - >>> d = {"Eleve":["E1"]*6 + ["E2"]*6, - ... COLUMNS["score_rate"]:[1]*2+[2]*2+[2]*2 + [1]*2+[2]*2+[2]*2, - ... COLUMNS["is_leveled"]:[0]*4+[1]*2 + [0]*4+[1]*2, - ... COLUMNS["score"]:[1, 0.33, 2, 1.5, 1, 3, 0.666, 1, 1.5, 1, 2, 3], - ... } - >>> df = pd.DataFrame(d) - >>> score_to_mark(df.loc[0]) - 1.0 - >>> score_to_mark(df.loc[10]) - 1.3333333333333333 - """ - # -1 is no answer - if x[COLUMNS["score"]] == -1: - return 0 - - if x[COLUMNS["is_leveled"]]: - if x[COLUMNS["score"]] not in [0, 1, 2, 3]: - raise ValueError(f"The evaluation is out of range: {x[COLUMNS['score']]} at {x}") - #return round_half_point(x[COLUMNS["score"]] * x[COLUMNS["score_rate"]] / 3) - return round(x[COLUMNS["score"]] * x[COLUMNS["score_rate"]] / 3, 2) - - if x[COLUMNS["score"]] > x[COLUMNS["score_rate"]]: - raise ValueError( - f"The score ({x['score']}) is greated than the rating scale ({x[COLUMNS['score_rate']]}) at {x}" - ) - return x[COLUMNS["score"]] - - -def score_to_level(x): - """ Compute the level (".",0,1,2,3). - - :param x: dictionnary with COLUMNS["is_leveled"], COLUMNS["score"] and COLUMNS["score_rate"] keys - - >>> d = {"Eleve":["E1"]*6 + ["E2"]*6, - ... COLUMNS["score_rate"]:[1]*2+[2]*2+[2]*2 + [1]*2+[2]*2+[2]*2, - ... COLUMNS["is_leveled"]:[0]*4+[1]*2 + [0]*4+[1]*2, - ... COLUMNS["score"]:[1, 0.33, np.nan, 1.5, 1, 3, 0.666, 1, 1.5, 1, 2, 3], - ... } - >>> df = pd.DataFrame(d) - >>> score_to_level(df.loc[0]) - 3 - >>> score_to_level(df.loc[1]) - 1 - >>> score_to_level(df.loc[2]) - 'na' - >>> score_to_level(df.loc[3]) - 3 - >>> score_to_level(df.loc[5]) - 3 - >>> score_to_level(df.loc[10]) - 2 - """ - # negatives are no answer or negatives points - if x[COLUMNS["score"]] <= -1: - return np.nan - - if x[COLUMNS["is_leveled"]]: - return int(x[COLUMNS["score"]]) - - return int(ceil(x[COLUMNS["score"]] / x[COLUMNS["score_rate"]] * 3)) - - -# DataFrame columns manipulations - - -def compute_mark(df): - """ Add Mark column to df - - :param df: DataFrame with COLUMNS["score"], COLUMNS["is_leveled"] and COLUMNS["score_rate"] columns. - - >>> d = {"Eleve":["E1"]*6 + ["E2"]*6, - ... COLUMNS["score_rate"]:[1]*2+[2]*2+[2]*2 + [1]*2+[2]*2+[2]*2, - ... COLUMNS["is_leveled"]:[0]*4+[1]*2 + [0]*4+[1]*2, - ... COLUMNS["score"]:[1, 0.33, 2, 1.5, 1, 3, 0.666, 1, 1.5, 1, 2, 3], - ... } - >>> df = pd.DataFrame(d) - >>> compute_mark(df) - 0 1.00 - 1 0.33 - 2 2.00 - 3 1.50 - 4 0.67 - 5 2.00 - 6 0.67 - 7 1.00 - 8 1.50 - 9 1.00 - 10 1.33 - 11 2.00 - dtype: float64 - """ - return df[[COLUMNS["score"], COLUMNS["is_leveled"], COLUMNS["score_rate"]]].apply( - score_to_mark, axis=1 - ) - - -def compute_level(df): - """ Add Mark column to df - - :param df: DataFrame with COLUMNS["score"], COLUMNS["is_leveled"] and COLUMNS["score_rate"] columns. - - >>> d = {"Eleve":["E1"]*6 + ["E2"]*6, - ... COLUMNS["score_rate"]:[1]*2+[2]*2+[2]*2 + [1]*2+[2]*2+[2]*2, - ... COLUMNS["is_leveled"]:[0]*4+[1]*2 + [0]*4+[1]*2, - ... COLUMNS["score"]:[np.nan, 0.33, 2, 1.5, 1, 3, 0.666, 1, 1.5, 1, 2, 3], - ... } - >>> df = pd.DataFrame(d) - >>> compute_level(df) - 0 na - 1 1 - 2 3 - 3 3 - 4 1 - 5 3 - 6 2 - 7 3 - 8 3 - 9 2 - 10 2 - 11 3 - dtype: object - """ - return df[[COLUMNS["score"], COLUMNS["is_leveled"], COLUMNS["score_rate"]]].apply( - score_to_level, axis=1 - ) - - -def compute_normalized(df): - """ Compute the normalized mark (Mark / score_rate) - - :param df: DataFrame with "Mark" and COLUMNS["score_rate"] columns - - >>> d = {"Eleve":["E1"]*6 + ["E2"]*6, - ... COLUMNS["score_rate"]:[1]*2+[2]*2+[2]*2 + [1]*2+[2]*2+[2]*2, - ... COLUMNS["is_leveled"]:[0]*4+[1]*2 + [0]*4+[1]*2, - ... COLUMNS["score"]:[1, 0.33, 2, 1.5, 1, 3, 0.666, 1, 1.5, 1, 2, 3], - ... } - >>> df = pd.DataFrame(d) - >>> df["Mark"] = compute_marks(df) - >>> compute_normalized(df) - 0 1.00 - 1 0.33 - 2 1.00 - 3 0.75 - 4 0.33 - 5 1.00 - 6 0.67 - 7 1.00 - 8 0.75 - 9 0.50 - 10 0.67 - 11 1.00 - dtype: float64 - """ - return df[COLUMNS["mark"]] / df[COLUMNS["score_rate"]] - - -# Postprocessing question scores - - -def pp_q_scores(df): - """ Postprocessing questions scores dataframe - - :param df: questions-scores dataframe - :return: same data frame with mark, level and normalize columns - """ - assign = { - COLUMNS["mark"]: compute_mark, - COLUMNS["level"]: compute_level, - COLUMNS["normalized"]: compute_normalized, - } - return df.assign(**assign) - - -# ----------------------------- -# Reglages pour 'vim' -# vim:set autoindent expandtab tabstop=4 shiftwidth=4: -# cursor: 16 del diff --git a/recopytex/scripts/__init__.py b/recopytex/scripts/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/recopytex/scripts/config.py b/recopytex/scripts/config.py deleted file mode 100644 index 9ac61ef..0000000 --- a/recopytex/scripts/config.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -import yaml - -CONFIGPATH = "recoconfig.yml" - -with open(CONFIGPATH, "r") as configfile: - config = yaml.load(configfile, Loader=yaml.FullLoader) - diff --git a/recopytex/scripts/prepare_csv.py b/recopytex/scripts/prepare_csv.py deleted file mode 100644 index 38edc4c..0000000 --- a/recopytex/scripts/prepare_csv.py +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -import click -from pathlib import Path -from datetime import datetime -from PyInquirer import prompt, print_json -import pandas as pd -import numpy as np - -from .config import config -from ..config import NO_ST_COLUMNS - - -class PromptAbortException(EOFError): - def __init__(self, message, errors=None): - - # Call the base class constructor with the parameters it needs - super(PromptAbortException, self).__init__("Abort questionnary", errors) - - -def get_tribes(answers): - """ List tribes based on subdirectory of config["source"] which have an "eleves.csv" file inside """ - return [ - p.name for p in Path(config["source"]).iterdir() if (p / "eleves.csv").exists() - ] - - -def prepare_csv(): - items = new_eval() - - item = items[0] - # item = {"tribe": "308", "date": datetime.today(), "assessment": "plop"} - csv_output = ( - Path(config["source"]) - / item["tribe"] - / f"{item['date']:%y%m%d}_{item['assessment']}.csv" - ) - - students = pd.read_csv(Path(config["source"]) / item["tribe"] / "eleves.csv")["Nom"] - - columns = list(NO_ST_COLUMNS.keys()) - items = [[it[c] for c in columns] for it in items] - columns = list(NO_ST_COLUMNS.values()) - items_df = pd.DataFrame.from_records(items, columns=columns) - for s in students: - items_df[s] = np.nan - - items_df.to_csv(csv_output, index=False, date_format="%d/%m/%Y") - click.echo(f"Saving csv file to {csv_output}") - - -def new_eval(answers={}): - click.echo(f"Préparation d'un nouveau devoir") - - eval_questions = [ - {"type": "input", "name": "assessment", "message": "Nom de l'évaluation",}, - { - "type": "list", - "name": "tribe", - "message": "Classe concernée", - "choices": get_tribes, - }, - { - "type": "input", - "name": "date", - "message": "Date du devoir (%y%m%d)", - "default": datetime.today().strftime("%y%m%d"), - "filter": lambda val: datetime.strptime(val, "%y%m%d"), - }, - { - "type": "list", - "name": "term", - "message": "Trimestre", - "choices": ["1", "2", "3"], - }, - ] - - eval_ans = prompt(eval_questions) - - items = [] - add_exo = True - while add_exo: - ex_items = new_exercice(eval_ans) - items += ex_items - add_exo = prompt( - [ - { - "type": "confirm", - "name": "add_exo", - "message": "Ajouter un autre exercice", - "default": True, - } - ] - )["add_exo"] - return items - - -def new_exercice(answers={}): - exercise_questions = [ - {"type": "input", "name": "exercise", "message": "Nom de l'exercice"}, - ] - - click.echo(f"Nouvel exercice") - exercise_ans = prompt(exercise_questions, answers=answers) - - items = [] - - add_item = True - while add_item: - try: - item_ans = new_item(exercise_ans) - except PromptAbortException: - click.echo("Création de l'item annulée") - else: - items.append(item_ans) - add_item = prompt( - [ - { - "type": "confirm", - "name": "add_item", - "message": f"Ajouter un autre item pour l'exercice {exercise_ans['exercise']}", - "default": True, - } - ] - )["add_item"] - - return items - - -def new_item(answers={}): - item_questions = [ - {"type": "input", "name": "question", "message": "Nom de l'item",}, - {"type": "input", "name": "comment", "message": "Commentaire",}, - { - "type": "list", - "name": "competence", - "message": "Competence", - "choices": ["Cher", "Rep", "Mod", "Rai", "Cal", "Com"], - }, - {"type": "input", "name": "theme", "message": "Domaine",}, - { - "type": "confirm", - "name": "is_leveled", - "message": "Évaluation par niveau", - "default": True, - }, - {"type": "input", "name": "score_rate", "message": "Bareme"}, - { - "type": "confirm", - "name": "correct", - "message": "Tout est correct?", - "default": True, - }, - ] - click.echo(f"Nouvelle question pour l'exercice {answers['exercise']}") - item_ans = prompt(item_questions, answers=answers) - if item_ans["correct"]: - return item_ans - raise PromptAbortException("Abort item creation") diff --git a/recopytex/scripts/recopytex.py b/recopytex/scripts/recopytex.py deleted file mode 100644 index 65bee8c..0000000 --- a/recopytex/scripts/recopytex.py +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -import click -from pathlib import Path -import yaml -import sys -import papermill as pm -from datetime import datetime - -from .prepare_csv import prepare_csv -from .config import config - - -@click.group() -def cli(): - pass - - -@cli.command() -def print_config(): - click.echo(f"Config file is {CONFIGPATH}") - click.echo("It contains") - click.echo(config) - - -def reporting(csv_file): - # csv_file = Path(csv_file) - tribe_dir = csv_file.parent - csv_filename = csv_file.name.split(".")[0] - - assessment = str(csv_filename).split("_")[-1].capitalize() - date = str(csv_filename).split("_")[0] - try: - date = datetime.strptime(date, "%y%m%d") - except ValueError: - date = datetime.today().strptime(date, "%y%m%d") - - tribe = str(tribe_dir).split("/")[-1] - - template = Path(config["templates"]) / "tpl_evaluation.ipynb" - - dest = Path(config["output"]) / tribe / csv_filename - dest.mkdir(parents=True, exist_ok=True) - - click.echo(f"Building {assessment} ({date:%d/%m/%y}) report") - pm.execute_notebook( - str(template), - str(dest / f"{assessment}.ipynb"), - parameters=dict( - tribe=tribe, - assessment=assessment, - date=f"{date:%d/%m/%y}", - csv_file=str(csv_file.absolute()), - ), - ) - - -@cli.command() -@click.argument("target", required=False) -def report(target=""): - """ Make a report for the eval - - :param target: csv file or a directory where csvs are - """ - try: - if target.endswith(".csv"): - csv = Path(target) - if not csv.exists(): - click.echo(f"{target} does not exists") - sys.exit(1) - if csv.suffix != ".csv": - click.echo(f"{target} has to be a csv file") - sys.exit(1) - csvs = [csv] - else: - csvs = list(Path(target).glob("**/*.csv")) - except AttributeError: - csvs = list(Path(config["source"]).glob("**/*.csv")) - - for csv in csvs: - click.echo(f"Processing {csv}") - try: - reporting(csv) - except pm.exceptions.PapermillExecutionError as e: - click.echo(f"Error with {csv}: {e}") - - -@cli.command() -def prepare(): - """ Prepare csv file """ - - items = prepare_csv() - - click.echo(items) - - -@cli.command() -@click.argument("tribe") -def random_pick(tribe): - """ Randomly pick a student """ - pass diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 07c2f90..0000000 --- a/requirements.txt +++ /dev/null @@ -1,76 +0,0 @@ -ansiwrap==0.8.4 -appdirs==1.4.3 -attrs==19.1.0 -backcall==0.1.0 -black==19.10b0 -bleach==3.1.0 -certifi==2019.6.16 -chardet==3.0.4 -Click==7.0 -colorama==0.4.1 -cycler==0.10.0 -decorator==4.4.0 -defusedxml==0.6.0 -entrypoints==0.3 -future==0.17.1 -idna==2.8 -importlib-resources==1.0.2 -ipykernel==5.1.3 -ipython==7.11.1 -ipython-genutils==0.2.0 -ipywidgets==7.5.1 -jedi==0.15.2 -Jinja2==2.10.3 -jsonschema==3.2.0 -jupyter==1.0.0 -jupyter-client==5.3.4 -jupyter-console==6.1.0 -jupyter-core==4.6.1 -jupytex==0.0.3 -kiwisolver==1.1.0 -Markdown==3.1.1 -MarkupSafe==1.1.1 -matplotlib==3.1.2 -mistune==0.8.4 -nbconvert==5.6.1 -nbformat==5.0.3 -notebook==6.0.3 -numpy==1.18.1 -pandas==0.25.3 -pandocfilters==1.4.2 -papermill==1.2.1 -parso==0.5.2 -pathspec==0.7.0 -pexpect==4.8.0 -pickleshare==0.7.5 -prometheus-client==0.7.1 -prompt-toolkit==1.0.14 -ptyprocess==0.6.0 -Pygments==2.5.2 -PyInquirer==1.0.3 -pyparsing==2.4.6 -pyrsistent==0.15.7 -python-dateutil==2.8.0 -pytz==2019.3 -PyYAML==5.3 -pyzmq==18.1.1 -qtconsole==4.6.0 --e git+git_opytex:/lafrite/recopytex.git@7e026bedb24c1ca8bef3b71b3d63f8b0d6916e81#egg=Recopytex -regex==2020.1.8 -requests==2.22.0 -scipy==1.4.1 -Send2Trash==1.5.0 -six==1.12.0 -tenacity==6.0.0 -terminado==0.8.3 -testpath==0.4.4 -textwrap3==0.9.2 -toml==0.10.0 -tornado==6.0.3 -tqdm==4.41.1 -traitlets==4.3.2 -typed-ast==1.4.1 -urllib3==1.25.8 -wcwidth==0.1.8 -webencodings==0.5.1 -widgetsnbextension==3.5.1 diff --git a/setup.py b/setup.py deleted file mode 100644 index aa334c6..0000000 --- a/setup.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -from setuptools import setup, find_packages - -setup( - name='Recopytex', - version='1.1.1', - description='Assessment analysis', - author='Benjamin Bertrand', - author_email='', - packages=find_packages(), - include_package_data=True, - install_requires=[ - 'Click', - 'pandas', - 'numpy', - 'papermill', - 'pyyaml', - 'PyInquirer', - ], - entry_points=''' - [console_scripts] - recopytex=recopytex.scripts.recopytex:cli - ''', - ) - -# ----------------------------- -# Reglages pour 'vim' -# vim:set autoindent expandtab tabstop=4 shiftwidth=4: -# cursor: 16 del diff --git a/templates/tpl_evaluation.ipynb b/templates/tpl_evaluation.ipynb deleted file mode 100644 index e346678..0000000 --- a/templates/tpl_evaluation.ipynb +++ /dev/null @@ -1,929 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": {}, - "report_default": { - "hidden": true - } - } - } - } - }, - "outputs": [], - "source": [ - "from IPython.display import Markdown as md\n", - "from IPython.display import display, HTML\n", - "import pandas as pd\n", - "import ipywidgets as widgets\n", - "import seaborn as sns\n", - "from pathlib import Path\n", - "from datetime import datetime\n", - "from recopytex import flat_df_students, pp_q_scores\n", - "#import prettytable as pt\n", - "%matplotlib inline" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "cm = sns.light_palette(\"green\", as_cmap=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": {}, - "report_default": { - "hidden": true - } - } - } - }, - "tags": [ - "parameters" - ] - }, - "outputs": [], - "source": [ - "tribe = \"308\"\n", - "assessment = \"DM1\"\n", - "date = \"15/09/16\"\n", - "csv_file = Path(f\"../sheets/{tribe}/160915_{assessment}.csv\")" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": {}, - "report_default": { - "hidden": false - } - } - } - } - }, - "outputs": [ - { - "data": { - "text/markdown": [ - "# DM1 (15/09/16) pour 308" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "if date is None:\n", - " display(md(f\"# {assessment} pour {tribe}\"))\n", - "else:\n", - " display(md(f\"# {assessment} ({date}) pour {tribe}\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": {}, - "report_default": { - "hidden": true - } - } - } - } - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
TrimestreNomDateExerciceQuestionCompetenceDomaineCommentaireBaremeEst_niveleEleveScoreNoteNiveauNormalise
01DM115/09/1611.1CalPrio1.01ABDOU Asmahane2.01.02.01.0
11DM115/09/1611.2CalPrio1.01ABDOU Asmahane3.01.03.01.0
21DM115/09/1611.3CalPrio1.01ABDOU Asmahane2.01.02.01.0
31DM115/09/1611.4CalPrio1.01ABDOU Asmahane2.01.02.01.0
41DM115/09/1611.5CalPrio1.01ABDOU Asmahane2.01.02.01.0
\n", - "
" - ], - "text/plain": [ - " Trimestre Nom Date Exercice Question Competence Domaine Commentaire \\\n", - "0 1 DM1 15/09/16 1 1.1 Cal Prio \n", - "1 1 DM1 15/09/16 1 1.2 Cal Prio \n", - "2 1 DM1 15/09/16 1 1.3 Cal Prio \n", - "3 1 DM1 15/09/16 1 1.4 Cal Prio \n", - "4 1 DM1 15/09/16 1 1.5 Cal Prio \n", - "\n", - " Bareme Est_nivele Eleve Score Note Niveau Normalise \n", - "0 1.0 1 ABDOU Asmahane 2.0 1.0 2.0 1.0 \n", - "1 1.0 1 ABDOU Asmahane 3.0 1.0 3.0 1.0 \n", - "2 1.0 1 ABDOU Asmahane 2.0 1.0 2.0 1.0 \n", - "3 1.0 1 ABDOU Asmahane 2.0 1.0 2.0 1.0 \n", - "4 1.0 1 ABDOU Asmahane 2.0 1.0 2.0 1.0 " - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "stack_scores = pd.read_csv(csv_file, encoding=\"latin_1\")\n", - "scores = flat_df_students(stack_scores).dropna(subset=[\"Score\"])\n", - "scores = pp_q_scores(scores)\n", - "scores.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": {}, - "report_default": { - "hidden": true - } - } - } - } - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
NoteBareme
ExerciceEleve
1ABDOU Asmahane5.06.0
ABOU Roihim0.06.0
AHMED BOINALI Kouraichia2.06.0
AHMED Rahada3.06.0
ALI SAID Anchourati0.06.0
\n", - "
" - ], - "text/plain": [ - " Note Bareme\n", - "Exercice Eleve \n", - "1 ABDOU Asmahane 5.0 6.0\n", - " ABOU Roihim 0.0 6.0\n", - " AHMED BOINALI Kouraichia 2.0 6.0\n", - " AHMED Rahada 3.0 6.0\n", - " ALI SAID Anchourati 0.0 6.0" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "exercises_scores = scores.groupby([\"Exercice\", \"Eleve\"]).agg({\"Note\": \"sum\", \"Bareme\": \"sum\"})\n", - "exercises_scores.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": {}, - "report_default": { - "hidden": false - } - } - } - } - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Note Bareme
Eleve
ABDOU Asmahane6.512
ABOU Roihim012
AHMED BOINALI Kouraichia3.512
AHMED Rahada712
ALI SAID Anchourati012
ASSANE Noussouraniya5.512
BACAR Issiaka012
BACAR Samina412
CHAIHANE Said612
COMBO Houzaimati612
DAOUD Anzilati7.512
DAOUD Talaenti812
DARKAOUI Rachma812
DHAKIOINE Nabaouya112
DJANFAR Soioutinour7.512
DRISSA Ibrahim012
HACHIM SIDI Assani8.512
HAFIDHUI Zalifa812
HOUMADI Marie7.512
HOUMADI Sania5.512
MAANDHUI Halouoi8.512
MASSONDI Nasma812
SAIDALI Irichad712
" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "assessment_scores = scores.groupby([\"Eleve\"]).agg({\"Note\": \"sum\", \"Bareme\": \"sum\"})\n", - "#assessment_scores.style.background_gradient(cmap=cm, subset=[\"Note\"])\n", - "assessment_scores.style.bar(subset=[\"Note\"])" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "12.0" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "assessment_scores.Bareme.max()" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": {}, - "report_default": { - "hidden": false - } - } - } - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "count 23.00\n", - "mean 5.37\n", - "std 3.08\n", - "min 0.00\n", - "25% 3.75\n", - "50% 6.50\n", - "75% 7.75\n", - "max 8.50\n", - "Name: Note, dtype: float64" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "assessment_scores[\"Note\"].describe()" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEGCAYAAABrQF4qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXxV9Z3/8dcnNytZIRtbIJCwL6IGEBn3pbgUtNq6dFrt5tSfW1vbjk4dW+20j1ZnWq21nXFa21prqWJrqaWljhtuOKyyiRD2RAIESEIgIdvn98e9MpECuYGbXHLyfj64j3vPud977ueQ3HfOPcv3a+6OiIgEV0K8CxARka6loBcRCTgFvYhIwCnoRUQCTkEvIhJwifF647y8PC8uLo7X24uI9EhLliypdvf8zrwmbkFfXFzM4sWL4/X2IiI9kplt6exrtOtGRCTgFPQiIgEXVdCb2Qwze8/Mys3sriM8f6OZ7TKz5ZHb52NfqoiIHI8O99GbWQh4FLgIqAAWmdlcd19zWNPfufutXVCjiIicgGi26KcA5e6+0d2bgNnArK4tS0REYiWaoB8EbGs3XRGZd7irzGyFmc0xs6IjLcjMbjKzxWa2eNeuXcdRroiI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3X8Q73pizd3vdvfB7l5M+Of2krsHZovQ3auAbWY2KjLrAmDNMV7S02wFzjCzPpHf1QsI0MHmdtp3yXID8Mc41hJzkYGgvg7MdPcD0bym24M+chDhgy4V3gWedvfV3V1HF5kOfIrwlu7yyO3SeBclnXIb8BszWwFMAr4b53piJvJNZQ6wFFhJ+PPfo7sLMLPfAm8Bo8yswsw+B3wPuMjM1hP+FvO9Yy3jZHaU9fsxkAm8EMmY/+xwOeoCQUQk2HQwVkQk4BT0IiIBp6AXEQk4Bb2ISMAp6EVEAk5BL72GmbmZ/Ue76a+a2bc6eM0VAe2YTnoRBb30JgeBj5lZXidecwXhXlZFeiwFvfQmLYQvEPry4U+YWbGZvRTp4/tFMxtiZmcCM4EHIxemlERufzWzJWb2mpmN7u6VEOksBb30No8Cn4x0SdzeI8CvIn18/wb4kbu/Sfhy+q+5+yR330D4D8Vt7n468FXgJ91Yu8hxSYx3ASLdyd3rzOwJwgNwNLR7ahrwscjjXwMPHP7aSK+kZwLPhLuKASCl66oViQ0FvfRGDxHu7+UXnXxdAlDj7pNiX5JI19GuG+l13H0P8DTwuXaz3+T/htX7JPBa5PE+wh1IERlbYJOZfRzCvZWa2SndUrTICVCnZtJrmFm9u2dEHhcCm4AH3P1bZjaU8BZ+HuFRpj7j7lvNbDrw34TP2Lma8MhaPwUGAEnAbHe/v/vXRiR6CnoRkSRpiXIAAAAuSURBVIDTrhsRkYBT0IuIBJyCXkQk4BT0IiIBp6AXEQk4Bb2ISMAp6EVEAu7/A6Yp7zBSHTwkAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "dp = sns.distplot(assessment_scores.Note, bins=int(assessment_scores.Bareme[0])*2)\n", - "dp.set(xlim=(0, assessment_scores.Bareme[0]))\n", - "dp" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
NoteBareme
ExerciceEleve
1ABDOU Asmahane5.06.0
ABOU Roihim0.06.0
AHMED BOINALI Kouraichia2.06.0
AHMED Rahada3.06.0
ALI SAID Anchourati0.06.0
\n", - "
" - ], - "text/plain": [ - " Note Bareme\n", - "Exercice Eleve \n", - "1 ABDOU Asmahane 5.0 6.0\n", - " ABOU Roihim 0.0 6.0\n", - " AHMED BOINALI Kouraichia 2.0 6.0\n", - " AHMED Rahada 3.0 6.0\n", - " ALI SAID Anchourati 0.0 6.0" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "exercises_scores.head()" - ] - }, - { - "cell_type": "code", - "execution_count": 79, - "metadata": { - "extensions": { - "jupyter_dashboards": { - "version": 1, - "views": { - "grid_default": {}, - "report_default": { - "hidden": true - } - } - } - } - }, - "outputs": [], - "source": [ - "def st_results(student):\n", - " html = \"
\"\n", - " html += \"
\"\n", - " \n", - " ass = assessment_scores.loc[student]\n", - " exercices = exercises_scores.xs(student, level=\"Eleve\")\n", - " \n", - " html += f\"

{student} -- {assessment}

\"\n", - " html += f\"

{ass.Note} / {ass.Bareme}

\"\n", - " for (i, ex) in exercices.iterrows():\n", - " if not ex.Bareme == 0:\n", - " html += f\"

Exercice {i} ({ex.Note}/{ex.Bareme})

\"\n", - " html += scores.loc[(scores.Exercice==i) & (scores.Eleve==student)][[\"Question\", \"Commentaire\", \"Note\", \"Bareme\"]].to_html()\n", - " html += \"
\"\n", - " html += \"
\"\n", - " return HTML(html)\n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": 80, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "788cdf676be445669085d7de593a8eeb", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "interactive(children=(Dropdown(description='student', options=('ABDOU Asmahane', 'ABOU Roihim', 'AHMED BOINALI…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 80, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "widgets.interact(st_results, student=list(assessment_scores.index))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Tags", - "extensions": { - "jupyter_dashboards": { - "activeView": "grid_default", - "version": 1, - "views": { - "grid_default": { - "cellMargin": 10, - "defaultCellHeight": 20, - "maxColumns": 12, - "name": "grid", - "type": "grid" - }, - "report_default": { - "name": "report", - "type": "report" - } - } - } - }, - "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.7.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/templates/tpl_student.ipynb b/templates/tpl_student.ipynb deleted file mode 100644 index ceef07c..0000000 --- a/templates/tpl_student.ipynb +++ /dev/null @@ -1,1111 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Markdown as md\n", - "from IPython.display import display\n", - "import pandas as pd\n", - "from pathlib import Path\n", - "from datetime import datetime\n", - "from recopytex import flat_df_for, pp_q_scores\n", - "#import prettytable as pt\n", - "%matplotlib inline" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "tags": [ - "parameters" - ] - }, - "outputs": [], - "source": [ - "tribe = 308\n", - "student = \"ABDOU Asmahane\"\n", - "source = Path(f\"../sheets/{tribe}/\")" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "dfs = []\n", - "for file in source.glob(\"*.csv\"):\n", - " df = pd.read_csv(file)\n", - " df = flat_df_for(df, student)\n", - " dfs.append(df)\n", - "scores = pd.concat(dfs) \n", - "scores = pp_q_scores(scores)" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
TrimestreNomDateExerciceQuestionCompetenceDomaineCommentaireBaremeEst_niveleScoreNoteNiveauNormalise
01DS205/11/1611ModFracFigure -> fraction2.01-10.00NaN0.00
11DS205/11/1612CalFracÉgalité fractions2.01-10.00NaN0.00
21DS205/11/162ComGeoCommunication2.01-10.00NaN0.00
31DS205/11/162ConGeoTableau2.01-10.00NaN0.00
41DS205/11/162CalGeoCalculs2.01-10.00NaN0.00
51DS205/11/1631 à 3CheOpeMettre en valeur les informations1.51-10.00NaN0.00
61DS205/11/1631 à 3CalOpeChoisir et faire les calculs1.01-10.00NaN0.00
71DS205/11/1631 à 3ComOpePhrases et étapes1.51-10.00NaN0.00
81DS205/11/1641CheGeo3DRemplir le tableau2.01-10.00NaN0.00
91DS205/11/1641CalLittCalcul s+f-a1.01-10.00NaN0.00
01DM115/09/1611.1CalPrio1.0120.672.00.67
11DM115/09/1611.2CalPrio1.0131.003.01.00
21DM115/09/1611.3CalPrio1.0120.672.00.67
31DM115/09/1611.4CalPrio1.0120.672.00.67
41DM115/09/1611.5CalPrio1.0120.672.00.67
51DM115/09/1611.6CalPrio1.0100.000.00.00
61DM115/09/1622.1ComProba1.0110.331.00.33
71DM115/09/1622.2 à 2.4ComProbaNotation P(...)1.0100.000.00.00
81DM115/09/1622.2 à 2.4RepProbaFractions1.0100.000.00.00
91DM115/09/1622.2 à 2.4DivProbarésultat1.01-10.00NaN0.00
101DM115/09/1622.5RaiProba1.01-10.00NaN0.00
111DM115/09/16MalusRetardDivDiv0.00-10.00NaNNaN
121DM115/09/16PresentationComDiv1.0011.003.01.00
01DS124/09/1611.aCalPrio1.5131.503.01.00
11DS124/09/1611.bCalPrio1.5100.000.00.00
21DS124/09/1611.cCalPrio1.5131.503.01.00
31DS124/09/1611.dCalPrio1.5131.503.01.00
41DS124/09/1621RecProba1.0110.331.00.33
51DS124/09/1622CalProba1.0120.672.00.67
61DS124/09/1623 à 5ComProbaNotation1.5110.501.00.33
71DS124/09/1623 à 5RepProbaFraction1.5121.002.00.67
81DS124/09/1623 à 5DivProbaRésultat1.0100.000.00.00
91DS124/09/163ComScraExplication1.5110.501.00.33
101DS124/09/163CheScraTrouver erreur1.5110.501.00.33
111DS124/09/1641 et 2CheOpe1.0131.003.01.00
121DS124/09/1641 et 2ComOpe1.5121.002.00.67
131DS124/09/1641 et 2CalOpe1.5131.503.01.00
\n", - "
" - ], - "text/plain": [ - " Trimestre Nom Date Exercice Question Competence Domaine \\\n", - "0 1 DS2 05/11/16 1 1 Mod Frac \n", - "1 1 DS2 05/11/16 1 2 Cal Frac \n", - "2 1 DS2 05/11/16 2 Com Geo \n", - "3 1 DS2 05/11/16 2 Con Geo \n", - "4 1 DS2 05/11/16 2 Cal Geo \n", - "5 1 DS2 05/11/16 3 1 à 3 Che Ope \n", - "6 1 DS2 05/11/16 3 1 à 3 Cal Ope \n", - "7 1 DS2 05/11/16 3 1 à 3 Com Ope \n", - "8 1 DS2 05/11/16 4 1 Che Geo3D \n", - "9 1 DS2 05/11/16 4 1 Cal Litt \n", - "0 1 DM1 15/09/16 1 1.1 Cal Prio \n", - "1 1 DM1 15/09/16 1 1.2 Cal Prio \n", - "2 1 DM1 15/09/16 1 1.3 Cal Prio \n", - "3 1 DM1 15/09/16 1 1.4 Cal Prio \n", - "4 1 DM1 15/09/16 1 1.5 Cal Prio \n", - "5 1 DM1 15/09/16 1 1.6 Cal Prio \n", - "6 1 DM1 15/09/16 2 2.1 Com Proba \n", - "7 1 DM1 15/09/16 2 2.2 à 2.4 Com Proba \n", - "8 1 DM1 15/09/16 2 2.2 à 2.4 Rep Proba \n", - "9 1 DM1 15/09/16 2 2.2 à 2.4 Div Proba \n", - "10 1 DM1 15/09/16 2 2.5 Rai Proba \n", - "11 1 DM1 15/09/16 Malus Retard Div Div \n", - "12 1 DM1 15/09/16 Presentation Com Div \n", - "0 1 DS1 24/09/16 1 1.a Cal Prio \n", - "1 1 DS1 24/09/16 1 1.b Cal Prio \n", - "2 1 DS1 24/09/16 1 1.c Cal Prio \n", - "3 1 DS1 24/09/16 1 1.d Cal Prio \n", - "4 1 DS1 24/09/16 2 1 Rec Proba \n", - "5 1 DS1 24/09/16 2 2 Cal Proba \n", - "6 1 DS1 24/09/16 2 3 à 5 Com Proba \n", - "7 1 DS1 24/09/16 2 3 à 5 Rep Proba \n", - "8 1 DS1 24/09/16 2 3 à 5 Div Proba \n", - "9 1 DS1 24/09/16 3 Com Scra \n", - "10 1 DS1 24/09/16 3 Che Scra \n", - "11 1 DS1 24/09/16 4 1 et 2 Che Ope \n", - "12 1 DS1 24/09/16 4 1 et 2 Com Ope \n", - "13 1 DS1 24/09/16 4 1 et 2 Cal Ope \n", - "\n", - " Commentaire Bareme Est_nivele Score Note \\\n", - "0 Figure -> fraction 2.0 1 -1 0.00 \n", - "1 Égalité fractions 2.0 1 -1 0.00 \n", - "2 Communication 2.0 1 -1 0.00 \n", - "3 Tableau 2.0 1 -1 0.00 \n", - "4 Calculs 2.0 1 -1 0.00 \n", - "5 Mettre en valeur les informations 1.5 1 -1 0.00 \n", - "6 Choisir et faire les calculs 1.0 1 -1 0.00 \n", - "7 Phrases et étapes 1.5 1 -1 0.00 \n", - "8 Remplir le tableau 2.0 1 -1 0.00 \n", - "9 Calcul s+f-a 1.0 1 -1 0.00 \n", - "0 1.0 1 2 0.67 \n", - "1 1.0 1 3 1.00 \n", - "2 1.0 1 2 0.67 \n", - "3 1.0 1 2 0.67 \n", - "4 1.0 1 2 0.67 \n", - "5 1.0 1 0 0.00 \n", - "6 1.0 1 1 0.33 \n", - "7 Notation P(...) 1.0 1 0 0.00 \n", - "8 Fractions 1.0 1 0 0.00 \n", - "9 résultat 1.0 1 -1 0.00 \n", - "10 1.0 1 -1 0.00 \n", - "11 0.0 0 -1 0.00 \n", - "12 1.0 0 1 1.00 \n", - "0 1.5 1 3 1.50 \n", - "1 1.5 1 0 0.00 \n", - "2 1.5 1 3 1.50 \n", - "3 1.5 1 3 1.50 \n", - "4 1.0 1 1 0.33 \n", - "5 1.0 1 2 0.67 \n", - "6 Notation 1.5 1 1 0.50 \n", - "7 Fraction 1.5 1 2 1.00 \n", - "8 Résultat 1.0 1 0 0.00 \n", - "9 Explication 1.5 1 1 0.50 \n", - "10 Trouver erreur 1.5 1 1 0.50 \n", - "11 1.0 1 3 1.00 \n", - "12 1.5 1 2 1.00 \n", - "13 1.5 1 3 1.50 \n", - "\n", - " Niveau Normalise \n", - "0 NaN 0.00 \n", - "1 NaN 0.00 \n", - "2 NaN 0.00 \n", - "3 NaN 0.00 \n", - "4 NaN 0.00 \n", - "5 NaN 0.00 \n", - "6 NaN 0.00 \n", - "7 NaN 0.00 \n", - "8 NaN 0.00 \n", - "9 NaN 0.00 \n", - "0 2.0 0.67 \n", - "1 3.0 1.00 \n", - "2 2.0 0.67 \n", - "3 2.0 0.67 \n", - "4 2.0 0.67 \n", - "5 0.0 0.00 \n", - "6 1.0 0.33 \n", - "7 0.0 0.00 \n", - "8 0.0 0.00 \n", - "9 NaN 0.00 \n", - "10 NaN 0.00 \n", - "11 NaN NaN \n", - "12 3.0 1.00 \n", - "0 3.0 1.00 \n", - "1 0.0 0.00 \n", - "2 3.0 1.00 \n", - "3 3.0 1.00 \n", - "4 1.0 0.33 \n", - "5 2.0 0.67 \n", - "6 1.0 0.33 \n", - "7 2.0 0.67 \n", - "8 0.0 0.00 \n", - "9 1.0 0.33 \n", - "10 1.0 0.33 \n", - "11 3.0 1.00 \n", - "12 2.0 0.67 \n", - "13 3.0 1.00 " - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "scores" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
NoteBareme
NomExercice
DM113.676.0
20.335.0
Malus0.000.0
Presentation1.001.0
DS114.506.0
22.506.0
31.003.0
43.504.0
DS210.004.0
20.006.0
30.004.0
40.003.0
\n", - "
" - ], - "text/plain": [ - " Note Bareme\n", - "Nom Exercice \n", - "DM1 1 3.67 6.0\n", - " 2 0.33 5.0\n", - " Malus 0.00 0.0\n", - " Presentation 1.00 1.0\n", - "DS1 1 4.50 6.0\n", - " 2 2.50 6.0\n", - " 3 1.00 3.0\n", - " 4 3.50 4.0\n", - "DS2 1 0.00 4.0\n", - " 2 0.00 6.0\n", - " 3 0.00 4.0\n", - " 4 0.00 3.0" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "exercises_scores = scores.groupby([\"Nom\", \"Exercice\"]).agg({\"Note\": \"sum\", \"Bareme\": \"sum\"})\n", - "exercises_scores" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
NoteBareme
Nom
DM15.012.0
DS111.519.0
DS20.017.0
\n", - "
" - ], - "text/plain": [ - " Note Bareme\n", - "Nom \n", - "DM1 5.0 12.0\n", - "DS1 11.5 19.0\n", - "DS2 0.0 17.0" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "assessment_scores = scores.groupby([\"Nom\"]).agg({\"Note\": \"sum\", \"Bareme\": \"sum\"})\n", - "assessment_scores" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/markdown": [ - "# ABDOU Asmahane en 308" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "md(f\"# {student} en {tribe}\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Tags", - "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.7.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}