SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
Data Visualization	

             Concepts and Implementation using D3




Saturday, March 9, 13
Agenda

             ✦      Hello Visualization
             ✦      Introducing D3
             ✦      Show Me The Code
             ✦      Online Resources




Saturday, March 9, 13
Hello Visualization




Saturday, March 9, 13
Hello Visualization




Saturday, March 9, 13
Hello Visualization




Saturday, March 9, 13
Why Visualize


             ✦      Visualization helps us understand




Saturday, March 9, 13
Visualization Challenges

             ✦      Versatile visualizations
             ✦      Versatile data
             ✦      Scalable
             ✦      Interactive




Saturday, March 9, 13
D3 Is Different




Saturday, March 9, 13
D3 Is Different


             ✦      YOU choose how to visualize
             ✦      D3 just builds the DOM




Saturday, March 9, 13
What You Need


             ✦      Data items
             ✦      Know how to visualize an item




Saturday, March 9, 13
What You Need
             ✦      Data Item: #69ce85

             ✦      Visualization:

               <div style="
                 background-color: rgb(108,
               199, 224);
                 height: 20px;
                 width: 25px;"
               class="color"></div>




Saturday, March 9, 13
Demo1: Visualizing
             Numbers


              http://jsbin.com/ogenow/2/edit




Saturday, March 9, 13
D3 Concepts

             ✦      Use selectAll(...).data(...) to
                    bind data and DOM
             ✦      Append new elements on enter()
             ✦      Remove them on exit()
             ✦      Separate visualization from data



Saturday, March 9, 13
Demo2: Visualizing
             Numbers
              Using the DOM instead of SVG is just as easy




             http://jsbin.com/ogenow/3/edit

Saturday, March 9, 13
Using Scales

             ✦      So far our scale was “coded-in” the
                    visualization
             ✦      D3 helps us decouple the scale




Saturday, March 9, 13
Using Scales
             ✦      The scale function creates a
                    scale                          var xScale = d3.scale.linear()
                                                     .domain([0,data.length])
                                                     .range([50,500]);
             ✦      Domain is the input
                                                   .attr('cx', function(d, i) {
             ✦      Range is the output               return xScale( i );
                                                   })
             ✦      Basically, it translates
                    FROM domain TO range

             ✦      https://github.com/
                    mbostock/d3/wiki/Scales

Saturday, March 9, 13
Scales Demo




               http://jsbin.com/iyavef/1/edit



Saturday, March 9, 13
Show Me The Code

             ✦      More D3 Demos:
                        ✦   Bar Graph http://jsbin.com/abagiv/1/edit
                        ✦   Color Picker http://jsbin.com/igited/1/edit




Saturday, March 9, 13
More D3 Features


             ✦      Built-in visualizations for common SVG
                    shapes




Saturday, March 9, 13
D3 Charts
     Original Data         Layout      SVG Shapes



                                       A function
        Array of         Maps values
                                       that paints
      objects from        to “shape”
                                       using SVG
      YOUR world            values
                                          path



Saturday, March 9, 13
D3 Charts Example

                              var   pie_values = [
                                {   y: 10, label: 'foo'},
             Your Data          {   y: 20, label: 'bar'},
                                {   y: 40, label: 'buz'},
                                {   y: 30, label: 'hss'}
                              ];




Saturday, March 9, 13
D3 Charts Example
          Layout
       [
         {"data":{"y":10,"label":"foo"},"value":10,"startAngle":
       5.654866776461628,"endAngle":6.283185307179586},

         {"data":{"y":20,"label":"bar"},"value":20,"startAngle":
       4.39822971502571,"endAngle":5.654866776461628},

         {"data":{"y":40,"label":"buz"},"value":40,"startAngle":
       0,"endAngle":2.5132741228718345},

         {"data":{"y":30,"label":"hss"},"value":30,"startAngle":
       2.5132741228718345,"endAngle":4.39822971502571}
       ]




