UofA GPA Calculator

An easy to use GPA calculator for UofA students

demo code

What is it?

UofA GPA calculator is a small pet project of mine that allows you to copy-paste the contents of your transcript page into a text box, and get an analysis of your GPA as it has evolved over your university experience. This includes a graph of your GPA, which includes the GPA you received each semester, and a running cumulative GPA based on all of your previous semesters.

Why build it?

2 years ago I was trying to calculate my GPA to put on my resume for my first internship job search. I was about to start doing it by hand when I suddenly remembered that I know how to automate things exactly like this. So I built a python script to scrape and analyze my transcript text and spit out a cumulative GPA for me. The code to that can be found HERE. This worked well for me, and I had no incentive to improve it for a while. Since then, I've spent the past year learning web development technologies. This blog for example is built with Next.js and React. So as a small pet project to inaugurate having a new personal website, I decided to rebuild my python script with typescript and some nice graphs.

How did I build it?

The tech stack I used to build this project is:

  • TypeScript
  • React
  • Tailwind CSS
  • chart.js

I built out a form where users can either input text into a text area, or they can select a pdf that contains the transcript information. I use react-dropzone to enable file processing file dragging and dropping. If a user drops a file, I use react-pdf to process the file on the front end and extract text from it. This was such a difficult task (for some reason) that I have decided to make a write-up explaining how to do so in a Next.js project, as I did not find many good resources that actually went over this. Either way, I convert the input to a newline-separated string at the end of the day, which I feed through my processing pipeline to get all of the class info and GPA info. Once this is all processed, the UI toggles to a results page where stats and information about your GPA are displayed.

Challenges and improvements:

I can see several improvements to this project, as the way that I calculate GPA is very generic and does not encompass the way that graduating GPA's are calculated for most students at the University of Alberta. For example, the engineering graduating average (EGA) is calculated based on the semesters required to reach at least 70 credits. This is different compared to how ALES calculates its graduating average, where 60 credits are required, and if a semester does not fill those 60 credits fully, but the next one does, the average of the previous semester is used in the calculation with the weight of the remaining credits to reach a total of 60. Other faculties do even stranger things. I can see the utility in going over each one and adding a dropdown to let you choose which one you are and calculate your graduating GPA accordingly, but this would probably be a lot of work. I might get around to it someday.