SlideShare a Scribd company logo
1 of 44
Download to read offline
Florian Georg - IBM Switzerland 
florian.georg@ch.ibm.com
Software Solution Architect @ IBM 
Software Delivery - practices and tools 
Software-driven Product Innovation 
Agile, Lean and Design Thinking 
Cloud development (IBM Bluemix) 
Analytics, Systems and IoT
http://bluemix.net
https://internetofthings.ibmcloud.com/
not just static reporting 
not just basic charting 
not a full-fledged BI suite 
even on larger datasets
Data-Driven Documents 
http://d3js.org/
https://github.com/mbostock/d3/wiki/Gallery 
http://bl.ocks.org/mbostock 
(... lots of !)
http://bl.ocks.org/mbostock/1005873
http://bl.ocks.org/mbostock/2706022
http://bl.ocks.org/mbostock/10024231
http://bl.ocks.org/mbostock/9539958
var theData = [ "Jazoon", "D3", "IBM", "Bluemix" ]; 
var p = d3.select("body") 
.selectAll("p") // DOM element selector 
.data(theData) // join/bind to data 
.enter() // for each "new" data point 
.append("p") // ... add some DOM elements 
.text(function (d){ 
return "Hello " + d; 
}) 
.style("background-color", "steelblue"); 
<html> 
<body> 
<script src="http://d3js.org/d3.v3.min.js">
http://bost.ocks.org/mike/join/
function redraw(){ 
var circle = svg 
.selectAll("circle") 
.data(data); 
// update - existing circles move to a new random fill color 
circle.transition() 
.attr("fill", function(d) { return getRandomColor(); }) 
.duration(750) 
.delay(10); 
// enter - create circle with a random color 
circle.enter() 
.append("circle") 
.attr("cx", function(d) { return d.x; }) 
.attr("cy", function(d) { return d.y; }) 
.attr("r", function (d){return d.r;}) 
.attr("fill", function(d) { return getRandomColor(); }); 
// exit - transition radius towards zero, then remove circle element 
circle.exit() 
.transition() 
.attr("r", 0) 
.duration(750) 
.remove(); 
} 
http://jsbin.com/yubuz/13/edit
var data = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]; 
var nodesLinear = d3.select("div#linear").selectAll("p"); 
// Scales map domain into a range. 
// domains / ranges can be numbers, colors, timestamps etc. 
// D3 supports various scales and interpolators for the mapping, 
// and you can write your own... 
var color = d3.scale.linear() 
.domain([0, Math.max.apply(Math, data)]) 
.range(["yellow", "red"]); 
nodesLinear.data(data).enter() 
.append("p") 
.text(function(d){ 
return "linear interpolation " + d + " ==> " + color(d);}) 
.style("background-color", color); 
http://jsbin.com/segoyu/3/edit
// make sure you understand the data structure that is 
// expected by the layout 
var root = { 
children: [ 
{children: [ 
{value: 42}, 
{value: 10, omit: 1} 
] 
},{value: 42},{value: 10, omit: 1} 
] 
}; 
var width = 480,height = 300; 
var svg = d3.select("body").append("svg") 
.attr("width", width) 
.attr("height", height) 
// pack layout (can be used for bubblecharts etc.) 
var pack = d3.layout.pack().size([width, height]); 
svg.selectAll("circle") 
// bind to your data, "decorated" by the layout. 
.data( pack.nodes(root).filter(function(d) { return !d.omit; }) ) 
.enter().append("circle") 
// the layout knows where to position elements, 
// and adds positioning attributes like "x", "y" etc. to your data 
// (read the docs to avoid surprises) 
.attr("cx", function(d) { return d.x; }) 
.attr("cy", function(d) { return d.y; }) 
.attr("r", function(d) { return d.r; }); 
http://jsbin.com/dequma/8/edit
function update(data) { 
// DATA JOIN 
var text = svg.selectAll("text") 
.data(data, function(d) { return d; }); 
// UPDATE 
text.attr("class", "update") 
.transition() 
.duration(750) 
.attr("x", function(d, i) { return i * 32; }); 
// ENTER 
text.enter().append("text") 
.attr("class", "enter") 
.attr("dy", ".35em") 
.attr("y", -60) 
.attr("x", function(d, i) { return i * 32; }) 
.style("fill-opacity", 1e-6) 
.text(function(d) { return d; }) 
.transition() 
.duration(750) 
.attr("y", 0) 
.style("fill-opacity", 1); 
// EXIT 
text.exit() 
.attr("class", "exit") 
.transition() 
.duration(750) 
.attr("y", 60) 
.style("fill-opacity", 1e-6) 
.remove(); 
} http://jsbin.com/pezagi/2/edit
Pure HTML5 / JavaScript 
Supports SVG and 
Canvas 
Very flexible 
Mature project 
Excellent documentation 
Wide adoption
learning curve 
quite low-level 
Integration with UI Frameworks 
(JQuery, Angular ...) 
not scaling well to large datasets
http://bl.ocks.org/mbostock/4063663
http://bl.ocks.org/mbostock/7586334
http://square.github.io/crossfilter/
// A small sample of the classic cars dataset 
var csv = "name,economy (mpg),cylinders,displacement (cc),power (hp),weight (lb),0-60 mph (s),yearn" + 
"AMC Ambassador Brougham,13,8,360,175,3821,11,73n" + 
"AMC Ambassador DPL,15,8,390,190,3850,8.5,70n" + 
"AMC Ambassador SST,17,8,304,150,3672,11.5,72n" + 
"AMC Concord DL 6,20.2,6,232,90,3265,18.2,79n" + 
"AMC Concord DL,18.1,6,258,120,3410,15.1,78n" + 
"Audi Fox,29,4,98,83,2219,16.5,74n" + 
"BMW 2002,26,4,121,113,2234,12.5,70n" + 
"BMW 320i,21.5,4,121,110,2600,12.8,77n" + 
"Buick Century 350,13,8,350,175,4100,13,73n" + 
"Buick Century Limited,25,6,181,110,2945,16.4,82n" + 
"Chrysler Newport Royal,13,8,400,190,4422,12.5,72n" + 
"Citroen DS-21 Pallas,6,4,133,115,3090,17.5,70n" + 
"Datsun 1200,35,4,72,69,1613,18,71";
var cf = crossfilter(data); 
var byCylinders = cf.dimension(function(p) { 
return p.cylinders; 
}); 
// create a groups per number of cylinders 
var groupByCylinders = byCylinders.group(); 
var visCylinders = d3.select("body") 
.select("div#byCylinders") 
.selectAll("div") 
.data(groupByCylinders.top(Infinity)) // data: all elements inside group 
.enter() 
.append("div") 
.text(function(d){ 
// group is 'key', 'value' depends on the reduce function (default: count) 
return "Cars with " + d.key + " cylinders: " + d.value; 
}); 
http://jsbin.com/biruro/6/edit
var cf = crossfilter(data); 
var byName = cf.dimension(function(p) { return p.name; }); 
var groupByMeanPower = 
// MAP: create a group per brand name (e.g. "BMW") 
byName 
.group( function (d){ 
return d.substring (0, d.indexOf (" ")); 
}) 
// REDUCE: incrementally calc average power inside each group 
.reduce ( 
// add 
function (p,v){ 
p.totalPower += +v["power (hp)"]; 
p.count++; 
p.avg = (p.totalPower / p.count); 
return p; 
}, 
// remove 
function (p,v){ 
p.totalPower -= +v["power (hp)"]; 
p.count--; 
p.avg = (p.totalPower / p.count); 
return p; 
}, 
// init 
function init (){ 
return { 
totalPower: 0, 
count: 0, 
avg: 0 
}; 
} 
) 
// order group using the resulting average from the reduce step 
.order (function (d){return d.avg;}); 
http://jsbin.com/pubaz/2/edit
http://square.github.io/crossfilter/
Coordinated views on data ("brushing") 
Incremental filtering 
Extremely fast for histograms, top-n lists etc.
Dimensional data (not timeseries, continuous) 
One filter per dimension 
slow write / fast read operations 
Few examples out there 
Load & Explore (e.g. not "realtime analysis") 
Dimensions are expensive (32 max) 
Doesn't like NaN
http://dc-js.github.io/dc.js/
// [ ... ] 
var dateDim = crossfilter.dimension(function(d) {return d.date;}); 
var hits = dateDim.group().reduceSum(function(d) {return d.total;}); 
var minDate = dateDim.bottom(1)[0].date; 
var maxDate = dateDim.top(1)[0].date; 
var status_200=dateDim.group().reduceSum(function(d) {return d.http_200;}); 
var status_302=dateDim.group().reduceSum(function(d) {return d.http_302;}); 
var status_404=dateDim.group().reduceSum(function(d) {return d.http_404;}); 
dc.lineChart("#chart-line-hitsperday") 
.width(500).height(200) 
.dimension(dateDim) 
.group(status_200,"200") 
.stack(status_302,"302") 
.stack(status_404,"404") 
.renderArea(true) 
.x(d3.time.scale().domain([minDate,maxDate])) 
.brushOn(false) 
.legend(dc.legend().x(50).y(10).itemHeight(13).gap(5)) 
.yAxisLabel("Hits per day"); 
http://jsbin.com/zapupe/4/edit
http://dc-js.github.io/dc.js/
JSON is verbose 
server-side preprocessing 
dimension.dispose() 
DC uses SVG (not Canvas) 
multiple "simple" visualizations > one "complex"
Demo, slides, links etc: 
http://datavisual.mybluemix.net
http://www.ibm.com/developerworks/ 
@florian_georg 
florian.georg@ch.ibm.com

More Related Content

What's hot

Google Chart Tools
Google Chart Tools Google Chart Tools
Google Chart Tools Kanika Garg
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersOswald Campesato
 
Introduction to data visualisations with d3.js — Data Driven Documents
Introduction to data visualisations with d3.js — Data Driven DocumentsIntroduction to data visualisations with d3.js — Data Driven Documents
Introduction to data visualisations with d3.js — Data Driven DocumentsMichał Oniszczuk
 
Visualization of Big Data in Web Apps
Visualization of Big Data in Web AppsVisualization of Big Data in Web Apps
Visualization of Big Data in Web AppsEPAM
 
A Quick and Dirty D3.js Tutorial
A Quick and Dirty D3.js TutorialA Quick and Dirty D3.js Tutorial
A Quick and Dirty D3.js TutorialYoung-Ho Kim
 
Data Visualizations with D3
Data Visualizations with D3Data Visualizations with D3
Data Visualizations with D3Doug Domeny
 
PCA11: Python for Product Managers
PCA11: Python for Product ManagersPCA11: Python for Product Managers
PCA11: Python for Product ManagersDavid Heller
 
D3.js: Data Visualization for the Web
D3.js: Data Visualization for the Web D3.js: Data Visualization for the Web
D3.js: Data Visualization for the Web Outliers Collective
 
Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lalit009kumar
 
