Slide 1

Slide 1 text

Extreme Data Visualisation with d3.js @makoto_inoue Data Visualisation as an Interface

Slide 2

Slide 2 text

@makoto_inoue • Extremist Programmer

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

@makoto_inoue • benkyoplayer.com • Extremist Programmer

Slide 7

Slide 7 text

@makoto_inoue • benkyoplayer.com • London d3.js meetup • Extremist Programmer

Slide 8

Slide 8 text

Topics • From BaconTo Benkyo • What is (Extreme) Data Visualisation? • Extreme Data Visualisation with d3.js

Slide 9

Slide 9 text

The Danger Level of this talk • Cat • Comic Sans • Nudity

Slide 10

Slide 10 text

2013 2012 From Bacon to Benkyo

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Analysing Olympic Medal Rivalry @makoto_inoue @mmxiihack Best Hidden talks == Lightning talks

Slide 14

Slide 14 text

Analysing Olympic Medal Rivalry @makoto_inoue @mmxiihack

Slide 15

Slide 15 text

Question Are you looking forward to Olympics?

Slide 16

Slide 16 text

Meh...

Slide 17

Slide 17 text

Do you want to hack ? YES

Slide 18

Slide 18 text

Wait, can you use the word "Olympics"?

Slide 19

Slide 19 text

Branding Policy Expressions likely to be considered a breach of the rules would include any two of the following list: "Games, Two Thousand and Twelve, 2012, Twenty-Twelve". http://bit.ly/HRyNGS

Slide 20

Slide 20 text

Branding Policy Using one of those words with London, medals, sponsors, summer, gold, silver or bronze is another likely breach.

Slide 21

Slide 21 text

BAKERS BANNED FROM ICING CAKES WITH OLYMPIC LOGO BECAUSE OF COPY RIGHTS!! - Daily Mail - http://www.dailymail.co.uk/news/article-2037418/London-2012-Olympics-Copyright-laws-ban-bakers-icing-cakes-logo.html

Slide 22

Slide 22 text

Solution London 2012 ɹ

Slide 23

Slide 23 text

Solution London 2012 Londinium MMXII http://www.guardian.co.uk/commentisfree/2012/apr/17/london-2012-londinium-mmxii-olympics

Slide 24

Slide 24 text

MMXII Hackathon (28th~29th July)

Slide 25

Slide 25 text

MMXII Hackathon (28th~29th July)

Slide 26

Slide 26 text

A Result =The live image wall

Slide 27

Slide 27 text

AS THE GAME GOT UNDERWAY, DEVELOPERS TOOK PART IN THE FIRST OLYMPIC HACKDAY - Guardian Data Blog http://www.guardian.co.uk/commentisfree/2012/aug/03/london-2012-olympics-open-data

Slide 28

Slide 28 text

SO, IS THE FIRST OPEN DATA OLYMPICS? NOT THIS TIME - Guardian Data Blog

Slide 29

Slide 29 text

SO, IS THE FIRST OPEN DATA OLYMPICS? NOT THIS TIME - Guardian Data Blog Where is Data?

Slide 30

Slide 30 text

I am the Extremist Programmer!!

Slide 31

Slide 31 text

Hack for Data

Slide 32

Slide 32 text

Minute by Minute Event Data

Slide 33

Slide 33 text

Minute by Minute Event Data Where is Data?

Slide 34

Slide 34 text

I am the Extremist Programmer!!

Slide 35

Slide 35 text

Premier League -13 May 2012

Slide 36

Slide 36 text

Posessed!! (Visualisation of the ball possession) http://makoto.github.com/possessed/

Slide 37

Slide 37 text

FLIP!!

Slide 38

Slide 38 text

Posessed!! (Visualisation of the ball possession)

Slide 39

Slide 39 text

http://makoto.github.com/possessed/ Possessed!!

Slide 40

Slide 40 text

Data Driven Player(DDP) http://makoto.github.com/possessed/ I Like it!!

Slide 41

Slide 41 text

I am the Extremist Programmer!!

Slide 42

Slide 42 text

Tri-Hackathon 2012 Sep 2012 Oct 2012 Nov

Slide 43

Slide 43 text

DDP ♥ Show Biz

Slide 44

Slide 44 text

DDP ♥ Show Biz 82

Slide 45

Slide 45 text

♥ OSMN.pl http://osmn.herokuapp.com/

Slide 46

Slide 46 text

♥ OSMN.pl http://osmn.herokuapp.com/

Slide 47

Slide 47 text

DDP ♥ Online Study Transcripts are embedded in videos

Slide 48

Slide 48 text

Transcripts are embedded in videos ♥ Benkyo Player

Slide 49

Slide 49 text

♥ Benkyo Player http://bit.ly/benkyo_player

Slide 50

Slide 50 text

What did we learn so far?

Slide 51

Slide 51 text

If there is no data...

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

What is (Extreme) Data Visualisation?

Slide 54

