SlideShare a Scribd company logo
1 of 30
Download to read offline
The anatomy of
an infographic
/Luca Mearelli @lmea
The Wealth & Health of Nation
300 400 1,000 2,000 3,000 4,000 10,000 20,000 30,000 40,000 100,000
10
20
30
40
50
60
70
80
income per capita, inflation-adjusted (dollars)
lifeexpectancy(years)
1800
Source:  ,  , Mike Bostock Tom Carden Gapminder
Visualization 
=
Data + Representation
The end target is to extract meaningful informations from the
raw data.
Javascript 
&
Web technologies
Are the ideal platform to build visualizations: easy to tinker
with, powerful, accessible.
D3js
D3 is a tool to link data to elements and manipulate them.
http://d3js.org
Chris Viau on D3 vs JQuery
D3 is not an SVG layer, not a compatibility layer
and especially not an abstraction layer.
It's a set of tools on top of web technologies to
bind data to DOM elements. '
http://iside.rm.ingv.it/iside/standard/index.jsp
Data
Time,Lat,Lon,Depth,Mag,Source,
2013-05-0914:30:35.000,43.451,12.310,6.7,1.3,SISBAS,
2013-05-0914:15:25.000,43.452,12.308,6.3,0.8,SISBAS,
quakes=[["2013-05-0811:50:14.000",43.450,12.298, 9.6,3.0],
["2013-05-0804:29:05.000",43.452,12.304,10.1,3.3]]
Lets make a barchart (or two)
http://tributary.io/inlet/5567235
http://tributary.io/inlet/5567278
Margin conventions
http://bl.ocks.org/mbostock/3019563
Selections
varsvg=d3.select('svg');
svg.attr({
'width':width+margin.left+margin.right,
'height':height+margin.top+margin.bottom
})
varbarsGroups=graph.selectAll('g')
http://bost.ocks.org/mike/selection/
Binding data
vartext=svg.selectAll("rect")
.data(quakes);
The general update pattern
//Joinnewdatawitholdelements,ifany.
vartext=svg.selectAll("text").data(quakes);
//Updateoldelementsasneeded.
text.attr("class","update");
//Createnewelementsasneeded.
text.enter().append("text")
.attr("class","enter")
.attr("x",function(d,i){returni*32;})
//Appendingtotheenterselectionexpands
//theupdateselection
text.text(function(d){returnd[4];});
//Removeoldelementsasneeded.
text.exit().remove();
http://bl.ocks.org/mbostock/3808218
Scales
Domain → Range
varmagScale=d3.scale.linear()
.domain([2.0,8.0])
.range([0,225]);
https://github.com/mbostock/d3/wiki/Scales
Functions everywhere
varmagExtent=d3.extent(quakes,function(d){returnd[4];});
selection
.append('rect')
.attr({
'height':function(d,i){
returnmagScale(d[4]);
}})
selection.call(aFunction)
Call chaining
barsGroups
.append('text')
.text(function(d,i){returnString(d[4]);})
.attr('y',-4)
.attr("dx",5)
.attr("text-anchor","middle")
.attr('font-size',10)
More charts (animated!)
http://tributary.io/inlet/5567290
http://tributary.io/inlet/5567292
Axes
varyAxis=d3.svg.axis()
.scale(magScale.range([300,30]))
.orient('left')
.ticks(5)
.tickValues([3.0,3.2,3.4,3.6,3.8])
.tickSize(-width,1,1)
.tickPadding(8);
graph.append('g')
.call(yAxis)
https://github.com/mbostock/d3/wiki/SVG-Axes
Object constancy
graph.selectAll('g')
.data(dd,function(d){returnd.Time})
A dynamic barchart
http://tributary.io/inlet/5567329
Transitions
barsGroups
.transition()
.duration(2000)
.ease('cubic')
.attr("transform",function(d,i){
x=timeScale(tf.parse(d[0]));
y=234-magScale(d[4]);
return"translate("+x+","+y+")";
})
http://bost.ocks.org/mike/transition/
A simple scatterplot
http://tributary.io/inlet/5567399
Zooming scatterplot
http://tributary.io/inlet/5567408
Zooming
varzoom=d3.behavior.zoom()
.x(timeScale)
.on("zoom",zoomed);
Lets make a map
http://tributary.io/inlet/5567414
http://tributary.io/inlet/5567524
Projections & geodata
varprojection=d3.geo.mercator()
.scale(2100)
.translate([-122,2000])
varpath=d3.geo.path()
.projection(projection);
svg.selectAll("path")
.data(regions)
.enter()
.append('path')
.attr('d',path)
Loading data
d3.json("/static/data/cartography/reg2011.json",function(error,data){
})
queue()
.defer("/static/data/cartography/reg2011.json")
.defer("/static/data/quakes.csv")
.await(function(error,reg2011,quakes){...});
A more complex map
http://tributary.io/inlet/5567533
Assorted Tips
Group things
Queue.js:
Crossfilter:
Topojson:
Use rapid prototyping tools (e.g. Tributary: )
https://github.com/mbostock/queue
http://square.github.io/crossfilter/
https://github.com/mbostock/topojson
http://tributary.io
Thanks!
Luca Mearelli / @lmea

