Analysis of data
- Python3
-
Insert csv files into the data folder (*actions.csv, grades.csv, gradebook from each sessions, grades.csv, *timeinput.csv, *dates.csv) * = for all 3 sessions (Jan, May, Sep)
-
Make a python virtual environment
python3 -m venv venv
OR for windows,
py -m venv venv
-
Activate python virtual environment
source venv/bin/activateOR for windows,
venv/Scripts/activate
-
Install the required packages
pip3 install -r requirements.txt
-
API Request Requirements
- Go to https://gamification.ok.ubc.ca/
- Inspect page -> Network tab (make sure to do this before logging in, log out first if needed)
- Login to your gamification account
- On Network tab select
api-token-auth-> Preview -> token - Set
GAMIFICATION_SUBMISSION_URLandGAMIFICATION_TOKENwith your token in your created.envfile - rename .env.txt file to ".env" and save
- run scripts following the order below
OR for windows,
python3 -m src.scripts.<script_name_without_.py>
py -m src.scripts.<script_name_without_.py>
All scripts with their description and requirements.
To get student performance metrics and activity bar chart:
- filter_consent.py
- filter_submissions.py
- track_attempts.py
- engagement.py
- filter_gradebook.py
- grade_behavior.py
- bar_chart.py
To get index of difficulty for all questions in Course Gamification throughout 2022-2025:
- filter_consent.py
- filter_all_submissions.py
- splitCSV.py
- filter_submissions.py
- combineCSV.py
- track_attempts.py
- engagement.py
- Create pivot table on Microsoft Excel
- get_skipped_ID.py
- count_skipped.py
To get heatmaps and process maps of cluster groups:
- rename_actor.py
- process_mining.R
- cluster_behavior_action.R
- cluster_behavior_srl.R
- cluster_fluctuations_action.R
- cluster_fluctuations_srl.R
- cluster_grade_action.R
- cluster_grade_srl.R
- cluster_gender_action.R
- cluster_gender_srl.R
old_scripts:
- attempt_statistics.py
- filter_optional_submissions.py
- gradebook_engagement_statistics.py
- question_category_count.py
- question_variation_count.py
- statistics.py
- user_performance.py
- time_gap.py
- state_diagram.py
Gets all gamification questions through api and saves it as questions.json in data folder
- None
Counts all questions from gamification by categories and saves the statistic into a csv file
- questions.json from get_questions.py
Gets all question variation from gamification and is saved into a csv file
- questions.json from get_questions.py
Filters actions csv data, that can be downloaded from gamification admin panel, by student consent.
- actions csv data from gamification
- student consent csv data from gamification
- teachers csv data
Filters actions csv data to get only student submissions. Gets question details for each submission and saves it into a csv file.
- filtered consent csv data from filter_consent.py
Filters actions csv data to get only student submissions. Gets question details for each submission and saves it into a 2 different csv file, 1 includes only optional submissions (submissions for practice questions) and the other is every other submissions.
- actions csv data from gamification
Adds a attemps column to the submission csv data which counts which attempt it was for a certain user for a certain question.
- submissions csv data from filter_submission.py or filter_optional_submission.py
Analyses correct and incorrect submissions with users' attemps to check user accuracy per question per category.
- submissions csv data with attemps column from track_attempts.py
- may need to run
pip uninstall numpyandpip install numpyif there are issues with importing pandas
Creates bar chart for submissions csv data for number of submissions per period of time (per week).
- session dates csv
Analyses submissions data to get per question per user statistics like avg attempts per user, stdev, minimum number of attermpts, maximum number of attempts, and total users attempted. This statistic is saved into a csv file.
- submissions csv data from filter_submission.py or filter_optional_submission.py
Filters gradebook based on consent from gamification
- gradebook csv data
- consent csv data from gamification
Analyzes the gradebook and submissions seperating student engagement based on final exam grade and overall course grade.
- submissions csv data from filter_submission.py or filter_optional_submission.py
- filtered gradebook csv data from filter_gradebook.py
Summarizes student activity and performance on Canvas Gamification. Sorted by overall grade level and question categories, as TA (average total attempts), %A (average correct attempts), TQ (average total questions)
- engagement csv data from engagement.py
- compiled grade data from grades.csv
Produces bar graph of the average time gap between students' attempts on questions per categories
- time gap input csv file (currently excel generated; merged between attempts and gradebook csv file)
Produces state diagram graph visualization of student's behavior/ activities on Canvas Gamification website
- pip install networkx
- actor markov matrix csv
Filters out unnecessary rows for files that are beyond one year in duration
- filtered consent csv file
Splits large csv file into modifiable smaller parts
- large actions.csv
Combines previously split csv into one csv
- Separate parts of the csv (code modifiable based on the number of parts)
Returns csv with rows of skipped questions and their estimated index of difficulty
- updated_output.csv
- actions_22_25.csv
- categories_with_difficulty.csv
Renames user id who did course more than once as its own actor id (e.g. 388 becomes 3881 and 3882 for January and May sessions)
- input.csv
Prepares raw data for process mapping
- new_input.csv
- filter.csv
- grades.csv
Clusters student data into groups based on commonly shared actions, with action_code as the nodes/ events
- updated_output.csv
Clusters student data into groups based on commonly shared actions, with srl_subcategory as the nodes/ events
- updated_output.csv
- Clusters student data into groups based on fluctuation shift groups (Midterm 1 to Midterm 2 and Midterm 2 to Finals), with action_code as the nodes/ events.
- Generates heatmaps for average frequency of each action_code by shift group.
- Adds group information to skipped questions data
- output_pruned.csv
- grades.csv
- gender.csv
- updated_output_skipped_questions.csv
- Clusters student data into groups based on fluctuation shift groups (Midterm 1 to Midterm 2 and Midterm 2 to Finals), with srl_subcategory as the nodes/ events.
- Generates heatmaps for average frequency of each srl_subcategory by shift group.
- output_pruned.csv
- grades.csv
- Clusters student data into groups based on end of course grade level, with action_code as the nodes/ events.
- Generates heatmaps for average frequency of each action_code by grade group.
- updated_output.csv
- Clusters student data into groups based on end of course grade level, with srl_subcategory as the nodes/ events.
- Generates heatmaps for average frequency of each srl_subcategory by grade group.
- updated_output.csv
- Clusters student data into groups based on gender, with action_code as the nodes/ events.
- Generates heatmaps for average frequency of each action_code by gender group.
- updated_output.csv
- Clusters student data into groups based on gender, with srl_subcategory as the nodes/ events.
- Generates heatmaps for average frequency of each srl_subcategory by gender group.
- updated_output.csv