Saturday, March 9, 13
D3 Charts Example

             ✦      Create a shape with:
                    var arc = d3.svg.arc().outerRadius(150).innerRadius(0);

             ✦      Now we get:
                    arc(p_data[0]) ==
                    "M-88.16778784387098,-121.3525491562421A150,150 0 0,1
                    -2.7553642961003488e-14,-150L0,0Z"




Saturday, March 9, 13
Pie Chart Full Demo


             ✦      http://jsbin.com/usujoq/1/edit




Saturday, March 9, 13
More Layouts

             ✦      Partition Layout

             ✦      Adjacency diagrams

             ✦      Use with d3.svg.arc




Saturday, March 9, 13
More Layouts

             ✦      Cluster Layout

             ✦      Produces dendograms

             ✦      Use with d3.svg.diagonal




Saturday, March 9, 13
More Layouts

             ✦      Pack Layout

             ✦      Enclosure diagrams

             ✦      Plain circles




Saturday, March 9, 13
More Layouts

             ✦      Histogram Layout

             ✦      Splits data to bins

             ✦      Use with plain rects




Saturday, March 9, 13
D3 Online

             ✦      Rich examples gallery:
                    http://static.cybercommons.org/js/d3/
                    examples/
             ✦      D3 wiki:
                    https://github.com/mbostock/d3/wiki




Saturday, March 9, 13
Thanks For Listening

             ✦      Ynon Perek
             ✦      ynon@ynonperek.com
             ✦      http://ynonperek.com




Saturday, March 9, 13

Más contenido relacionado

La actualidad más candente

Big data visualization
Big data visualizationBig data visualization
Big data visualizationAnurag Gupta
 
BIG Data & Hadoop Applications in Healthcare
BIG Data & Hadoop Applications in HealthcareBIG Data & Hadoop Applications in Healthcare
BIG Data & Hadoop Applications in HealthcareSkillspeed
 
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Edureka!
 
Big Data: The 4 Layers Everyone Must Know
Big Data: The 4 Layers Everyone Must KnowBig Data: The 4 Layers Everyone Must Know
Big Data: The 4 Layers Everyone Must KnowBernard Marr
 
Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands SimoniShah6
 
INTRODUCTION TO BIG DATA AND HADOOP
INTRODUCTION TO BIG DATA AND HADOOPINTRODUCTION TO BIG DATA AND HADOOP
INTRODUCTION TO BIG DATA AND HADOOPDr Geetha Mohan
 
Data Warehouse Basic Guide
Data Warehouse Basic GuideData Warehouse Basic Guide
Data Warehouse Basic Guidethomasmary607
 
DBT ELT approach for Advanced Analytics.pptx
DBT ELT approach for Advanced Analytics.pptxDBT ELT approach for Advanced Analytics.pptx
DBT ELT approach for Advanced Analytics.pptxHong Ong
 
Big Data Analytics with R
Big Data Analytics with RBig Data Analytics with R
Big Data Analytics with RGreat Wide Open
 

La actualidad más candente (20)

Big data visualization
Big data visualizationBig data visualization
Big data visualization
 
BIG Data & Hadoop Applications in Healthcare
BIG Data & Hadoop Applications in HealthcareBIG Data & Hadoop Applications in Healthcare
BIG Data & Hadoop Applications in Healthcare
 
R code for data manipulation
R code for data manipulationR code for data manipulation
R code for data manipulation
 
Data Management in R
Data Management in RData Management in R
Data Management in R
 
Data visualization
Data visualizationData visualization
Data visualization
 
Data visualization-tools
Data visualization-toolsData visualization-tools
Data visualization-tools
 
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
 
Apache Spark & Hadoop
Apache Spark & HadoopApache Spark & Hadoop
Apache Spark & Hadoop
 
Big Data: The 4 Layers Everyone Must Know
Big Data: The 4 Layers Everyone Must KnowBig Data: The 4 Layers Everyone Must Know
Big Data: The 4 Layers Everyone Must Know
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
Getting Started with R
Getting Started with RGetting Started with R
Getting Started with R
 
Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands
 