More Related Content

Similar to The anatomy of an infographic

Big data and digital ecosystem mark skilton jan 2014 v1
Big data and digital ecosystem mark skilton jan 2014 v1Big data and digital ecosystem mark skilton jan 2014 v1
Big data and digital ecosystem mark skilton jan 2014 v1
Mark Skilton
 
emerging technologies and business opportunities.pdf
emerging technologies and business opportunities.pdfemerging technologies and business opportunities.pdf
emerging technologies and business opportunities.pdf
Naveed Ahmed Siddiqui
 

Similar to The anatomy of an infographic (20)

Riverbed Deck - GigaOM 2013 Events
Riverbed Deck - GigaOM 2013 Events Riverbed Deck - GigaOM 2013 Events
Riverbed Deck - GigaOM 2013 Events
 
Jobs Complexity
Jobs ComplexityJobs Complexity
Jobs Complexity
 
Emerging Technologies 3.0.pdf
Emerging Technologies 3.0.pdfEmerging Technologies 3.0.pdf
Emerging Technologies 3.0.pdf
 
Emerging Technologies 33.0.pdf
Emerging Technologies 33.0.pdfEmerging Technologies 33.0.pdf
Emerging Technologies 33.0.pdf
 
Imagining a Physical Future for Digital Journalism
Imagining a Physical Future for Digital JournalismImagining a Physical Future for Digital Journalism
Imagining a Physical Future for Digital Journalism
 
Big data and digital ecosystem mark skilton jan 2014 v1
Big data and digital ecosystem mark skilton jan 2014 v1Big data and digital ecosystem mark skilton jan 2014 v1
Big data and digital ecosystem mark skilton jan 2014 v1
 
W-JAX Keynote - Big Data and Corporate Evolution
W-JAX Keynote - Big Data and Corporate EvolutionW-JAX Keynote - Big Data and Corporate Evolution
W-JAX Keynote - Big Data and Corporate Evolution
 
The Pinnacle of Tech Expertise: Unveiling the Role of a Data Center Engineer
The Pinnacle of Tech Expertise: Unveiling the Role of a Data Center EngineerThe Pinnacle of Tech Expertise: Unveiling the Role of a Data Center Engineer
The Pinnacle of Tech Expertise: Unveiling the Role of a Data Center Engineer
 
A Lay of the Meta-land: A Systematic Approach to Dissect the Metaverse
A Lay of the Meta-land: A Systematic Approach to Dissect the MetaverseA Lay of the Meta-land: A Systematic Approach to Dissect the Metaverse
A Lay of the Meta-land: A Systematic Approach to Dissect the Metaverse
 
