Built with blockbuilder.org
| [{"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 |
| node_modules |
| /** | |
| * 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) { |
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
| # -*- 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 |
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
| InputID | TargetID | Distance | Distance(m) | |
|---|---|---|---|---|
| ChIJZf2Jlc4EdkgRqIM-ef2y6es | ChIJXTn0yM4EdkgRSaV_zGoczWw | 0.000414318 | 33.14544047 | |
| ChIJM1ObHN8EdkgRx1AtnTH31qI | ChIJn02Ng9sEdkgRxFrkfZDwJO0 | 0.00081524 | 65.21917804 | |
| ChIJX55_pLEEdkgR4Tb2RgSm3tM | ChIJJz_dQcoEdkgRGJNfDHFSARc | 0.005485031 | 438.8024655 | |
| ChIJhUvcPtwEdkgRT_ZdtjwD7vA | ChIJ9xPWINwEdkgRm21aBvx6c4I | 0.001029683 | 82.37464658 | |
| ChIJAZyKwNYEdkgRF6IBLG_KdzY | ChIJkQ6vidYEdkgR3l8oTFFaHOc | 0.001613939 | 129.1151129 | |
| ChIJ78268CsbdkgRhoDFQqqxaaU | ChIJLbaLZNEEdkgRkdhk1IC66dM | 0.001272168 | 101.7734658 | |
| ChIJZ3p4J8gEdkgRpw9Xd1bY1VE | ChIJJz_dQcoEdkgRGJNfDHFSARc | 0.005201036 | 416.0828961 | |
| ChIJIUh4NRwQdkgRCiO3lEld7k4 | ChIJW3HUgvsPdkgRHVK8WIOke1s | 0.01162429 | 929.9432284 | |
| ChIJFZgdDpQPdkgRMEpKpZm8OCs | ChIJh2hxb8IPdkgR9eNM6VlzhRw | 0.013065664 | 1045.253151 |
Reusuable linechart component in ES6 based on http://bost.ocks.org/mike/chart/time-series-chart.js, but with check for whether it is a single series or a multiseries
Use like :
let lineplot = linechart.lineplot()
.width(chartWidth).height(chartHeight)
.datapointRadius(5)
.x(d => +d.key)
| { | |
| "name": "app", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "repository": { | |
| "type": "git", |