Big Data Analytics
Big Data AnalyticsBig Data Analytics
Big Data Analytics
 
Planning Data Warehouse
Planning Data WarehousePlanning Data Warehouse
Planning Data Warehouse
 
Data visualization
Data visualizationData visualization
Data visualization
 
INTRODUCTION TO BIG DATA AND HADOOP
INTRODUCTION TO BIG DATA AND HADOOPINTRODUCTION TO BIG DATA AND HADOOP
INTRODUCTION TO BIG DATA AND HADOOP
 
Data Warehouse Basic Guide
Data Warehouse Basic GuideData Warehouse Basic Guide
Data Warehouse Basic Guide
 
DBT ELT approach for Advanced Analytics.pptx
DBT ELT approach for Advanced Analytics.pptxDBT ELT approach for Advanced Analytics.pptx
DBT ELT approach for Advanced Analytics.pptx
 
Mongo db report
Mongo db reportMongo db report
Mongo db report
 
Big Data Analytics with R
Big Data Analytics with RBig Data Analytics with R
Big Data Analytics with R
 

Similar a D3 js

D3.js capita selecta
D3.js capita selectaD3.js capita selecta
D3.js capita selectaJoris Klerkx
 
Projeto de criacao e prod digital 2013
Projeto de criacao e prod digital 2013Projeto de criacao e prod digital 2013
Projeto de criacao e prod digital 2013famecos2013
 
Getting rid of images with CSS
Getting rid of images with CSSGetting rid of images with CSS
Getting rid of images with CSSChris Mills
 
Progressive Advancement, by way of progressive enhancement
Progressive Advancement, by way of progressive enhancementProgressive Advancement, by way of progressive enhancement
Progressive Advancement, by way of progressive enhancementPaul Irish
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignNicolae Rusan
 
Shiny r, live shared and explored
Shiny   r, live shared and exploredShiny   r, live shared and explored
Shiny r, live shared and exploredAlex Brown
 
Essential Test-Driven Development
Essential Test-Driven DevelopmentEssential Test-Driven Development
Essential Test-Driven DevelopmentTechWell
 
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
 
Developers + Designers: A Mutalistic Relationship - From BlendConf 2013
Developers + Designers: A Mutalistic Relationship - From BlendConf 2013Developers + Designers: A Mutalistic Relationship - From BlendConf 2013
Developers + Designers: A Mutalistic Relationship - From BlendConf 2013Rachel Parsons
 
3D Web Services And Models For The Web: Where Do We Stand?
3D Web Services And Models For The Web: Where Do We Stand?3D Web Services And Models For The Web: Where Do We Stand?
3D Web Services And Models For The Web: Where Do We Stand?Camptocamp
 

Similar a D3 js (20)

D3.js capita selecta
D3.js capita selectaD3.js capita selecta
D3.js capita selecta
 
Learning d3
Learning d3Learning d3
Learning d3
 
D3js
D3jsD3js
D3js
 
Projeto de criacao e prod digital 2013
Projeto de criacao e prod digital 2013Projeto de criacao e prod digital 2013
Projeto de criacao e prod digital 2013
 
WebGL and three.js
WebGL and three.jsWebGL and three.js
WebGL and three.js
 
Getting rid of images with CSS
Getting rid of images with CSSGetting rid of images with CSS
Getting rid of images with CSS
 
d3 is cool
d3 is coold3 is cool
d3 is cool
 
Progressive Advancement, by way of progressive enhancement
Progressive Advancement, by way of progressive enhancementProgressive Advancement, by way of progressive enhancement
Progressive Advancement, by way of progressive enhancement
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Shiny r, live shared and explored
Shiny   r, live shared and exploredShiny   r, live shared and explored
Shiny r, live shared and explored
 
Essential Test-Driven Development
Essential Test-Driven DevelopmentEssential Test-Driven Development
Essential Test-Driven Development
 
