Octolamp

[respository]

July 2025–present

Overview

Octolamp is a interactive data visualisation tool for United Kingdom local elections. It uses the OpenLayers JavaScript library in conjunction with the Office for National Statistics' GeoJSON data of local authority boundaries to render three vector maps of different tiers of UK local government authorities, which are then colored in using a JavaScript function that runs on the results data. The GeoJSON data uses different EPSG projections depending on when it was released, so I created a converter to handle this. A box in the top right shows a chart (via ChartJS) and a table with more information on the selected election result.

The results data visualised is made up of a series of JSON files. These are generated from datasets compiled by the House of Commons Library. The HOCL provides these datasets in the CSV format—I wrote a series of Python scripts to convert the data into the JSON that Octolamp uses.

Results for the following elections are viewable:

Views available:

Screenshot