Slide 54 text

I don’t know, but.....

Slide 55

Slide 55 text

I am the Extremist Programmer!!

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

Bambinos

Slide 58

Slide 58 text

Bambinos

Slide 59

Slide 59 text

Something not right

Slide 60

Slide 60 text

Something not right

Slide 61

Slide 61 text

My Teacher says... Draw Shape Not Object

Slide 62

Slide 62 text

Traditional Data Visualisation = Objects(barchart/piechart)

Slide 63

Slide 63 text

Extreme Data Visualisation = Many different shapes

Slide 64

Slide 64 text

Extreme Data Visualisation = Many different shapes

Slide 65

Slide 65 text

Extreme Data Visualisation = Many different shapes

Slide 66

Slide 66 text

Extreme Data Visualisation = Many different shapes

Slide 67

Slide 67 text

Isn’t this just a table? TimeTeamPlayer 90:00 90:30 91:00 Yes

Slide 68

Slide 68 text

What about this?
  •  
  •  
  •  
It’s a list

Slide 69

Slide 69 text

What about this? It’s svg

Slide 70

Slide 70 text

Different Medium Different Character

Slide 71

Slide 71 text

Wrong observation and transformation Lack of Skills

Slide 72

Slide 72 text

  •  
  •  
  •  
Right Scale

Slide 73

Slide 73 text

Appropriate Colour

Slide 74

Slide 74 text

What did we learn so far? • Shapes, not Objects • Different medium => Character • Wrong Transformation => Lack of Skill

Slide 75

Slide 75 text

Extreme Data Visualisation with d3.js

Slide 76

Slide 76 text

What is d3.js ?

Slide 77

Slide 77 text

What is d3.js ?

Slide 78

Slide 78 text

What is d3.js ? D3 is not a new graphical representation.

Slide 79

Slide 79 text

What is d3.js ? D3.js is a JavaScript library for manipulating documents based on data.

Slide 80

Slide 80 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Transforming Data with d3.js

Slide 81

Slide 81 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Selector

Slide 82

Slide 82 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Dynamic Property

Slide 83

Slide 83 text

  • ɹ
  • ɹ
Result

Slide 84

Slide 84 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Binding Data

Slide 85

Slide 85 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Binding Data

Slide 86

Slide 86 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Scaling Size

Slide 87

Slide 87 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Scaling Size http://www.jeromecukier.net/blog/2011/08/11/d3-scales-and-color/

Slide 88

Slide 88 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Scaling Color

Slide 89

Slide 89 text

var data = [{start:30, duration:3},{start:80, duration:20}] var ul = d3.select('ul.bin') var bar = ul.selectAll("li") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('li') .attr('class', 'appeared') .style({ width:function(d){return x(d.duration) + 'px'}, left:function(d){return x(d.start) + 'px'}, 'background-color': function(d, i){return color(i)} }) .text("ɹ") Dynamic Property

Slide 90

Slide 90 text

SVG? var data = [{start:30, duration:3}, {start:80, duration:20}] var svg = d3.select('body').append('svg') var bar = svg.selectAll("rect") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('rect') .attr('class', 'appeared') .attr({ width:function(d){return x(d.duration) + 'px'}, x:function(d){return x(d.start) + 'px'}, height:'10px', }) .style('fill',function(d, i){return color(i)})

Slide 91

Slide 91 text

var data = [{start:30, duration:3}, {start:80, duration:20}] var svg = d3.select('body').append('svg') var bar = svg.selectAll("rect") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('rect') .attr('class', 'appeared') .attr({ width:function(d){return x(d.duration) + 'px'}, x:function(d){return x(d.start) + 'px'}, height:'10px', }) .style('fill',function(d, i){return color(i)}) Difference

Slide 92

Slide 92 text

var data = [{start:30, duration:3}, {start:80, duration:20}] var svg = d3.select('body').append('svg') var bar = svg.selectAll("rect") .data(data); var x = d3.scale.linear() .domain([0, 100]) .range([0, 800]); var color = d3.scale.category10().domain([1,2]) bar.enter().append('rect') .attr('class', 'appeared') .attr({ width:function(d){return x(d.duration) + 'px'}, x:function(d){return x(d.start) + 'px'}, height:'10px', }) .style('fill',function(d, i){return color(i)}) Same

Slide 93

Slide 93 text

http://bl.ocks.org/mbostock/1933560

Slide 94

Slide 94 text

var histogram = d3.layout.histogram(); histogram(data);

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

What did we learn? • Data, Go get 'em, Tiger • Shapes, not Objects • D3.js for Data Transformation

Slide 98

Slide 98 text

More Info • http://d3js.org/ • http://bl.ocks.org/mbostock • http://groups.google.com/group/d3-js • http://enjalot.github.com/dot-enter

Slide 99

Slide 99 text

Thanks @makoto_inoue http://lanyrd.com/2013/london-d3js-4 http://benkyoplayer.com/courses/3