Last active
December 20, 2016 06:34
-
-
Save valegui/32aa515d39216834e5e1cac3f48ae7e6 to your computer and use it in GitHub Desktop.
Horas promedio diarias dedicadas a la ocupación y al traslado hacia la misma, por sexo y región
This file contains hidden or 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"> | |
<script src="//d3plus.org/js/d3.js"></script> | |
<script src="//d3plus.org/js/d3plus.js"></script> | |
<div id="viz"></div> | |
<script> | |
var data = [ | |
{ | |
"Sexo": "Hombre", | |
"Region": "Tarapacá", | |
"Tiempo": 3.9689 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Antofagasta", | |
"Tiempo": 3.7302 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Atacama", | |
"Tiempo": 3.2387 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Coquimbo", | |
"Tiempo": 2.9104 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Valparaíso", | |
"Tiempo": 3.5622 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Libertador General Bernardo O'Higgins", | |
"Tiempo": 3.8067 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Maule", | |
"Tiempo": 3.3292 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Bíobío", | |
"Tiempo": 2.9055 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "La Araucanía", | |
"Tiempo": 3.1875 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Los Lagos", | |
"Tiempo": 3.6565 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Aysén del General Carlos Ibáñez del Campo", | |
"Tiempo": 4.045 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Magallanes y de la Antártica Chilena", | |
"Tiempo": 3.5637 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Metropolitana de Santiago", | |
"Tiempo": 4.0631 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Los Ríos", | |
"Tiempo": 3.7342 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Arica y Parinacota", | |
"Tiempo": 4.3027 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Tarapacá", | |
"Tiempo": 2.4813 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Antofagasta", | |
"Tiempo": 2.1177 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Atacama", | |
"Tiempo": 2.0886 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Coquimbo", | |
"Tiempo": 1.7928 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Valparaíso", | |
"Tiempo": 2.2084 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Libertador General Bernardo O'Higgins", | |
"Tiempo": 2.0819 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Maule", | |
"Tiempo": 1.6904 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Bíobío", | |
"Tiempo": 1.9461 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "La Araucanía", | |
"Tiempo": 2.2656 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Los Lagos", | |
"Tiempo": 2.1289 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Aysén del General Carlos Ibáñez del Campo", | |
"Tiempo": 2.5172 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Magallanes y de la Antártica Chilena", | |
"Tiempo": 2.5506 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Metropolitana de Santiago", | |
"Tiempo": 2.5021 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Los Ríos", | |
"Tiempo": 1.8543 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Arica y Parinacota", | |
"Tiempo": 2.05 | |
} | |
] | |
var visualization = d3plus.viz() | |
.container("#viz") | |
.data(data) | |
.type("bar") | |
.color("Sexo") | |
.id("Sexo") | |
.legend({"size": 50, "labels": true, "data": false }) | |
.x("Region") | |
.y("Tiempo") | |
.title("Horas promedio diarias dedicadas a la ocupación y traslado, por sexo y región") | |
.draw() | |
</script> |
This file contains hidden or 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
[ | |
{ | |
"Sexo": "Hombre", | |
"Region": "Tarapacá", | |
"Tiempo": 3.9689 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Antofagasta", | |
"Tiempo": 3.7302 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Atacama", | |
"Tiempo": 3.2387 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Coquimbo", | |
"Tiempo": 2.9104 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Valparaíso", | |
"Tiempo": 3.5622 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Libertador General Bernardo O'Higgins", | |
"Tiempo": 3.8067 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Maule", | |
"Tiempo": 3.3292 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Bíobío", | |
"Tiempo": 2.9055 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "La Araucanía", | |
"Tiempo": 3.1875 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Los Lagos", | |
"Tiempo": 3.6565 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Aysén del General Carlos Ibáñez del Campo", | |
"Tiempo": 4.045 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Magallanes y de la Antártica Chilena", | |
"Tiempo": 3.5637 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Metropolitana de Santiago", | |
"Tiempo": 4.0631 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Los Ríos", | |
"Tiempo": 3.7342 | |
}, | |
{ | |
"Sexo": "Hombre", | |
"Region": "Arica y Parinacota", | |
"Tiempo": 4.3027 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Tarapacá", | |
"Tiempo": 2.4813 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Antofagasta", | |
"Tiempo": 2.1177 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Atacama", | |
"Tiempo": 2.0886 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Coquimbo", | |
"Tiempo": 1.7928 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Valparaíso", | |
"Tiempo": 2.2084 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Libertador General Bernardo O'Higgins", | |
"Tiempo": 2.0819 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Maule", | |
"Tiempo": 1.6904 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Bíobío", | |
"Tiempo": 1.9461 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "La Araucanía", | |
"Tiempo": 2.2656 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Los Lagos", | |
"Tiempo": 2.1289 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Aysén del General Carlos Ibáñez del Campo", | |
"Tiempo": 2.5172 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Magallanes y de la Antártica Chilena", | |
"Tiempo": 2.5506 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Metropolitana de Santiago", | |
"Tiempo": 2.5021 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Los Ríos", | |
"Tiempo": 1.8543 | |
}, | |
{ | |
"Sexo": "Mujer", | |
"Region": "Arica y Parinacota", | |
"Tiempo": 2.05 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment