Skip to content

Instantly share code, notes, and snippets.

@RichardMN
RichardMN / LatheMesh
Created February 17, 2013 19:35
LatheMesh - a factory class for creating rotated solids in Codea.
--# LatheMesh
-- LatheMesh
-- A factory class for creating solids based on rotating an outline series of points around
-- an axis.
-- Richard Martin-Nielsen, 2013
LatheMesh = class()
-- LatheMesh
@RichardMN
RichardMN / README.md
Last active October 19, 2015 13:23
Electoral Cartogram for Canada

This is a development version of an electoral cartogram for Canada using a hexagon grid, with one hexagon for each of the 338 ridings in Canada at the 2015 general election.

Code based on Stephen McMurtry's excellent interactive map and riding-by-riding predictions by Eric Grenier's threehundredeight.com.

I was inspired to try making an electoral cartogram by Luke Andrews' square-based electoral cartogram for the 2011 election. When all the votes are counted, each MP from a small urban riding will have the same vote in parliament as an MP from geographically vast ridings, and a cartogram which gives each riding equal area helps present this.

@RichardMN
RichardMN / README.md
Last active October 21, 2015 05:11
Electoral Cartogram of Preliminary Results of the 42nd Canadian General Election

This is an electoral cartogram for Canada using a hexagon grid, with one hexagon for each of the 338 ridings in Canada at the 2015 general election, modified to show the preliminary results.

The code based on Stephen McMurtry's excellent interactive map, with major changes so that it now uses data from Elections Canada instead of the projections from Eric Grenier's three-hundred-eight website.

I was inspired to try making an electoral cartogram by Luke Andrews' square-based electoral cartogram for the 2011 election. When all the votes are counted, each MP from a small urban riding will have the same vote in parliament as an MP from geographically vast ridings, and a cartogram which gives each riding equal area helps present this.