Skip to content

Instantly share code, notes, and snippets.

@JoshAshby
JoshAshby / README.md
Last active December 20, 2015 07:09 — forked from jasondavies/README.md

Based on Mike Bostock’s [World Map][0], modified to automatically colour countries such that no adjacent countries share the same colour.

This is done by extracting the topology via [TopoJSON][1] and greedily picking colours until the constraint is fulfilled.

See also: [Graph coloring][2] on Wikipedia.

Update: Greedily colouring is now performed in a single line, thanks to Mike Bostock!

@JoshAshby
JoshAshby / gist:1164054
Created August 23, 2011 01:11 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job:
Student, quite boring really, and doesn't pay well...
Favorite Python project:
Inventory Management API
Favorite Conference:
Haven't sadly been able to go to one yet.
Python Experience Level: