Skip to content

Instantly share code, notes, and snippets.

@pachadotdev
Last active December 24, 2016 16:42
Show Gist options
  • Save pachadotdev/0e4f364730d86c57dd0c7950cd57c307 to your computer and use it in GitHub Desktop.
Save pachadotdev/0e4f364730d86c57dd0c7950cd57c307 to your computer and use it in GitHub Desktop.
Grupo 3 - Horas promedio de trabajo no remunerado por sexo
<!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 datos_trabajo_no_remunerado = [
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Antofagasta",
"trabajo": 302,
"tiempos": 958.2323,
"horasprom": 3.173
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Arica y Parinacota",
"trabajo": 83,
"tiempos": 162.942,
"horasprom": 1.9632
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Atacama",
"trabajo": 205,
"tiempos": 445.666,
"horasprom": 2.174
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Aysén del General Carlos Ibáñez del Campo",
"trabajo": 237,
"tiempos": 492.761,
"horasprom": 2.0792
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Bíobío",
"trabajo": 853,
"tiempos": 1903.4367,
"horasprom": 2.2315
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Coquimbo",
"trabajo": 409,
"tiempos": 902.951,
"horasprom": 2.2077
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "La Araucanía",
"trabajo": 571,
"tiempos": 1034.514,
"horasprom": 1.8118
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Libertador General Bernardo O'Higgins",
"trabajo": 601,
"tiempos": 1626.333,
"horasprom": 2.706
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Los Lagos",
"trabajo": 561,
"tiempos": 1509.549,
"horasprom": 2.6908
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Los Ríos",
"trabajo": 247,
"tiempos": 693.602,
"horasprom": 2.8081
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Magallanes y de la Antártica Chilena",
"trabajo": 145,
"tiempos": 258.106,
"horasprom": 1.78
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Maule",
"trabajo": 417,
"tiempos": 967.11,
"horasprom": 2.3192
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Metropolitana de Santiago",
"trabajo": 2118,
"tiempos": 4837.249,
"horasprom": 2.2839
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Tarapacá",
"trabajo": 226,
"tiempos": 455.523,
"horasprom": 2.0156
},
{
"c13_1_1": "Hombre","color": "#000080",
"region": "Valparaíso",
"trabajo": 872,
"tiempos": 2400.971,
"horasprom": 2.7534
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Antofagasta",
"trabajo": 471,
"tiempos": 2342.6503,
"horasprom": 4.9738
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Arica y Parinacota",
"trabajo": 190,
"tiempos": 976.267,
"horasprom": 5.1382
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Atacama",
"trabajo": 296,
"tiempos": 1348.214,
"horasprom": 4.5548
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Aysén del General Carlos Ibáñez del Campo",
"trabajo": 322,
"tiempos": 1301.269,
"horasprom": 4.0412
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Bíobío",
"trabajo": 1273,
"tiempos": 5607.0013,
"horasprom": 4.4046
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Coquimbo",
"trabajo": 647,
"tiempos": 2995.987,
"horasprom": 4.6306
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "La Araucanía",
"trabajo": 851,
"tiempos": 3586.9437,
"horasprom": 4.215
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Libertador General Bernardo O'Higgins",
"trabajo": 906,
"tiempos": 4746.668,
"horasprom": 5.2391
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Los Lagos",
"trabajo": 768,
"tiempos": 3193.794,
"horasprom": 4.1586
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Los Ríos",
"trabajo": 372,
"tiempos": 1853.893,
"horasprom": 4.9836
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Magallanes y de la Antártica Chilena",
"trabajo": 200,
"tiempos": 745.1747,
"horasprom": 3.7259
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Maule",
"trabajo": 742,
"tiempos": 3057.912,
"horasprom": 4.1212
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Metropolitana de Santiago",
"trabajo": 3187,
"tiempos": 14743.619,
"horasprom": 4.6262
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Tarapacá",
"trabajo": 284,
"tiempos": 1388.876,
"horasprom": 4.8904
},
{
"c13_1_1": "Mujer","color": "#800000",
"region": "Valparaíso",
"trabajo": 1212,
"tiempos": 6317.785,
"horasprom": 5.2127
}
]
var visualization = d3plus.viz()
.container("#viz")
.data(datos_trabajo_no_remunerado)
.type("bar")
.color("color")
.id("c13_1_1")
.legend({"size": 50, "labels": true, "data": false })
.x("region")
.y("horasprom")
.title("Horas promedio de trabajo no remunerado diarias")
.draw()
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment