Notes
Loading data
You can either read in an existing HexJSON file or start creating your own hex cartogram from a CSV file. These can either be loaded from a URL or from a local file. No data will be sent to our server; it all stays in this page. If you are using a URL it will need to be publicly accessible and CORS will need to be enabled on the remote server (otherwise this page isn't allowed to access the data).
The CSV should contain a column with the heading id that uniquely identifies each hexagon. Other columns will be added as properties of each hexagon. You can specify the position of the hexagon using the column headings q and r (they must be separate columns). A column with the heading n or name will set the displayed name of the hexagon. You can choose to manually set the colour of each hexagon by including a column headed colour.
Colouring hexagons
Hexagons can be coloured by a data attribute using one of our defined colour scales. For instance, if your CSV file contains a column titled Population you could choose this attribute and set the colour scale to Viridis8.
When building a hexagon layout you may want to set default colours for hexagons. If you have one or more hexagons selected you can choose to change their default colour by using the colour picker tool that appears in the top right of the screen. Note that custom colours set using this method will not be available in sharing links and are only retained in exported versions.
Moving hexagons
To move one or more hexagons you must first select them then click in an empty hex in the grid. Pressing c on your keyboard will select all hexagons of the same colour or you can use the Select by colour in the colour picker at the top right. When you have everything where you want it, save the output. Note that this tool is for creating layouts rather than fully interactive visualisations.
Using existing layouts
We already know about defined hex layouts for UK local authorities, UK Parliamentary constituencies, UK NUTS3 regions, UK Upper Tier Local Authorities, MSOAs, NHS Integrated Care Boards, and US States. If you have a CSV that appears to have a column with codes for one of those, the Builder will try to load an existing hex map layout for you and add the data to that. That means you can use this tool as a simple visualisation tool for CSV files on the web too. For instance, there is a CSV of US State data on Github which has state 2-letter codes so we can load it straight into the Builder and show US States coloured by admission number. You can build your own links to this tool of the form:
https://open-innovations.org/projects/hexmaps/builder.html?https://raw.githubusercontent.com/odileeds/covid-19/main/vaccines/data/vaccinations-MSOA-latest.csv&attribute=admission_number&colourscale=Viridis&labels=false&keepmissing=false
where you can replace https://raw.githubusercontent.com/odileeds/covid-19/main/vaccines/data/vaccinations-MSOA-latest.csv with the URL of a CSV file and you can add the following properties:
attribute= is the column heading for the column to use for the colour scale - we can cope with numeric valus and ISO8601 dates
borders= can be set to true or false to turn the hex borders on or off
colourscale= is one of our named colour scales ()
labels= can be set to true or false to turn the hex labels on or off - turning them off can speed up rendering time for big maps
keepmissing= can be set to true or false to show or not show hexes that aren't referred to in the data
Using data in a Google Sheet
If you have data in a publicly-visible Google Sheet you can add the parameter gsheetid=1hqFqAyRp7JfHu7jmZK-tBtiU89B28rgfTKHofK16PMw (replace 1hqFqAyRp7JfHu7jmZK-tBtiU89B28rgfTKHofK16PMw with your Sheet ID) to the URL and the Builder will attempt to use your Google Sheet e.g. load a simple Google Sheet, hide hex labels, and remove hex borders.
https://open-innovations.org/projects/hexmaps/builder.html?gsheetid=1hqFqAyRp7JfHu7jmZK-tBtiU89B28rgfTKHofK16PMw&attribute=Date&labels=false&borders=false
Warning: there are several things that might stop this working because it relies on this page being able to see your Google Sheet and for it to be very straightforward. If your sheet is protected or complicated, this is likely to fail.
Exporting the map
You can export the map in four ways:
- HexJSON. This is the prefered output as it can be loaded back in to this tool again.
- SVG. This will save the image created in the browser. If you output as SVG you won't be able to load it back into this tool.
- GeoJSON. A cartogram is not geographic but some people have requested "geographic formats" so they can use these hex cartograms with specific GIS software. To make it "geographic" we've done a very simple projection at Null Island (0°, 0°) keeping the result to approximately 0.1°×0.1° to try to reduce distortions. If you output as GeoJSON you won't be able to load it back into this tool.
- PNG. This will save the map (without the grid) as an image that you can use elsewhere. You won't be able to load it back into this tool but it is useful for screenshots.
Linking to a view
If your CSV file exists at an accessible URL, it may be possible to create a link to a view with your data and selections. However, if you are using a local file you won't be able to do that because the data is not uploaded anywhere. If you are using a local file and want to show a hex cartogram to others you will have to export the map in order to share it via other means.
Credits
© 2017-24
Open Innovations. Released under an MIT license.
Source on Github.