This blog post combines/builds on two earlier posts: One where I looked at using Google Colab to host Jupyter notebooks for my autumn teaching, and one where I messed around with a Jupyter notebook that can generate a university league table with almost any university at the top. I have tidied up the league table generating Jupyter notebook and you should now be able to see it on Google Colab here and the spreadsheet it needs with the University data is available here.

So you too can run the Jupyter notebook, with the university of your choice selected, and with a bit of luck (optimisation is bit of a simple and dirty solution, so its not perfect sorry) get your own league table with your university at the top.

Google Colab seems to work OK. If you want to run it should be pretty easy to do, but you will need a Google account, and it should go into a Colab Notebooks folder, along with the xlsx which contains the nine numbers for the universities. These nine numbers are supposed to be related to how good a university is (they are things like NSS student satisfaction, A-level grades of the students, money spent per student, ..), and so *The Guardian* league tables are based on multiplying each of these nine numbers by some weight they have plucked out of air. The notebook just varies these weights via simulated annealing to try and push the university of your choice to the top of the league table.

Colab makes it pretty easy to run notebooks that need files, you need the lines:

from google.colab import drive

drive.mount(‘/content/drive/’)

and then so long as you have the xlsx in your Google Drvie then point the Jupyter notebook to the right file with the right path, the notebook should read it in fine. And the rest of the notebook runs 100% as normal.

Just let me know if it doesn’t work. Otherwise, I hope you find it mildly amusing to be able to construct league tables at will.

### Like this:

Like Loading...

*Related*