Aspera deck
Aspera deck Aspera deck
Aspera deck
 
emerging technologies and business opportunities.pdf
emerging technologies and business opportunities.pdfemerging technologies and business opportunities.pdf
emerging technologies and business opportunities.pdf
 
Iftf 20191206 v9
Iftf 20191206 v9Iftf 20191206 v9
Iftf 20191206 v9
 
Whitepaper: Big Data 101 - Creating Real Value from the Data Lifecycle - Happ...
Whitepaper: Big Data 101 - Creating Real Value from the Data Lifecycle - Happ...Whitepaper: Big Data 101 - Creating Real Value from the Data Lifecycle - Happ...
Whitepaper: Big Data 101 - Creating Real Value from the Data Lifecycle - Happ...
 
Big Data 101 - Creating Real Value from the Data Lifecycle - Happiest Minds
 Big Data 101 - Creating Real Value from the Data Lifecycle - Happiest Minds Big Data 101 - Creating Real Value from the Data Lifecycle - Happiest Minds
Big Data 101 - Creating Real Value from the Data Lifecycle - Happiest Minds
 
Emerging Technologies 3.0
Emerging Technologies 3.0Emerging Technologies 3.0
Emerging Technologies 3.0
 
A Comprehensive Study of LATAM’s Emerging Tech Hub.pdf
A Comprehensive Study of LATAM’s Emerging Tech Hub.pdfA Comprehensive Study of LATAM’s Emerging Tech Hub.pdf
A Comprehensive Study of LATAM’s Emerging Tech Hub.pdf
 
Harnessing the cloud to create social mobile apps that scale
Harnessing the cloud to create social mobile apps that scaleHarnessing the cloud to create social mobile apps that scale
Harnessing the cloud to create social mobile apps that scale
 
Poster
PosterPoster
Poster
 
Dr. dzaharudin mansor microsoft
Dr. dzaharudin mansor   microsoftDr. dzaharudin mansor   microsoft
Dr. dzaharudin mansor microsoft
 
Blockchain EXE #10:Ocean ProtocolとBigchainDB: 分散型データエコシステムの実現(Dimitri De Jong...
Blockchain EXE #10:Ocean ProtocolとBigchainDB: 分散型データエコシステムの実現(Dimitri De Jong...Blockchain EXE #10:Ocean ProtocolとBigchainDB: 分散型データエコシステムの実現(Dimitri De Jong...
Blockchain EXE #10:Ocean ProtocolとBigchainDB: 分散型データエコシステムの実現(Dimitri De Jong...
 

More from Luca Mearelli

Controlling The Cloud With Python
Controlling The Cloud With PythonControlling The Cloud With Python
Controlling The Cloud With Python
Luca Mearelli
 
Integrating services with OAuth
Integrating services with OAuthIntegrating services with OAuth
Integrating services with OAuth
Luca Mearelli
 

More from Luca Mearelli (10)

And Now You Have Two Problems
And Now You Have Two ProblemsAnd Now You Have Two Problems
And Now You Have Two Problems
 
L'altra meta del web
L'altra meta del webL'altra meta del web
L'altra meta del web
 
To Batch Or Not To Batch
To Batch Or Not To BatchTo Batch Or Not To Batch
To Batch Or Not To Batch
 
WorseSoftware
WorseSoftwareWorseSoftware
WorseSoftware
 
Controlling The Cloud With Python
Controlling The Cloud With PythonControlling The Cloud With Python
Controlling The Cloud With Python
 
Open Web
Open WebOpen Web
Open Web
 
Capistrano2
Capistrano2Capistrano2
Capistrano2
 
Wikierp
WikierpWikierp
Wikierp
 
Introduzione a Ruby On Rails
Introduzione a Ruby On RailsIntroduzione a Ruby On Rails
Introduzione a Ruby On Rails
 
Integrating services with OAuth
Integrating services with OAuthIntegrating services with OAuth
Integrating services with OAuth
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

The anatomy of an infographic