Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
css
 
 
 
 
 
 
img
 
 
inc
 
 
js
 
 
py
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

📈 GCSE and A-Level results day analysis

Code powering GCSE and A-Level results analysis from FFT Education Datalab and the Nuffield Foundation, as featured on our results microsite.

For background to the project, refer to the About page of the results microsite.

Contents

  • py: Six Python files, details of which are provided below
  • data: Data files on which the site is based:
    • source: Excel files (.xls, .xlsx) of entry and grades data for the period published by the Joint Council for Qualifications. Filenames take the form <level>_<year>_<scope>_<grades (GCSE only)>. Here scope refers to the breakdowns by home nation (UK, EN, WA, NI), age of entrant (GCSE only; 15, 16, 17) or home nation and age (GCSE only; EN16 only). grades refers to whether datafiles are in terms of A*-G grades (ag), or the key grades at which the 9-1 grade structure and the A*-G grade structure are pegged (keygrades).
    • output:
      • a-level:
        • <level>-entries.json: Compiled entries data produced by data_compiler.py, based on the source data files
        • <level>-grades.json: Compiled grades data produced by data_compiler.py, based on the source data files
        • <level>-subjects.json: A bespoke dataset produced by Datalab, giving subject definitions, flags for whether a subject is an English Baccalaureate subject, is double-counted in Progress 8, or is a facilitating subject, reform dates, and contextual information.
        • <level>-text.json: A data file written by the analysis_writer.py script, it provides analysis of entry numbers and grades for each subject.
      • as-level:
        • as per a-level
      • gcse:
        • as per a-level
      • popn:
  • templates: template files for subject-level php pages and level sub-pages
  • a-level, as-level, gcse: subject-level php pages, generated by template_copier.py
  • a-level.php, as-level.php, gcse.php: level sub-pages
  • css, img, inc, js, together with various individual home directory files: web files

Data files are shaped in the format required for use in Highcharts charts.

Python scripts

subjects_checker: Checks completeness in both directions between source files and -subjects.json files.

data_compiler: Compiles -entries.json and -grades.json files, with data for all subjects in -subjects.json files.

analysis_writer: Writes analysis to -text.json files for all subjects in -subjects.json files with at least one year of entry data. Blank for those with none.

extract_generator: Generates a number of bespoke data extracts from the -entries.json and -grades.json files.

versioning_updater: Appends a query string to links to .php, .js, .json .css project files in all .php and .js files, so that cached versions of these files aren't loaded once they are updated.

template_copier: Produces a .php page for each of the three levels (GCSE, A-Level, AS-Level) and each subject in subjects.json, based on the template files in the templates folder.

Instructions

  1. Bring in and rename any new source data files, following the naming convention <level>_<year>_<scope>_<grades (GCSE only)>
  2. subjects_checker.py
    1. Update target-year in script (most recent year for which data is available)
    2. Run
    3. (If required) Update -subject.json files
    4. (If required) Re-run
  3. Run data_compiler.py
  4. analysis_writer.py
    1. Update min-year in script to match the start year used in charts
    2. Run
  5. (If required) Run extract_generator.py
  6. versioning_updater.py
    1. Run
    2. Check output

template_copier.py almost certainly won't need running on results day - it only needs running after design tweaks to subject pages.

Producing bespoke charts

The microsite has the ability to produce two types of bespoke chart. In both cases, only entries charts can be produced, not grade breakdown charts.

Subject comparison

This allows comparison of entry trends in multiple subjects.

The URL used is of the form:

Up to seven subjects can be displayed before series colours repeat.

Country/age comparison

This allows comparison of entry trends in a single subject by the different country and age breakdowns for which we have data.

The URL used is of one of the following forms:

Small multiples

This allows comparison of entry trends in multiple subjects in a panel of charts.

The URL used is of one of the form:

Only a single option can be specified, where this functionality is used.

Licence

About

📈 Code powering GCSE and A-Level results analysis from FFT Education Datalab and the Nuffield Foundation

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.