Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠

Davo Galavotti davo

🏠
View GitHub Profile
@davo
davo / estaciones.csv
Created Nov 19, 2012
Public Bicycles
View estaciones.csv
name latitude longitude population color
Aduana -34.611365 -58.369077 0 #C4C4C4
Cmd -34.654286 -58.380429 0 #BABABA
Congreso -34.609829 -58.389289 0 #7F7F7F
Derecho -34.583669 -58.391243 0 #DEDEDE
Independencia -34.617908 -58.380470 0 #BEBEBE
Obelisco -34.606297 -58.381051 0 #556270
Once -34.609475 -58.407615 0 #DCDCDC
Pacifico -34.577468 -58.426158 0 #454545
Parque Las Heras -34.585030 -58.407637 0 #858585
@davo
davo / data.tsv
Created Nov 23, 2012 — forked from mbostock/.block
Multi-Series Line Chart
View data.tsv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 5. in line 1.
Indicators Government Companies Total Difference Ratio Number of individual payments
87,658 43,160 131,488 44,498 0.4
@davo
davo / flare.json
Created Dec 1, 2012 — forked from mbostock/.block
Arbol para 50% / 2030
View flare.json
{
"name": "51%2030",
"children": [
{
"name": "Accesible",
"children": [
{
"name": "Estacionar bicicletas es caro", "size": 1
},
{
View d3.layout.js
(function(){d3.layout = {};
// Implements hierarchical edge bundling using Holten's algorithm. For each
// input link, a path is computed that travels through the tree, up the parent
// hierarchy to the least common ancestor, and then back down to the destination
// node. Each path is simply an array of nodes.
d3.layout.bundle = function() {
return function(links) {
var paths = [],
i = -1,
n = links.length;
@davo
davo / blob.svg
Created Dec 2, 2012
Las 4 claves
View blob.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davo
davo / README.md
Created Dec 6, 2012 — forked from mbostock/.block
Stacked-to-Grouped Transition
View README.md

Switch between stacked and grouped layouts using sequenced transitions! Animations preserve object constancy and allow the user to follow the data across views. Animation design by Heer and Robertson. Colors and data generation inspired by Byron and Wattenberg.

View README.md

The tick format provided by d3.time.scale is a multi-scale tick format, meaning that it formats times differently depending on the time. For example, the start of February is formatted as "February", while February second is formatted as "Feb 2". The format is implemented using an array of time formats, each with an associated filter. The first filter that returns true is used. (In the implementation below, the formats are processed in reverse order.) You can create your own custom multi-scale time format using the same technique with only a few lines of code.