Techwave 2006 Advanced Datawindow Techniques
Techwave 2006 Advanced Datawindow TechniquesTechwave 2006 Advanced Datawindow Techniques
Techwave 2006 Advanced Datawindow TechniquesBuck Woolley
 
Hochskalierbare, relationale Datenbanken in Microsoft Azure
Hochskalierbare, relationale Datenbanken in Microsoft AzureHochskalierbare, relationale Datenbanken in Microsoft Azure
Hochskalierbare, relationale Datenbanken in Microsoft AzureSascha Dittmann
 

What's hot (20)

D3 data visualization
D3 data visualizationD3 data visualization
D3 data visualization
 
D3
D3D3
D3
 
Utahjs D3
Utahjs D3Utahjs D3
Utahjs D3
 
Google Chart Tools
Google Chart Tools Google Chart Tools
Google Chart Tools
 
Introduction to D3
Introduction to D3 Introduction to D3
Introduction to D3
 
Charting with Google
Charting with GoogleCharting with Google
Charting with Google
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for Beginners
 
Introduction to data visualisations with d3.js — Data Driven Documents
Introduction to data visualisations with d3.js — Data Driven DocumentsIntroduction to data visualisations with d3.js — Data Driven Documents
Introduction to data visualisations with d3.js — Data Driven Documents
 
Visualization of Big Data in Web Apps
Visualization of Big Data in Web AppsVisualization of Big Data in Web Apps
Visualization of Big Data in Web Apps
 
A Quick and Dirty D3.js Tutorial
A Quick and Dirty D3.js TutorialA Quick and Dirty D3.js Tutorial
A Quick and Dirty D3.js Tutorial
 
