===================================== Tutorial of Course Information Module ===================================== | Course Information Module has a Python class structure. | *CourseInformation* class receives dataset files and the method functions return basic course information. .. image:: course_information.png :scale: 50% :align: center | The dataset structure is introduced in :ref:`openla-dataset`. | Specify the directory path including four types of files and course id. .. code-block:: python import openLA as la course_info = la.CourseInformation(files_dir="dataset_sample", course_id="A") | If you want to specify the dataset files paths directly, use the arguments "event_stream_file", "lecture_material_file", "lectrue_time_file", "quiz_score_file", and "grade_point_file". | These arguments are useful in the case that the course does not have the course id, the dataset files do not exist in same directory, etc. .. code-block:: python import openLA as la course_info = la.CourseInformation(event_stream_file="dataset_sample/Course_A_EventStream.csv", lecture_material_file="dataset_sample/Course_A_LectureMaterial.csv", lecture_time_file="dataset_sample/Course_A_LectureTime.csv", quiz_score_file="dataset_sample/Course_A_QuizScore.csv", grade_point_file="dataset_sample/Course_A_GradePoint") | If you want load pandas DataFrames instead of CSV files, use the arguments "event_stream_df", "lecture_material_df", "lectrue_time_df", "quiz_score_df", and "grade_point_df". .. code-block:: python import openLA as la import pandas as pd event_stream_df = pd.read_csv("dataset_sample/Course_A_EventStream.csv") lecture_material_df = pd.read_csv("dataset_sample/Course_A_LectureMaterial.csv") lecture_time_df = pd.read_csv("dataset_sample/Course_A_LectureTime.csv") quiz_score_df = pd.read_csv("dataset_sample/Course_A_QuizScore.csv") grade_point_df = pd.read_csv("dataset_sample/Course_A_GradePoint.csv") course_info = la.CourseInformation(event_stream_df=event_stream_df, lecture_material_df=lecture_material_df, lecture_time_df=lecture_time_df, quiz_score_df=quiz_score_df, grade_point_df=grade_point_df) | The method functions in below table are available now. | You can get the basic information of the course like ``course_info.num_users()``. | The documentation is in :doc:`../scripts/course_information` +-----------------------------+------------------------------------------------------------+ | function | description | +=============================+============================================================+ | num_users | Get the number of users | +-----------------------------+------------------------------------------------------------+ | user_id | Get the unique user ids | +-----------------------------+------------------------------------------------------------+ | contents_id | Get the unique contents ids | +-----------------------------+------------------------------------------------------------+ | lecture_week | Get the lecture weeks | +-----------------------------+------------------------------------------------------------+ | user_score | Get the user(s) final score | +-----------------------------+------------------------------------------------------------+ | users_in_selected_score | Get the user ids who got the score between selected scores | +-----------------------------+------------------------------------------------------------+ | user_grade | Get the user(s) final grade | +-----------------------------+------------------------------------------------------------+ | users_in_selected_grade | Get the user ids who got the score between selected grade | +-----------------------------+------------------------------------------------------------+ | grade_distribution | Get the grade distribution in the course | +-----------------------------+------------------------------------------------------------+ | contents_id_to_lecture_week | Get the lecture week using the specified content(s) | +-----------------------------+------------------------------------------------------------+ | lecture_week_to_contents_id | Get the contents id used in the specified lecture(s) | +-----------------------------+------------------------------------------------------------+ | num_page_of_contents | Get the number of pages in the specified content(s) | +-----------------------------+------------------------------------------------------------+ | lecture_start_time | Get the start time of the specified lecture(s) | +-----------------------------+------------------------------------------------------------+ | lecture_end_time | Get the end time of the specified lecture(s) | +-----------------------------+------------------------------------------------------------+ | | | | | load_event_stream | | Get the instance of *EventStream* class | | | | :doc:`tutorial_event_stream` | +-----------------------------+------------------------------------------------------------+ | lecture_material_df | Get the DataFrame about information of contents | +-----------------------------+------------------------------------------------------------+ | lecture_time_df | Get the DataFrame about lecture start and end time | +-----------------------------+------------------------------------------------------------+ | quiz_score_df | Get the DataFrame about users' final score | +-----------------------------+------------------------------------------------------------+ Example ============ .. toctree:: :maxdepth: 1 ../jupyter_examples/example_course_information