Skip to content

FFTEduDatalab/absence-hexmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

absence-hexmap

Interactive hexmaps of secondary school absence data for England during the second wave of Covid-19, made using D3. View the visualisations here.

Screenshot

Screenshot

The visualisations take as input JSON files of pupil absence rates for state-funded schools in England on 15 October and 10 December 2020 (primary_absence.json, secondary_absence.json). The source of this data is ultimately Department for Education 'school attendance during coronavirus' statistics. The data files are combined with a hexJSON file describing the position of upper-tier local authorities in England (uk-upper-tier-local-authorities.hexjson).

The visualisation makes use of Oli Hawkins' d3-hexjson package. The hexJSON file is one of our own making - taking a file shared by ODI Leeds as a starting point, but making substantial revisions.

Compared to an earlier iteration (code), the code made available here:

  • draws a second map, displaying the change in attendance rate between two dates;
  • uses dropdowns to control which data is displayed on the maps (school phase; date);
  • moves the drawing of maps into functions*;
  • loads the webfont uses in the maps before the hexmaps are drawn, to fend off an issue with inconsistent legend spacing.

*This results in the hexJSON being loaded twice. There is a branch which also moves the loading of data into functions, which gets rid of this issue but which proved unreliable when used in production, for reasons that couldn't easily be ascertained.

The directory structure in this repository is simply to allow the files to be added to our content management system easily.