SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Data Driven Documents
Introduction to visualising data with D3.js
Michał Oniszczuk"
micon@icm.edu.pl"
adalab.icm.edu.pl
Me & my team
software dev
adalab.icm.edu.pl
text & data mining
Agenda
what is D3
core ideas
features
D3 in ICM
more examples: d3js.org
What is D3?
Architecture
UI
Data
Data
Architecture
UI
Data
Architecture
Low–level
Libraries
UI
<html>
<body>
"
<svg width="400" height="200">
<circle cx="100" cy="100" r="10"></circle>
<circle cx="200" cy="100" r="30" fill="orange"></circle>
<circle cx="300" cy="100" r="20" fill="olivedrab"></circle>
</svg>
examples are inspired by the Three Little Circles tutorial by Mike Bostock
Core D3 ideas
select
bind
Include .
<html>
<body>
<script src=„d3.js”></script>
...
Select
Select
Select
<svg>...</svg>
"
<script>
var circles = d3.selectAll("circle");
circles.attr("r", 30);
</script>
Select
<svg>...</svg>
"
<script>
var circles = d3.selectAll("circle");
circles.attr("r", 30);
</script>
CSS3 selector
Select
<svg>...</svg>
"
<script>
var circles = d3.selectAll("circle");
circles.attr("r", 30);
</script>
CSS3 selector
Select
<svg>...</svg>
"
<script>
var circles = d3.selectAll("circle");
circles
.attr("r", 30)
.attr("stroke", "black")
.attr("stroke-width", 1.5);
</script>
CSS3 selector
method chaining
{
Select with jQuery
<svg>...</svg>
"
<script>
var circles = $("circle");
circles
.attr("r", 30)
.attr("stroke", "black")
.attr("stroke-width", 1.5);
</script>
Bind
var sizes = [10, 25, 60];
Bind
<svg>...</svg>
"
<script>
var circles = d3.selectAll("circle");
var sizes = [10, 25, 60];
circles
.data(sizes)
.attr("r", function(size)
{ return size / 2; });
</script>
Batteries included
layouts
transitions
geography
localisation
json & csv
scales
date & time
colour helpers
svg helpers
drag & drop
Libraries
c3js.org
<link href="c3.css" rel="stylesheet" type="text/css">
<script src="d3.js"></script>
<script src="c3.js"></script>
"
<div id="chart"></div>
"
<script>
var chart = c3.generate({
bindto: '#chart',
data: {
columns: [
['data1', 30, 200, 100, 400, 150, 250],
['data2', 50, 20, 10, 40, 15, 25]
]
}
});
</script> c3js.org
<link href="c3.css" rel="stylesheet" type="text/css">
<script src="d3.js"></script>
<script src="c3.js"></script>
"
<div id="chart"></div>
"
<script>
var chart = c3.generate({
bindto: '#chart',
data: {
columns: [
['data1', 30, 200, 100, 400, 150, 250],
['data2', 50, 20, 10, 40, 15, 25]
]
}
});
</script> c3js.org
NVD3.js
nvd3.org
ramnathv.github.io/rCharts
D3 in ICM
Scholar Graph Explorer
developed in adalab.icm.edu.pl
R graphs exporter
developed by Monika Pawluczuk m.pawluczuk@icm.edu.pl
& Michał Bojanowski m.bojanowski@uw.edu.pl
Charts
More charts
Summary
Data
Low–level
Libraries
UI
Warning
low–level
steep learning curve
D3 is good
flexible
declarative
community
libs
Links
d3js.org — great examples & tutorials
libraries & tools:!
nvd3.org, c3js.org, … — easier charts
ramnathv.github.io/rCharts — create D3 charts in R
app.raw.densitydesign.org — WYSIWYG, no coding
mikemcdearmon.com/portfolio/techposts/charting-
libraries-using-d3 — many more libs
Thanks!
Please ask questions
Michał Oniszczuk"
micon@icm.edu.pl"
adalab.icm.edu.pl

Weitere ähnliche Inhalte

Was ist angesagt? (8)

D3 Basic Tutorial
D3 Basic TutorialD3 Basic Tutorial
D3 Basic Tutorial
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for Beginners
 
Advanced D3 Charting
Advanced D3 ChartingAdvanced D3 Charting
Advanced D3 Charting
 
SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)
 
SVGD3Angular2React
SVGD3Angular2ReactSVGD3Angular2React
SVGD3Angular2React
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Лабораторная работа №1
Лабораторная работа №1Лабораторная работа №1
Лабораторная работа №1
 
Data Visualization on the Web - Intro to D3
Data Visualization on the Web - Intro to D3Data Visualization on the Web - Intro to D3
Data Visualization on the Web - Intro to D3
 

Ähnlich wie Introduction to data visualisations with d3.js — Data Driven Documents

Ähnlich wie Introduction to data visualisations with d3.js — Data Driven Documents (20)

Introduction to data visualisation with D3
Introduction to data visualisation with D3Introduction to data visualisation with D3
Introduction to data visualisation with D3
 
Intro to D3: Data-Driven Documents
Intro to D3: Data-Driven DocumentsIntro to D3: Data-Driven Documents
Intro to D3: Data-Driven Documents
 
Using ReactJS in AngularJS
Using ReactJS in AngularJSUsing ReactJS in AngularJS
Using ReactJS in AngularJS
 
Praktik Pengembangan Konten E-Learning HTML5 Sederhana
Praktik Pengembangan Konten E-Learning HTML5 SederhanaPraktik Pengembangan Konten E-Learning HTML5 Sederhana
Praktik Pengembangan Konten E-Learning HTML5 Sederhana
 
Going Serverless with Azure Functions
Going Serverless with Azure FunctionsGoing Serverless with Azure Functions
Going Serverless with Azure Functions
 
Yeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web appsYeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web apps
 
Quickstartguidetojavascriptframeworksforsharepointapps spsbe-2015-15041903264...
Quickstartguidetojavascriptframeworksforsharepointapps spsbe-2015-15041903264...Quickstartguidetojavascriptframeworksforsharepointapps spsbe-2015-15041903264...
Quickstartguidetojavascriptframeworksforsharepointapps spsbe-2015-15041903264...
 
Quick start guide to java script frameworks for sharepoint apps spsbe-2015
Quick start guide to java script frameworks for sharepoint apps spsbe-2015Quick start guide to java script frameworks for sharepoint apps spsbe-2015
Quick start guide to java script frameworks for sharepoint apps spsbe-2015
 
Data Modelling Zone 2019 - data modelling and JSON
Data Modelling Zone 2019 - data modelling and JSONData Modelling Zone 2019 - data modelling and JSON
Data Modelling Zone 2019 - data modelling and JSON
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
 
Intranet Development in Office 365
Intranet Development in Office 365Intranet Development in Office 365
Intranet Development in Office 365
 
Biological Modeling, Powered by AngularJS
Biological Modeling, Powered by AngularJSBiological Modeling, Powered by AngularJS
Biological Modeling, Powered by AngularJS
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
Data Visualization with D3
Data Visualization with D3Data Visualization with D3
Data Visualization with D3
 
DSL101
DSL101DSL101
DSL101
 
Step by Step to learn Azure and get MCSE
Step by Step to learn Azure and get MCSEStep by Step to learn Azure and get MCSE
Step by Step to learn Azure and get MCSE
 
Svcc 2013-d3
Svcc 2013-d3Svcc 2013-d3
Svcc 2013-d3
 
Semantic UI Introduction
Semantic UI IntroductionSemantic UI Introduction
Semantic UI Introduction
 
CSS framework
CSS frameworkCSS framework
CSS framework
 

Kürzlich hochgeladen

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
 

Kürzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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)
 

Introduction to data visualisations with d3.js — Data Driven Documents