D3
D3D3
D3
 
Backbone
BackboneBackbone
Backbone
 
Couchbase
CouchbaseCouchbase
Couchbase
 
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
 
Intro tobackbone
Intro tobackboneIntro tobackbone
Intro tobackbone
 
Developers + Designers: A Mutalistic Relationship - From BlendConf 2013
Developers + Designers: A Mutalistic Relationship - From BlendConf 2013Developers + Designers: A Mutalistic Relationship - From BlendConf 2013
Developers + Designers: A Mutalistic Relationship - From BlendConf 2013
 
3D Web Services And Models For The Web: Where Do We Stand?
3D Web Services And Models For The Web: Where Do We Stand?3D Web Services And Models For The Web: Where Do We Stand?
3D Web Services And Models For The Web: Where Do We Stand?
 
Utahjs D3
Utahjs D3Utahjs D3
Utahjs D3
 
Effective Scala @ Jfokus
Effective Scala @ JfokusEffective Scala @ Jfokus
Effective Scala @ Jfokus
 

Más de Ynon Perek

09 performance
09 performance09 performance
09 performanceYnon Perek
 
Mobile Web Intro
Mobile Web IntroMobile Web Intro
Mobile Web IntroYnon Perek
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threadsYnon Perek
 
Mobile Devices
Mobile DevicesMobile Devices
Mobile DevicesYnon Perek
 
Architecture app
Architecture appArchitecture app
Architecture appYnon Perek
 
Unit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsUnit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsYnon Perek
 
How to write easy-to-test JavaScript
How to write easy-to-test JavaScriptHow to write easy-to-test JavaScript
How to write easy-to-test JavaScriptYnon Perek
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and RubyYnon Perek
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application TestingYnon Perek
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design PatternsYnon Perek
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application SecurityYnon Perek
 

Más de Ynon Perek (20)

Regexp
RegexpRegexp
Regexp
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
09 performance
09 performance09 performance
09 performance
 
Mobile Web Intro
Mobile Web IntroMobile Web Intro
Mobile Web Intro
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threads
 
Vimperl
VimperlVimperl
Vimperl
 
Syllabus
SyllabusSyllabus
Syllabus
 
Mobile Devices
Mobile DevicesMobile Devices
Mobile Devices
 
Network
NetworkNetwork
Network
 
Architecture app
Architecture appArchitecture app
Architecture app
 
Cryptography
CryptographyCryptography
Cryptography
 
Unit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsUnit Testing JavaScript Applications
Unit Testing JavaScript Applications
 
How to write easy-to-test JavaScript
How to write easy-to-test JavaScriptHow to write easy-to-test JavaScript
How to write easy-to-test JavaScript
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
 
Accessibility
AccessibilityAccessibility
Accessibility
 
Angularjs
AngularjsAngularjs
Angularjs
 
Js memory
Js memoryJs memory
Js memory
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design Patterns
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 

Último

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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...DianaGray10
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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 2024The Digital Insurer
 
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 DevelopmentsTrustArc
 
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)wesley chun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Último (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
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)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