Data Visualizations with D3
Data Visualizations with D3Data Visualizations with D3
Data Visualizations with D3
 
PCA11: Python for Product Managers
PCA11: Python for Product ManagersPCA11: Python for Product Managers
PCA11: Python for Product Managers
 
D3.js: Data Visualization for the Web
D3.js: Data Visualization for the Web D3.js: Data Visualization for the Web
D3.js: Data Visualization for the Web
 
Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02
 
Techwave 2006 Advanced Datawindow Techniques
Techwave 2006 Advanced Datawindow TechniquesTechwave 2006 Advanced Datawindow Techniques
Techwave 2006 Advanced Datawindow Techniques
 
OpenStreetMap R
OpenStreetMap ROpenStreetMap R
OpenStreetMap R
 
Hochskalierbare, relationale Datenbanken in Microsoft Azure
Hochskalierbare, relationale Datenbanken in Microsoft AzureHochskalierbare, relationale Datenbanken in Microsoft Azure
Hochskalierbare, relationale Datenbanken in Microsoft Azure
 
Lincoln ddj
Lincoln ddjLincoln ddj
Lincoln ddj
 
C# + SQL = Big Data
C# + SQL = Big DataC# + SQL = Big Data
C# + SQL = Big Data
 
Networkx tutorial
Networkx tutorialNetworkx tutorial
Networkx tutorial
 

Similar to Visual Exploration of Large Data sets with D3, crossfilter and dc.js

U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...Michael Rys
 
Intro to Spark and Spark SQL
Intro to Spark and Spark SQLIntro to Spark and Spark SQL
Intro to Spark and Spark SQLjeykottalam
 
Couch db 浅漫游.
Couch db 浅漫游.Couch db 浅漫游.
Couch db 浅漫游.shyboyzk
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupDatabricks
 
Better d3 charts with tdd
Better d3 charts with tddBetter d3 charts with tdd
Better d3 charts with tddMarcos Iglesias
 
Ingesting and Manipulating Data with JavaScript
Ingesting and Manipulating Data with JavaScriptIngesting and Manipulating Data with JavaScript
Ingesting and Manipulating Data with JavaScriptLucidworks
 
Create Graph and Grid Using D3 Library
Create Graph and Grid Using D3 LibraryCreate Graph and Grid Using D3 Library
Create Graph and Grid Using D3 LibraryYanliang Bao (Beryl)
 
Playing with d3.js
Playing with d3.jsPlaying with d3.js
Playing with d3.jsmangoice
 
Having fun with graphs, a short introduction to D3.js
Having fun with graphs, a short introduction to D3.jsHaving fun with graphs, a short introduction to D3.js
Having fun with graphs, a short introduction to D3.jsMichael Hackstein
 
Dynamic Data Visualization With Chartkick
Dynamic Data Visualization With ChartkickDynamic Data Visualization With Chartkick
Dynamic Data Visualization With ChartkickDax Murray
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchAppsBradley Holt
 
ELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboardELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboardGeorg Sorst
 
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesChoose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesCHOOSE
 

Similar to Visual Exploration of Large Data sets with D3, crossfilter and dc.js (20)

Svcc 2013-d3
Svcc 2013-d3Svcc 2013-d3
Svcc 2013-d3
 
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
Intro to Spark and Spark SQL
Intro to Spark and Spark SQLIntro to Spark and Spark SQL
Intro to Spark and Spark SQL
 
CppTutorial.ppt
CppTutorial.pptCppTutorial.ppt
CppTutorial.ppt
 
Advance java
Advance javaAdvance java
Advance java
 
Couch db 浅漫游.
Couch db 浅漫游.Couch db 浅漫游.
Couch db 浅漫游.
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark Meetup
 
Better d3 charts with tdd
Better d3 charts with tddBetter d3 charts with tdd
Better d3 charts with tdd
 
Ingesting and Manipulating Data with JavaScript
Ingesting and Manipulating Data with JavaScriptIngesting and Manipulating Data with JavaScript
Ingesting and Manipulating Data with JavaScript
 
Create Graph and Grid Using D3 Library
Create Graph and Grid Using D3 LibraryCreate Graph and Grid Using D3 Library
Create Graph and Grid Using D3 Library
 
AfterGlow
AfterGlowAfterGlow
AfterGlow
 
