Skip to content

Instantly share code, notes, and snippets.

View helderdarocha's full-sized avatar

Helder da Rocha helderdarocha

View GitHub Profile
@helderdarocha
helderdarocha / .block
Last active May 30, 2016 02:41
Densities of worlds with diameter > 900km
height: 900
license: cc-by-sa-4.0
@helderdarocha
helderdarocha / .block
Last active May 30, 2016 02:35
Histogram: diameters of asteroids
height: 650
license: cc-by-sa-4.0
@helderdarocha
helderdarocha / .block
Last active May 30, 2016 02:25
Pie chart: planetary masses
height: 600
license: cc-by-sa-4.0
@helderdarocha
helderdarocha / cities.csv
Last active May 21, 2016 14:49 — forked from emeeks/cities.csv
Ch. 7, Fig. 20 - D3.js in Action
label population country x y
San Francisco 750000 USA 37 -122
Fresno 500000 USA 36 -119
Lahore 12500000 Pakistan 31 74
Karachi 13000000 Pakistan 24 67
Rome 2500000 Italy 41 12
Naples 1000000 Italy 40 14
Rio 12300000 Brazil -22 -43
Sao Paolo 12300000 Brazil -23 -46
@helderdarocha
helderdarocha / .block
Last active June 29, 2016 17:31
Examples using matrix transforms in SVG
height: 800
license: cc-by-sa-4.0
@helderdarocha
helderdarocha / .block
Last active August 22, 2017 21:38
Choropleth: % of births by C-section in São Paulo, Brazil
license: cc-by-sa-4.0
@helderdarocha
helderdarocha / .block
Last active June 11, 2016 11:59
Leaflet.draw and path simplification algorithm
height: 800
license: cc-by-sa-4.0
@helderdarocha
helderdarocha / .block
Last active June 28, 2016 18:35
Path simplification example with Leaflet
license: cc-by-sa-4.0
height: 550
const fs = require('fs');
const source = "../geo/ne_110m_admin_0_countries.json";
const target = "../geo/world.geojson";
fs.readFile(source, 'utf8', (err, json) => {
if(err) throw err;
else process(JSON.parse(json));
});
function process(data) { // filter id (iso-a3) and name of country