The "Ikea" Project
Given a course id, extracts details of course and combines with collected New Analytics extracts.
- assignments
- quizzes
- pages
- enrollments
- tabs (navigation)
- discussion_topics
- modules
- module_items
- files
- page_links TODO
- student_discussion_responses TODO
- student_submissions
- A user can download student interaction data in Canvas from New Analytics. Given that the data is downloaded consistently (Canvas only has 27 days in New Analytics), and stored in
data/{COURSE_ID}/user_input/new_analytics_input
when prompted, the goal is to be able to combine student interaction with other course and student data for a "full picture" of the course and its activity. - The assumption is you are using the direct download of New Analytics data.
- We use conda, and suggest miniconda for your projects: Install Miniconda -> whichever the latest 3.x version is, use the 'pkg' version if you are unfamiliar with bash
- We also like VSCode: Install VSCode, and the Python Extension
- You also need to have Git installed. We like GitHub Desktop if you aren't familiar with terminal
- Clone this project
- Create the environment
canvas-get-course-details
(in terminal)
$ conda env create -f environment.yml
- In this project folder (course-details), create a .env file with the following, save in course-details folder
COURSE_ID = your_course_id
API_URL = 'https://ubc.instructure.com'
API_TOKEN = 'your_token'
⚠️ Your token should be kept private and secure. We recommend setting expiry on your tokens, and deleting from Canvas once no longer needed.
Creating a .env file in VSCode is easy. in the File Explorer right click, add a new file. The file is called .env, and then you can edit it as needed in the editor window.
Go to GitHub Desktop and make sure you pull the latest version of the project.
In the terminal in VS Code:
-
Make sure you are in the right directory
-
if you opened the folder in vscode and see the project files in the explorer, then you are in the right directory
-
if you are unsure, check with the command:
$ pwd
-
if you are not in the right directory, you can use
cd
in terminal to navigate, for example if the project is in Documents/GitHub/course-details$ cd "Documents/GitHub/course-details"
- Activate the environment by entering these in order (this should have been created in project setup)
-
$ conda deactivate
-
$ conda activate canvas-get-course-details
-
The scripts will require user input - indicated in Blue. You will get confirmations of success in Green. If anything goes terribly wrong you will see Red output in terminal.
- extract canvas data from the course specified in the .env file
- ask you to add new analytics data to a specific folder
- ask you to add a "gradebook.csv" into a specific folder
- create several versions of data: original_data (as-is from Canvas), cleaned_data (renamed and reduced columns), and tableau_data (which is the format needed to use the Tableau template)
You just need to run one command and follow the prompts:
$ python src/do_it_all.py
Note: this will replace any existing data if you have extracted data before. There will also be a number of inputs in terminal to enter.
If you've successfully run all of the scripts, then you're done!
You should now see the folders for your course:
- project_data
- cleaned_data
- transformations
- original_data
- tableau_data
- cleaned_data
- user_input
We have included a zip file Demo Dashboard and Data.zip
that contains sample data in the form you would find in project_data/tableau_data
. The sample data itself may not be accurate, for instance the assignments don't add up to the final grade - it is simply for demonstration purposes. You should be able to replace the data with your own in the Tableau workbook. See Tableau's guides to updating / replacing data sources: https://help.tableau.com/current/pro/desktop/en-us/connect_basic_replace.htm
Here are the connections between the data sources
This project relies heavily on the CanvasAPI python library from The University of Central Florida's open source software projects - UCF Open.
- Marko Prodanovic, Data Analyst & Media Specialist
- Alison Myers, Research Analyst