Skip to content

Instantly share code, notes, and snippets.

@XavierGimenez
XavierGimenez / .block
Last active May 19, 2017 12:43 — forked from armollica/.block
Transcription collection from Inscription, distribution through time
height: 600
@XavierGimenez
XavierGimenez / README.md
Last active May 17, 2017 12:52
Network with multicategorical nodes

Force-directed graph where a set of qualifiers can be added each node. Useful for cases when the nodes of the network are multicategorical and this has to be represented somehow. Data is a subset of the character coappearence in Les Misérables.

Since the symbols used are external svgs the qualifier can be any visual. Regarding these external svg files some assumptions are made, such having a single 'g' acting as placeholder and having the content within the placeholder centereed around the 0,0 of the 'g' (As these svg are translated and scaled, it is important not to accumulate matrix transformations on the same element in order to achieve the desired effect).

Related bl.ocks

Mike Bostock's example for a force directed graph and Steve Haroz's example for a d3-force testing ground

@XavierGimenez
XavierGimenez / arc.js
Last active April 13, 2017 14:10
Flow lines with openlayers maps
'use strict';
var D2R = Math.PI / 180;
var R2D = 180 / Math.PI;
var Coord = function(lon,lat) {
this.lon = lon;
this.lat = lat;
this.x = D2R * lon;
this.y = D2R * lat;
@XavierGimenez
XavierGimenez / data.csv
Last active February 17, 2020 03:00
Waffle Chart
age population
<10 2704659
10-20 4499890
21-30 2159981
31-40 3853788
41-50 14106543
51-60 8819342
61-70 612463
71-80 144320
81-90 3730220