Playing with d3.js
Playing with d3.jsPlaying with d3.js
Playing with d3.js
 
Having fun with graphs, a short introduction to D3.js
Having fun with graphs, a short introduction to D3.jsHaving fun with graphs, a short introduction to D3.js
Having fun with graphs, a short introduction to D3.js
 
Dynamic Data Visualization With Chartkick
Dynamic Data Visualization With ChartkickDynamic Data Visualization With Chartkick
Dynamic Data Visualization With Chartkick
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchApps
 
JQuery Flot
JQuery FlotJQuery Flot
JQuery Flot
 
Spark - Philly JUG
Spark  - Philly JUGSpark  - Philly JUG
Spark - Philly JUG
 
ELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboardELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboard
 
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesChoose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
 

More from Florian Georg

Behavior-Driven-Development (BDD) for Conversational Applications
Behavior-Driven-Development (BDD) for Conversational ApplicationsBehavior-Driven-Development (BDD) for Conversational Applications
Behavior-Driven-Development (BDD) for Conversational ApplicationsFlorian Georg
 
Behaviour-Driven Development for Conversational Applications
Behaviour-Driven Development for Conversational ApplicationsBehaviour-Driven Development for Conversational Applications
Behaviour-Driven Development for Conversational ApplicationsFlorian Georg
 
Artificial Intelligence and Cognitive Computing
Artificial Intelligence and Cognitive ComputingArtificial Intelligence and Cognitive Computing
Artificial Intelligence and Cognitive ComputingFlorian Georg
 
Pillars of DevOps: Platform, Method and Architecture
Pillars of DevOps: Platform, Method and ArchitecturePillars of DevOps: Platform, Method and Architecture
Pillars of DevOps: Platform, Method and ArchitectureFlorian Georg
 
Enterprise PaaS, Cloud-Native Architecture and Microservices
Enterprise PaaS, Cloud-Native Architecture and MicroservicesEnterprise PaaS, Cloud-Native Architecture and Microservices
Enterprise PaaS, Cloud-Native Architecture and MicroservicesFlorian Georg
 
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM BluemixContinuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM BluemixFlorian Georg
 
Stop Observing, Start Reacting - A new way for building collaborative, real-t...
Stop Observing, Start Reacting - A new way for building collaborative, real-t...Stop Observing, Start Reacting - A new way for building collaborative, real-t...
Stop Observing, Start Reacting - A new way for building collaborative, real-t...Florian Georg
 
The IBM Open Cloud Architecture (and Platform)
The IBM Open Cloud Architecture (and Platform)The IBM Open Cloud Architecture (and Platform)
The IBM Open Cloud Architecture (and Platform)Florian Georg
 
Development in the cloud for the cloud
Development in the cloud for the cloudDevelopment in the cloud for the cloud
Development in the cloud for the cloudFlorian Georg
 

More from Florian Georg (9)

Behavior-Driven-Development (BDD) for Conversational Applications
Behavior-Driven-Development (BDD) for Conversational ApplicationsBehavior-Driven-Development (BDD) for Conversational Applications
Behavior-Driven-Development (BDD) for Conversational Applications
 
Behaviour-Driven Development for Conversational Applications
Behaviour-Driven Development for Conversational ApplicationsBehaviour-Driven Development for Conversational Applications
Behaviour-Driven Development for Conversational Applications
 
Artificial Intelligence and Cognitive Computing
Artificial Intelligence and Cognitive ComputingArtificial Intelligence and Cognitive Computing
Artificial Intelligence and Cognitive Computing
 
Pillars of DevOps: Platform, Method and Architecture
Pillars of DevOps: Platform, Method and ArchitecturePillars of DevOps: Platform, Method and Architecture
Pillars of DevOps: Platform, Method and Architecture
 
Enterprise PaaS, Cloud-Native Architecture and Microservices
Enterprise PaaS, Cloud-Native Architecture and MicroservicesEnterprise PaaS, Cloud-Native Architecture and Microservices
Enterprise PaaS, Cloud-Native Architecture and Microservices
 
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM BluemixContinuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
 
Stop Observing, Start Reacting - A new way for building collaborative, real-t...
Stop Observing, Start Reacting - A new way for building collaborative, real-t...Stop Observing, Start Reacting - A new way for building collaborative, real-t...
Stop Observing, Start Reacting - A new way for building collaborative, real-t...
 
