This repository contains a sample code of how to calculate attainment 8 scores using the Python pandas library (progress 8 calculations will be added later). The code is to give you an idea of how pandas can be used to calculate progress 8 scores.
You are free to modify and use the code for your own use in a not for profit setting.
Note that you are strongly recommended to double check your attainment 8 output excel files is outputting the correct attainment 8 scores for each pupil and cannot be held responsible if there are any issues with the code.
Already I know that there are some things I can do to make the code cleaner and hope to make improvements to the code over time (see features to be added/modifications to be made section below). Therefore, any suggestions to the code will be greatly appreciated. If you have any queries about how the code works, please feel free to contact me.
The following excel files are included in the repository in order to calculate attainment 8
- Discount Codes - Contains the list of all the discount codes by the DfE from 2014 - 2021. This file is used to check whether a student has qualifications that discount against each other. The original DfE file can be found here.
- EBacc Quals - Contains the list of all the qualifications that counts for EBacc. This is used to determine which qualifications count in the Maths, English and EBacc slots. Can also be used to calculate the EBacc average points score. The original DfE file can be found here
- Performance Points - Contains the list of all the qualifications that count in the performance tables, all the possible grades and the equivalent points. This is used to get the equivalent points of all the grades a student has achieved. The original DfE file can be found here.
In order for the code to fully work as is, you need to make sure that you follow the below rules:
- The students' grade is in the same folder as the code
- The students' grade is in an excel file that follows the same format as the School1 Results and School2 Results excel file and is an xlsx file
- The students' grade file has the word Results at the end of the file name
- The grading used on the Results file MUST match the grading used in the DfE performance points file. For example having a grade D*2 instead of *2 would not be picked up as the DfE performance points file uses *2. If you have a situation where the grades do not match what is in the DfE performance points file you will need to add some extra code that addresses such situations.
Note that if you want to do things differently that you are free to modify the code
At the moment the code is stored in a single ipynb file which can be opened and run using jupyter notebook which is part of Anaconda. Over time I am hoping move it to a .py file and separate out the code into multiple files.
Instructions on how to download the code and the files in the repository (i.e clone the repository) can be found here
I am planning to add the following features or/and make the following modifications at a future date:
- Calculate overall progress 8
- Deal with pupils who are doing the FSMQ qualification
- Calculate EBacc average point score
- Move the code to a python file
- Separate out the code into functions
- Separate out the code into classes
- Read the excel file from the DfE directly from the DfE website