-
-
Save davo/4185759 to your computer and use it in GitHub Desktop.
Arbol para 50% / 2030
This file contains 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
{ | |
"name": "51%2030", | |
"children": [ | |
{ | |
"name": "Accesible", | |
"children": [ | |
{ | |
"name": "Estacionar bicicletas es caro", "size": 1 | |
}, | |
{ | |
"name": "Falta acceso a Bicicletas", "size": 3 | |
}, | |
{ | |
"name": "Falta acceso a Bicicletas Públicas", "size": 4 | |
}, | |
{ | |
"name": "Impuestos favorables a la movilidad motorizada", "size": 2 | |
}, | |
{ | |
"name": "Los insumos para Bicicletas no son accesibles", "size": 1 | |
}, | |
{ | |
"name": "No poder usar la bicicleta en viajes", "size": 1 | |
}, | |
{ | |
"name": "No puedo reparar mi Bicicleta fácilmente", "size": 2 | |
} | |
] | |
}, | |
{ | |
"name": "Atractivo", | |
"children": [ | |
{ | |
"name": "Falta cultura para combinar bicicleta y estilo personal", "size": 4 | |
}, | |
{ | |
"name": "Falta de infraestructura para bicicletas en el trabajo", "size": 4 | |
}, | |
{ | |
"name": "Me resulta difícil andar en Bicicleta", "size": 1 | |
}, | |
{ | |
"name": "No me resulta interesante la Bicicleta", "size": 1 | |
} | |
] | |
}, | |
{ | |
"name": "Eficiente", | |
"children": [ | |
{ | |
"name": "Bloqueo de Ciclovías", "size": 3 | |
}, | |
{ | |
"name": "Falta de integración de Bicicleta con otros Transportes", "size": 13 | |
}, | |
{ | |
"name": "Falta de legislación específica sobre Bicicletas", "size": 4 | |
}, | |
{ | |
"name": "Faltan Ciclovías", "size": 2 | |
}, | |
{ | |
"name": "Faltan estacionamientos de Bicicletas", "size": 15 | |
}, | |
{ | |
"name": "Las personas mayores tienen dificultades para moverse en bicicleta", "size": 1 | |
}, | |
{ | |
"name": "Mal estado de las ciclovías", "size": 2 | |
}, | |
{ | |
"name": "Mala integración de Bicicleta con otros Transportes", "size": 6 | |
}, | |
{ | |
"name": "No se cumple la legislación específica sobre Bicicletas", "size": 1 | |
} | |
] | |
}, | |
{ | |
"name": "Seguro", | |
"children": [ | |
{ | |
"name": "Bloqueo de Ciclovías", "size": 3 | |
}, | |
{ | |
"name": "Falta de convivencia entre peatones y ciclistas", "size": 2 | |
}, | |
{ | |
"name": "Falta de educación vial para ciclistas", "size": 8 | |
}, | |
{ | |
"name": "Falta de señalización en las ciclovías", "size": 1 | |
}, | |
{ | |
"name": "Faltan Ciclovías", "size": 6 | |
}, | |
{ | |
"name": "Inseguridad en las Ciclovías", "size": 2 | |
}, | |
{ | |
"name": "Sensación de inseguridad física", "size": 8 | |
} | |
] | |
} | |
] | |
} |
This file contains 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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.node circle { | |
fill: #fff; | |
stroke: steelblue; | |
stroke-width: 1.5px; | |
} | |
.node { | |
font: 10px sans-serif; | |
} | |
.link { | |
fill: none; | |
stroke: #ccc; | |
stroke-width: 1.5px; | |
} | |
</style> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
var diameter = 960; | |
var tree = d3.layout.tree() | |
.size([360, diameter / 2 - 120]) | |
.separation(function(a, b) { return (a.parent == b.parent ? 1 : 2) / a.depth; }); | |
var diagonal = d3.svg.diagonal.radial() | |
.projection(function(d) { return [d.y, d.x / 180 * Math.PI]; }); | |
var svg = d3.select("body").append("svg") | |
.attr("width", diameter) | |
.attr("height", diameter - 150) | |
.append("g") | |
.attr("transform", "translate(" + diameter / 2 + "," + diameter / 2 + ")"); | |
d3.json("flare.json", function(error, root) { | |
var nodes = tree.nodes(root), | |
links = tree.links(nodes); | |
var link = svg.selectAll(".link") | |
.data(links) | |
.enter().append("path") | |
.attr("class", "link") | |
.attr("d", diagonal); | |
var node = svg.selectAll(".node") | |
.data(nodes) | |
.enter().append("g") | |
.attr("class", "node") | |
.attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; }) | |
node.append("circle") | |
.attr("r", 4.5); | |
node.append("text") | |
.attr("dy", ".31em") | |
.attr("text-anchor", function(d) { return d.x < 180 ? "start" : "end"; }) | |
.attr("transform", function(d) { return d.x < 180 ? "translate(8)" : "rotate(180)translate(-8)"; }) | |
.text(function(d) { return d.name; }); | |
}); | |
d3.select(self.frameElement).style("height", diameter - 150 + "px"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment