Skip to content

Instantly share code, notes, and snippets.

@IgnacioArregui
Created February 9, 2016 15:33
Show Gist options
  • Save IgnacioArregui/7cd08ff197bbb402775f to your computer and use it in GitHub Desktop.
Save IgnacioArregui/7cd08ff197bbb402775f to your computer and use it in GitHub Desktop.
Ejercicio Semana 3
Entidad Mes Fans Publicaciones LikesPorPub ComentPorPub CompartidoPorPub ReaccionesPorPub Reacciones Engagement
MedioCom1 1/01/2015 956.920 1097 1.269 78 76 1.424 1.562.128 0,149%
MedioCom1 1/02/2015 969.770 871 1.370 73 48 1.491 1.298.661 0,154%
MedioCom1 1/03/2015 959.188 916 1.475 90 77 1.642 1.504.072 0,171%
MedioCom1 1/04/2015 982.685 933 2.225 96 90 2.410 2.248.530 0,245%
MedioCom1 1/05/2015 1.019.576 934 2.127 128 129 2.384 2.226.656 0,234%
MedioCom1 1/06/2015 1.055.114 941 1.630 103 87 1.821 1.713.561 0,173%
MedioCom1 1/07/2015 1.101.658 1079 1.943 65 91 2.099 2.264.821 0,191%
MedioCom1 1/08/2015 1.128.924 1183 1.361 63 51 1.474 1.743.742 0,131%
MedioCom1 1/09/2015 1.157.403 1249 1.278 58 55 1.391 1.737.359 0,120%
MedioCom1 1/10/2015 1.181.630 1340 1.359 50 66 1.475 1.976.500 0,125%
MedioCom2 1/01/2015 3.024.783 573 3.955 166 149 4.270 2.446.710 0,141%
MedioCom2 1/02/2015 3.056.483 512 3.371 124 116 3.611 1.848.832 0,118%
MedioCom2 1/03/2015 3.016.244 588 3.792 158 136 4.086 2.402.568 0,135%
MedioCom2 1/04/2015 3.067.007 627 5.339 161 184 5.684 3.563.868 0,185%
MedioCom2 1/05/2015 3.145.635 634 5.828 242 286 6.355 4.029.070 0,202%
MedioCom2 1/06/2015 3.204.338 601 5.078 190 216 5.484 3.295.884 0,171%
MedioCom2 1/07/2015 3.280.856 605 6.978 229 355 7.562 4.575.010 0,230%
MedioCom2 1/08/2015 3.326.673 652 4.807 158 178 5.143 3.353.236 0,155%
MedioCom2 1/09/2015 3.374.059 704 4.446 154 173 4.773 3.360.192 0,141%
MedioCom2 1/10/2015 3.410.100 891 4.432 141 223 4.796 4.273.236 0,141%
MedioCom3 1/01/2015 2.427.190 818 6.191 173 123 6.488 5.307.184 0,267%
MedioCom3 1/02/2015 2.438.045 719 5.454 116 105 5.675 4.080.325 0,233%
MedioCom3 1/03/2015 2.407.142 824 5.857 108 134 6.099 5.025.576 0,253%
MedioCom3 1/04/2015 2.414.381 786 4.750 94 104 4.948 3.889.128 0,205%
MedioCom3 1/05/2015 2.446.960 850 7.709 119 251 8.079 6.867.150 0,330%
MedioCom3 1/06/2015 2.484.741 881 6.752 99 177 7.028 6.191.668 0,283%
MedioCom3 1/07/2015 2.545.323 914 5.957 98 159 6.214 5.679.596 0,244%
MedioCom3 1/08/2015 2.580.429 946 4.715 79 105 4.899 4.634.454 0,190%
MedioCom3 1/09/2015 2.610.800 880 3.863 81 94 4.037 3.552.560 0,155%
MedioCom3 1/10/2015 2.643.201 1046 3.438 67 105 3.610 3.776.060 0,137%
MedioCom4 1/01/2015 568.711 996 297 32 19 348 346.608 0,061%
MedioCom4 1/02/2015 570.155 797 326 22 19 367 292.499 0,064%
MedioCom4 1/03/2015 553.760 980 387 20 24 432 423.360 0,078%
MedioCom4 1/04/2015 554.969 1019 329 16 21 367 373.973 0,066%
MedioCom4 1/05/2015 562.129 886 600 24 46 670 593.620 0,119%
MedioCom4 1/06/2015 567.503 759 537 24 38 600 455.400 0,106%
MedioCom4 1/07/2015 569.998 607 487 23 30 540 327.780 0,095%
MedioCom4 1/08/2015 572.821 842 375 25 33 432 363.744 0,075%
MedioCom4 1/09/2015 574.653 845 334 24 34 392 331.240 0,068%
MedioCom4 1/10/2015 576.314 731 265 20 23 308 225.148 0,053%
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ejercicio Modulo 3</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400' rel='stylesheet' type='text/css'>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<style>
body {
background-color: #EEE
}
h3 {
font-family: 'Lato', sans-serif;
font-size: 20px;
}
svg {
background-color: transparent;
}
</style>
</head>
<body>
<h3>Gráfico de número de publicaciones en Facebook de 4 medios de comunicación durante 1 año</h3>
<svg width="600px" height="400px">
</svg>
<script>
d3.csv("EntidadesFacebook.csv", function(dataFromCSV) {
var items = d3.select("svg").selectAll("rect").data(dataFromCSV)
//ENTER
items.enter().append("rect")
.attr("x",10)
.attr("y",function(d,i) {
return i * 10
})
.attr("width",function(d) {
return d.Publicaciones / 2
})
.attr("height",8);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment