Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Using D3.js to visualise your analytics data
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Edd S
October 21, 2013
Technology
810
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Using D3.js to visualise your analytics data
Learn how to create easy hacks to create graphs of your users behaviour with D3.
Edd S
October 21, 2013
More Decks by Edd S
See All by Edd S
Using React at Deliveroo - LRUG
edds
0
900
Accessibility and how to get the most from your screenreader - EpicFEL
edds
1
650
What even is a table? A quick look at Accessibility APIs
edds
8
2.6k
Accessibility and how to get the most from your screenreader - Pivotal Lunch & Learns
edds
2
460
Accessibility and how to get the most from your screenreader - Front End North
edds
3
1.3k
GOV.UK Case Study - Fronteers 2013
edds
2
1.1k
Using Sass on GOV.UK
edds
8
990
What the flash - Photography Introduction
edds
67
11k
HTML5
edds
11
1.9k
Other Decks in Technology
See All in Technology
AWSセキュリティで活用するAI機能
cmusudakeisuke
1
280
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
400
S3 Filesで挑む! 八戸せんべい汁の食べ頃問題
usanchuu
0
170
DevelopersIO 2026 Tokyo 現時点の衛星通信サービスの現状を整理してみる
maroon1st
0
280
日本AIベンチャーレポート2026
kentarofujii
0
210
局所最適は悪ではない。壊れているのは指標です。量と質を同時に見る先行指標の設計
recruitengineers
PRO
2
1.1k
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
230
BacklogのRAG 今ならこう作る - S3 Vectorsと自前パイプラインの勘所
revsystem
0
130
Draft AIエージェントの トークン消費を最小化する 8つの原則
kinopeee
3
1.5k
Codex を使った障害対応机上演習の実際
orgachem
PRO
0
340
その Valkey 使いこなしていますか?
onk
PRO
5
2k
【データ横丁主催】AI エージェント時代のTranslytical Data Platform
shisyu_gaku
0
280
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.6k
The Invisible Side of Design
smashingmag
301
52k
Music & Morning Musume
bryan
48
7.4k
The Limits of Empathy - UXLibs8
cassininazir
2
730
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
230
For a Future-Friendly Web
brad_frost
184
10k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
560
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
540
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Making the Leap to Tech Lead
cromwellryan
135
10k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
510
Designing for Timeless Needs
cassininazir
1
530
Transcript
Edd Sowden @edds
D3.js
[ ... ]
Sin Wave
[ 0, 1, 0, -1, 0 ]
var xScale = d3.scale .linear() .domain([0, data.length-1]) .range([0, graphWidth]);
d3.svg.line() .x(function(d, i){ return xScale(i); }) .y(function(d, i){ return yScale(d);
});
demo
[ [ ... ], [ ... ] ]
D3 update pattern
// select all existing elements ... // add new elements
... // update all the elements ... // remove the old elements ...
// select all existing elements lines = graph.selectAll(‘path’) .data(data)
// add new elements lines.enter().append(‘path’)
// update all the elements lines.attr('d', function(d){ return line(d); });
// remove the old elements path.exit().remove();
demo
Updating the lines
demo
Google Analytics
app google window.location (query string) window.location (hash) JSONP (Ajax)
accessToken
https://www.googleapis.com/ analytics/v3/management/accounts
googleUser.apiRequest( endpoint, function(data){ ... } );
Dimensions Metrics Sort order Start and end date
Dimensions Metrics Sort order Start and end date
Dimensions Metrics Sort order Start and end date
Dimensions Metrics Sort order Start and end date
OLAP Cube
date device type operating system
operating system date device type
metrics ga:visitors dimensions ga:deviceCategory ga:nthDay
https://www.googleapis.com/analytics/v3/data/ga? ids={{profileId}}& dimensions=ga:nthDay,ga:deviceCategory& metrics=ga:visitors& start-date=2013-01-01& end-date=2013-09-30& max-results=10000& sort=ga:nthDay& access-token={{accessToken}}
[ [desktop, 0, 7], [mobile, 0, 3], [tablet, 0, 7],
[desktop, 1, 4], ... ]
[ { type: “desktop”, values: [7, 4, 5], }, ...
]
demo
Getting the data in shape
demo
Browser Matrix http://edds.github.io/browser-matrix/
None
Google Analytics Query Explorer 2 http://ga-dev-tools.appspot.com/explorer/
Demos from this talk https://github.com/edds/d3-presentation-examples
Edd Sowden @edds