Visualising electoral data again

Obviously with the results of the general election announced my mind turns to analysis and visualisation. I had/have been looking at this for a while, and here are my notes. Actually this is an index entry as much of what I had found is catalogued in the two related posts below/overleaf. …
The ONS offer tools visualising facts by constituency

  1. Visualising your constituency

I had another look at this in 2021. I have found the following links,

  1., an opening page at odileeds, mainly about why hexagons.
  2., they say, “This library assumes you have an existing hex layout as HexJSON (e.g. layouts we’ve made) and the ability to add Javascript to a webpage. The library creates an SVG (scalable vector graphic) of hexes – which can be styled via CSS – and some basic event callbacks.” This has a lot of example code, otherwise known by me as%CODE2%
  3. this is the 2019 GE with popups on the constituencies, %CODE3%
  4.  or how Leeds got there! They point at the hexmap of constituencies, and the code that does the 2015 and other results.
  5. claims to be a tool that generates the cartograms from HexJson. It does and works from a .csv spreadsheet.  I used this colour picker to get the colour hex codes.
  6. A document on HexJSON and how to write it.

So I made a hexmap, it’s not finished yet.

  1. I started from here, where they publish code that almost works. I found this via the ODI page documenting the javascript.
  2. I used this page to generate the hexmap in json.

I had to poke around the ODI pages to find the ODI.ready(function(){ rune, which I found inside the ODI javascript. They talk about a format function which I can’t quite get to work. Format is used if varying the SVG file, it uses tspan entity. I would like to offer a popup box rather than use this tool.

Related Posts

  1. Analysing the 2015 general election
  2. Visualising electoral data

The latter link has the following links,

  1. Election hex mapping, at ODI Leeds.
  2. 2017 General Election hex map, at ODI Leeds.

Comment ( 1 )

  1. Visualising Electoral Data |
    […] Visualising electoral data again […]

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.