The IBM Open Cloud Architecture (and Platform)
The IBM Open Cloud Architecture (and Platform)The IBM Open Cloud Architecture (and Platform)
The IBM Open Cloud Architecture (and Platform)
 
Development in the cloud for the cloud
Development in the cloud for the cloudDevelopment in the cloud for the cloud
Development in the cloud for the cloud
 

Recently uploaded

Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsJoseMangaJr1
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...only4webmaster01
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...amitlee9823
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...amitlee9823
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteedamy56318795
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 

Recently uploaded (20)

Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 

Visual Exploration of Large Data sets with D3, crossfilter and dc.js

  • 1. Florian Georg - IBM Switzerland florian.georg@ch.ibm.com
  • 2.
  • 3.
  • 4. Software Solution Architect @ IBM Software Delivery - practices and tools Software-driven Product Innovation Agile, Lean and Design Thinking Cloud development (IBM Bluemix) Analytics, Systems and IoT
  • 5.
  • 6.
  • 8.
  • 10. not just static reporting not just basic charting not a full-fledged BI suite even on larger datasets
  • 11.
  • 18.
  • 19. var theData = [ "Jazoon", "D3", "IBM", "Bluemix" ]; var p = d3.select("body") .selectAll("p") // DOM element selector .data(theData) // join/bind to data .enter() // for each "new" data point .append("p") // ... add some DOM elements .text(function (d){ return "Hello " + d; }) .style("background-color", "steelblue"); <html> <body> <script src="http://d3js.org/d3.v3.min.js">
  • 21. function redraw(){ var circle = svg .selectAll("circle") .data(data); // update - existing circles move to a new random fill color circle.transition() .attr("fill", function(d) { return getRandomColor(); }) .duration(750) .delay(10); // enter - create circle with a random color circle.enter() .append("circle") .attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }) .attr("r", function (d){return d.r;}) .attr("fill", function(d) { return getRandomColor(); }); // exit - transition radius towards zero, then remove circle element circle.exit() .transition() .attr("r", 0) .duration(750) .remove(); } http://jsbin.com/yubuz/13/edit
  • 22. var data = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]; var nodesLinear = d3.select("div#linear").selectAll("p"); // Scales map domain into a range. // domains / ranges can be numbers, colors, timestamps etc. // D3 supports various scales and interpolators for the mapping, // and you can write your own... var color = d3.scale.linear() .domain([0, Math.max.apply(Math, data)]) .range(["yellow", "red"]); nodesLinear.data(data).enter() .append("p") .text(function(d){ return "linear interpolation " + d + " ==> " + color(d);}) .style("background-color", color); http://jsbin.com/segoyu/3/edit
  • 23. // make sure you understand the data structure that is // expected by the layout var root = { children: [ {children: [ {value: 42}, {value: 10, omit: 1} ] },{value: 42},{value: 10, omit: 1} ] }; var width = 480,height = 300; var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height) // pack layout (can be used for bubblecharts etc.) var pack = d3.layout.pack().size([width, height]); svg.selectAll("circle") // bind to your data, "decorated" by the layout. .data( pack.nodes(root).filter(function(d) { return !d.omit; }) ) .enter().append("circle") // the layout knows where to position elements, // and adds positioning attributes like "x", "y" etc. to your data // (read the docs to avoid surprises) .attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }) .attr("r", function(d) { return d.r; }); http://jsbin.com/dequma/8/edit
  • 24. function update(data) { // DATA JOIN var text = svg.selectAll("text") .data(data, function(d) { return d; }); // UPDATE text.attr("class", "update") .transition() .duration(750) .attr("x", function(d, i) { return i * 32; }); // ENTER text.enter().append("text") .attr("class", "enter") .attr("dy", ".35em") .attr("y", -60) .attr("x", function(d, i) { return i * 32; }) .style("fill-opacity", 1e-6) .text(function(d) { return d; }) .transition() .duration(750) .attr("y", 0) .style("fill-opacity", 1); // EXIT text.exit() .attr("class", "exit") .transition() .duration(750) .attr("y", 60) .style("fill-opacity", 1e-6) .remove(); } http://jsbin.com/pezagi/2/edit
  • 25. Pure HTML5 / JavaScript Supports SVG and Canvas Very flexible Mature project Excellent documentation Wide adoption
  • 26. learning curve quite low-level Integration with UI Frameworks (JQuery, Angular ...) not scaling well to large datasets
  • 27.
  • 31. // A small sample of the classic cars dataset var csv = "name,economy (mpg),cylinders,displacement (cc),power (hp),weight (lb),0-60 mph (s),yearn" + "AMC Ambassador Brougham,13,8,360,175,3821,11,73n" + "AMC Ambassador DPL,15,8,390,190,3850,8.5,70n" + "AMC Ambassador SST,17,8,304,150,3672,11.5,72n" + "AMC Concord DL 6,20.2,6,232,90,3265,18.2,79n" + "AMC Concord DL,18.1,6,258,120,3410,15.1,78n" + "Audi Fox,29,4,98,83,2219,16.5,74n" + "BMW 2002,26,4,121,113,2234,12.5,70n" + "BMW 320i,21.5,4,121,110,2600,12.8,77n" + "Buick Century 350,13,8,350,175,4100,13,73n" + "Buick Century Limited,25,6,181,110,2945,16.4,82n" + "Chrysler Newport Royal,13,8,400,190,4422,12.5,72n" + "Citroen DS-21 Pallas,6,4,133,115,3090,17.5,70n" + "Datsun 1200,35,4,72,69,1613,18,71";
  • 32. var cf = crossfilter(data); var byCylinders = cf.dimension(function(p) { return p.cylinders; }); // create a groups per number of cylinders var groupByCylinders = byCylinders.group(); var visCylinders = d3.select("body") .select("div#byCylinders") .selectAll("div") .data(groupByCylinders.top(Infinity)) // data: all elements inside group .enter() .append("div") .text(function(d){ // group is 'key', 'value' depends on the reduce function (default: count) return "Cars with " + d.key + " cylinders: " + d.value; }); http://jsbin.com/biruro/6/edit
  • 33. var cf = crossfilter(data); var byName = cf.dimension(function(p) { return p.name; }); var groupByMeanPower = // MAP: create a group per brand name (e.g. "BMW") byName .group( function (d){ return d.substring (0, d.indexOf (" ")); }) // REDUCE: incrementally calc average power inside each group .reduce ( // add function (p,v){ p.totalPower += +v["power (hp)"]; p.count++; p.avg = (p.totalPower / p.count); return p; }, // remove function (p,v){ p.totalPower -= +v["power (hp)"]; p.count--; p.avg = (p.totalPower / p.count); return p; }, // init function init (){ return { totalPower: 0, count: 0, avg: 0 }; } ) // order group using the resulting average from the reduce step .order (function (d){return d.avg;}); http://jsbin.com/pubaz/2/edit
  • 35. Coordinated views on data ("brushing") Incremental filtering Extremely fast for histograms, top-n lists etc.
  • 36. Dimensional data (not timeseries, continuous) One filter per dimension slow write / fast read operations Few examples out there Load & Explore (e.g. not "realtime analysis") Dimensions are expensive (32 max) Doesn't like NaN
  • 37.
  • 39. // [ ... ] var dateDim = crossfilter.dimension(function(d) {return d.date;}); var hits = dateDim.group().reduceSum(function(d) {return d.total;}); var minDate = dateDim.bottom(1)[0].date; var maxDate = dateDim.top(1)[0].date; var status_200=dateDim.group().reduceSum(function(d) {return d.http_200;}); var status_302=dateDim.group().reduceSum(function(d) {return d.http_302;}); var status_404=dateDim.group().reduceSum(function(d) {return d.http_404;}); dc.lineChart("#chart-line-hitsperday") .width(500).height(200) .dimension(dateDim) .group(status_200,"200") .stack(status_302,"302") .stack(status_404,"404") .renderArea(true) .x(d3.time.scale().domain([minDate,maxDate])) .brushOn(false) .legend(dc.legend().x(50).y(10).itemHeight(13).gap(5)) .yAxisLabel("Hits per day"); http://jsbin.com/zapupe/4/edit
  • 41. JSON is verbose server-side preprocessing dimension.dispose() DC uses SVG (not Canvas) multiple "simple" visualizations > one "complex"
  • 42.
  • 43. Demo, slides, links etc: http://datavisual.mybluemix.net