D3 js

  • 1. Data Visualization Concepts and Implementation using D3 Saturday, March 9, 13
  • 2. Agenda ✦ Hello Visualization ✦ Introducing D3 ✦ Show Me The Code ✦ Online Resources Saturday, March 9, 13
  • 6. Why Visualize ✦ Visualization helps us understand Saturday, March 9, 13
  • 7. Visualization Challenges ✦ Versatile visualizations ✦ Versatile data ✦ Scalable ✦ Interactive Saturday, March 9, 13
  • 9. D3 Is Different ✦ YOU choose how to visualize ✦ D3 just builds the DOM Saturday, March 9, 13
  • 10. What You Need ✦ Data items ✦ Know how to visualize an item Saturday, March 9, 13
  • 11. What You Need ✦ Data Item: #69ce85 ✦ Visualization: <div style=" background-color: rgb(108, 199, 224); height: 20px; width: 25px;" class="color"></div> Saturday, March 9, 13
  • 12. Demo1: Visualizing Numbers http://jsbin.com/ogenow/2/edit Saturday, March 9, 13
  • 13. D3 Concepts ✦ Use selectAll(...).data(...) to bind data and DOM ✦ Append new elements on enter() ✦ Remove them on exit() ✦ Separate visualization from data Saturday, March 9, 13
  • 14. Demo2: Visualizing Numbers Using the DOM instead of SVG is just as easy http://jsbin.com/ogenow/3/edit Saturday, March 9, 13
  • 15. Using Scales ✦ So far our scale was “coded-in” the visualization ✦ D3 helps us decouple the scale Saturday, March 9, 13
  • 16. Using Scales ✦ The scale function creates a scale var xScale = d3.scale.linear() .domain([0,data.length]) .range([50,500]); ✦ Domain is the input .attr('cx', function(d, i) { ✦ Range is the output return xScale( i ); }) ✦ Basically, it translates FROM domain TO range ✦ https://github.com/ mbostock/d3/wiki/Scales Saturday, March 9, 13
  • 17. Scales Demo http://jsbin.com/iyavef/1/edit Saturday, March 9, 13
  • 18. Show Me The Code ✦ More D3 Demos: ✦ Bar Graph http://jsbin.com/abagiv/1/edit ✦ Color Picker http://jsbin.com/igited/1/edit Saturday, March 9, 13
  • 19. More D3 Features ✦ Built-in visualizations for common SVG shapes Saturday, March 9, 13
  • 20. D3 Charts Original Data Layout SVG Shapes A function Array of Maps values that paints objects from to “shape” using SVG YOUR world values path Saturday, March 9, 13
  • 21. D3 Charts Example var pie_values = [   { y: 10, label: 'foo'}, Your Data   { y: 20, label: 'bar'},   { y: 40, label: 'buz'},   { y: 30, label: 'hss'} ]; Saturday, March 9, 13
  • 22. D3 Charts Example Layout [   {"data":{"y":10,"label":"foo"},"value":10,"startAngle": 5.654866776461628,"endAngle":6.283185307179586},   {"data":{"y":20,"label":"bar"},"value":20,"startAngle": 4.39822971502571,"endAngle":5.654866776461628},   {"data":{"y":40,"label":"buz"},"value":40,"startAngle": 0,"endAngle":2.5132741228718345},   {"data":{"y":30,"label":"hss"},"value":30,"startAngle": 2.5132741228718345,"endAngle":4.39822971502571} ] Saturday, March 9, 13
  • 23. D3 Charts Example ✦ Create a shape with: var arc = d3.svg.arc().outerRadius(150).innerRadius(0); ✦ Now we get: arc(p_data[0]) == "M-88.16778784387098,-121.3525491562421A150,150 0 0,1 -2.7553642961003488e-14,-150L0,0Z" Saturday, March 9, 13
  • 24. Pie Chart Full Demo ✦ http://jsbin.com/usujoq/1/edit Saturday, March 9, 13
  • 25. More Layouts ✦ Partition Layout ✦ Adjacency diagrams ✦ Use with d3.svg.arc Saturday, March 9, 13
  • 26. More Layouts ✦ Cluster Layout ✦ Produces dendograms ✦ Use with d3.svg.diagonal Saturday, March 9, 13
  • 27. More Layouts ✦ Pack Layout ✦ Enclosure diagrams ✦ Plain circles Saturday, March 9, 13
  • 28. More Layouts ✦ Histogram Layout ✦ Splits data to bins ✦ Use with plain rects Saturday, March 9, 13
  • 29. D3 Online ✦ Rich examples gallery: http://static.cybercommons.org/js/d3/ examples/ ✦ D3 wiki: https://github.com/mbostock/d3/wiki Saturday, March 9, 13
  • 30. Thanks For Listening ✦ Ynon Perek ✦ ynon@ynonperek.com ✦ http://ynonperek.com Saturday, March 9, 13