10 Views of a Single Dataset

London D3.js Meetup

June 2013

by Peter Cook / @prcweb / www.prcweb.co.uk

About me

Freelance data visualisation and web development

Brighton based

Portfolio and more at prcweb.co.uk

Background

Question: how many ways can a single dataset by visualised?

Data: Wimbledon 2012

Wimbledon 2012 Data

Comma separated value (CSV) data from tennis-data.co.uk

Single table, each row represents a single match

Each match consists of: round, player names, ATP points, games won in each set etc.

The Process

Questions & aims

Design

Data wrangling

Implementation

Questions

Who won?

What were the surprises?

Who were the heroes?

Surprise defeats?

What were the interesting matches?

etc.

Exploration? Art?

No message - just allow the user to explore.

Design

Pencil & paper

Data wrangling

node.js + Underscore.js

Implementation

D3 + HTML + SVG + CSS

Iterative

10 Visualisations

Overviews (for exploration)

Match overview

Player overview

Hybrid?

Heroes/losers

Interesting matches

___

wimbledon.prcweb.co.uk

Overviews

Circular Match Tree

Tournament is a tree structure

Circle more space efficient than triangle

D3 partition layout

Match Table

D3 + HTML/CSS (no SVG)

Surprisingly usable

Top 32 Players

D3 + HTML/CSS (no SVG)

Transitions

Only shows top 32 due to space!

Player Grid

D3 + HTML/CSS (no SVG)

Sortable

Interaction

Shows all players in one screen

Who Played Whom?

Graph -> force directed?

SVG: paths (arcs)

Player Bubbles

(Who Defeated Whom?)

Another tree structure

Node = player & children = defeated players

D3 pack layout

Heroes

Scatter-plot

Games won vs. ATP points

We expect games won to increase with ATP points

Outliers are heroes or losers

Heroes

Hero score = sum of point differences (of unexpected win)

Simple bar chart - div elements

David & Goliath

Graph structure

Matches where winner defeated player of higher rank

D3 force-directed layout

Interesting matches

Match swings

For each match, show the game differences

Sort by 'swinginess'

D3 + HTML/CSS (no SVG)

The process

Design

Data wrangling

Implementation

Design

Pencil & paper + in browser design (no Illustrator/Photoshop)

Iterative process: design, implement, design etc.

Data wrangling

node.js + Underscore.js

5 sets of json (matches, players, matchtree, winstree, herograph)

Implementation

D3/HTML/CSS/SVG in fairly equal measure

Main uses of D3: binding data to HTML/SVG elements, binding events, selection, layouts

Nothing out of the ordinary

Summing up

How many ways can a single dataset be visualised? At least 10!

Start with questions

Consider exploratory visualisations too

Iterative design

Setting a challenge results in creativity

The End

Peter Cook / @prcweb / prcweb.co.uk

___

One day beginner's D3 workshop

Brighton 3rd July 2013

l4rp.com/d3

Discount code: londond3