Skip to content

Instantly share code, notes, and snippets.

View espetro's full-sized avatar
🐴

Quino Terrasa espetro

🐴
View GitHub Profile
@espetro
espetro / bubblechart_es6.js
Last active May 4, 2017 21:30
D3 challenge month: week 1, day 2 - Reusable charts + ES6
const bubbleChart = () => {
let margin = { top: 40, right: 30, bottom: 40, left: 30},
width = 960 - margin.right - margin.left,
height = 960 - margin.top - margin.bottom,
colorCategory = "category",
colRadius = "views";
// # MODIFIES THE selection GIVEN BY .call()
const chart = selection => {
@espetro
espetro / index.html
Last active April 27, 2017 21:15
D3 challenge month: week 1, day 1
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
.bar {
fill: grey;
}
.bar:hover {
@espetro
espetro / index.html
Last active March 30, 2017 22:41
Percentage of total load per total weight in a public transport vehicle in Brasil (2016)
<!DOCTYPE html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v2.0.0.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<img src="https://i.imgur.com/UMeohYH.jpg" alt="Total load / total weight percentage; transport types in Brasil" height="500" width = "500">
</body>