VizIT, the edX dashboard for course visualizations
2.9K
You need a Google account with Editor access to a BigQuery project. The owner of the account must generate a service account.
Download the Google Credentials file:
Prepare a list of the courses to be processed (one course name a row) and put them into a file named courses.txt. To maintain and update the list of courses to generate dashboards for, without accessing the server, first create a Google spreadsheet, set it to view-only, then further give edit permissions to the relevant users. Place addcoursestogenerate.py at /yourdirectory and set a cronjob:
45 10 * * 2 cd /yourdirectory; /yourdirectory/python /yourdirectory/addcoursestogenerate.py
The relevant users can then add courses to the spreadsheet; the cronjob will take these courses and add them to courses.txt, which is used to generate dashboards. This way, users can specify new courses to generate dashboards for without having to edit courses.txt on the server.
Replace occurrences of "yourprojectname" in the .ipynb files with your BigQuery project name
Create an empty directory to host generated pages
mkdir vizit
docker run -it -v /PATH/TO/GOOGLE_CREDENTIALS:/home/jovyan/work/google.json -v /PATH/TO/courses.txt:/home/jovyan/work/courses.txt -v $(pwd)/vizit:/home/jovyan/work/results ubcctlt/vizit ./generate.sh
All the pages will be placed inside vizit directory.
Get in touch with edX for arranging data downloads for your institution
Set up credentials for data download here
Set up your passphrase to phrase.txt
Edit edx_weekly_course_data_download_import2BigQuery.sh and edx_download_dailyevents_moveto_BigQuery.sh to specify your directories, as appropriate
Clone the edx2bigquery repository and follow their instructions for installation
Maintain the list of courses for which you wish to upload events and course data in edx2bigquery_config.py from edx2bigquery
Set up cronjobs for uploading events daily, and course data weekly:
0 8 * * * source /yourdirectory/.bash_profile; /yourdirectory/edx_download_dailyevents_moveto_BigQuery.sh >> /yourdirectory/events.log 2>&1
0 11 * * 1 source /yourdirectory/.bash_profile; /yourdirectory/edx_weekly_course_data_download_import2BigQuery.sh >> /yourdirectory/courses.log 2>&1
55 10 * * 2 cd /yourdirectory/rawsqldir/; DIRECTORY=$(ls -td -- */ | head -n 1); ls $DIRECTORY | grep .xml.tar.gz > /yourdirectory/directory.txt
0 11 * * 2 cd /yourdirectory; /yourdirectory/python /yourdirectory/addcourses.py
Copy your Google Credential file into the repo directory and name it as google.json
Copy the course list courses.txt into the repo directory and name it as courses.txt. To maintain and update the list of courses to generate dashboards for, without accessing the server, first create a Google spreadsheet, set it to view-only, then further give edit permissions to the relevant users. Place addcoursestogenerate.py at /yourdirectory and set a cronjob:
45 10 * * 2 cd /yourdirectory; /yourdirectory/python /yourdirectory/addcoursestogenerate.py
The relevant users can then add courses to the spreadsheet; the cronjob will take these courses and add them to courses.txt, which is used to generate dashboards. This way, users can specify new courses to generate dashboards for without having to edit courses.txt on the server.
Update the ipynb files; replace occurrences of "yourprojectname" in the .ipynb files with your BigQuery project name
Run the following command to generate the pages:
docker run -it -v $(pwd):/home/jovyan/work yourdirectory/vizit ./generate.sh
The pages will be generated in the results/ directory
docker run -it -v $(pwd):/home/jovyan/work -e current_course=COURSE_NAME yourdirectory/vizit jupyter nbconvert --execute $current_course coursepage.ipynb --ExecutePreprocessor.kernel_name=python && mv coursepage.html results/$current_course.html
0 11 * * 2 cd /yourdirectory/vizit; docker run -v $(pwd):/home/jovyan/work yourdirectory/vizit ./generate.sh >> generatedashboards.log 2>&1
Set up a build system with a Git repository that will deploy to a public-facing website/URL
Edit deploy.sh to match your directories as appropriate
Set up a cronjob to periodically deploy generated dashboards pages:
0 14 * * 2 /bin/bash /yourdirectory/deploy.sh >> /yourdirectory/generatepushalledge.log 2>&1
Content type
Image
Digest
Size
650 MB
Last updated
about 9 years ago
docker pull ubcctlt/vizit