hoping to do a series of vis with the uk grid data from gridwatch.templar.co.uk inspiration from http://energia.ningunaparte.net/en/ and http://bl.ocks.org/emeeks/b57f4cc89dacd38fcdcd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| script to parse the project gutenberg's rdf catalog into python dict | |
| with option to save to json | |
| most of it from https://gist.github.com/andreasvc/b3b4189120d84dec8857, | |
| tweaked to work with python 3 AND also using lists rather than sets so it is all easily json serialisable | |
| """ | |
| import os | |
| import re |
Work in progress towards making a hexgrid map of the uk --- draw the counties, then assign a circle to each of counties, then use force layout with collision detection to force the circles not to collide
Also draw a hexagon grid, then after force layout has finished, assinged te hexagons closest to the circle to be blue
Add in function so when you click on a colored hexagon, you are 'moving' that to a new position when you click on uncolored hexagon
collision code adapted form http://bl.ocks.org/mbostock/1804919, inspired by https://github.com/kristw/gridmap-layout-thailand
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Useful stuff for axes | |
| */ | |
| /** | |
| * after drawing the axis, check the label sizes and return the max height and width so you can resize the margins | |
| * if you need to | |
| * @param labelSelArr e.g. d3.selectAll('.y.axis .tick') | |
| */ | |
| function checkLabelSizes(labelSelArr) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node_modules |
Built with blockbuilder.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"id":"4133764903","type":"WatchEvent","actor":{"id":1307603,"login":"akzaidi","display_login":"akzaidi","gravatar_id":"","url":"https://api.github.com/users/akzaidi","avatar_url":"https://avatars.githubusercontent.com/u/1307603?"},"repo":{"id":943149,"name":"d3/d3","url":"https://api.github.com/repos/d3/d3"},"payload":{"action":"started"},"public":true,"created_at":"2016-06-11T18:04:40Z","org":{"id":1562726,"login":"d3","gravatar_id":"","url":"https://api.github.com/orgs/d3","avatar_url":"https://avatars.githubusercontent.com/u/1562726?"}},{"id":"4133691247","type":"WatchEvent","actor":{"id":1904614,"login":"shingchi","display_login":"shingchi","gravatar_id":"","url":"https://api.github.com/users/shingchi","avatar_url":"https://avatars.githubusercontent.com/u/1904614?"},"repo":{"id":943149,"name":"d3/d3","url":"https://api.github.com/repos/d3/d3"},"payload":{"action":"started"},"public":true,"created_at":"2016-06-11T17:03:36Z","org":{"id":1562726,"login":"d3","gravatar_id":"","url":"https://api.github.com/o |
Built with blockbuilder.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: mit |