SlideShare a Scribd company logo
1 of 30
Download to read offline
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

More Related Content

What's hot

KIT-601 Lecture Notes-UNIT-1.pdf
KIT-601 Lecture Notes-UNIT-1.pdfKIT-601 Lecture Notes-UNIT-1.pdf
KIT-601 Lecture Notes-UNIT-1.pdfDr. Radhey Shyam
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoDimko Zhluktenko
 
SQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesSQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesOsama Jomaa
 
Azure data factory
Azure data factoryAzure data factory
Azure data factoryDavid Giard
 
Object relational and extended relational databases
Object relational and extended relational databasesObject relational and extended relational databases
Object relational and extended relational databasesSuhad Jihad
 
Tableau Training For Beginners | Tableau Tutorial | Tableau Dashboard | Edureka
Tableau Training For Beginners | Tableau Tutorial  | Tableau Dashboard | EdurekaTableau Training For Beginners | Tableau Tutorial  | Tableau Dashboard | Edureka
Tableau Training For Beginners | Tableau Tutorial | Tableau Dashboard | EdurekaEdureka!
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sqlRam kumar
 
Neo4j Bloom: Data Visualization for Everyone
Neo4j Bloom: Data Visualization for EveryoneNeo4j Bloom: Data Visualization for Everyone
Neo4j Bloom: Data Visualization for EveryoneNeo4j
 
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...Edureka!
 
Core Concepts in azure data factory
Core Concepts in azure data factoryCore Concepts in azure data factory
Core Concepts in azure data factoryBRIJESH KUMAR
 

What's hot (20)

KIT-601 Lecture Notes-UNIT-1.pdf
KIT-601 Lecture Notes-UNIT-1.pdfKIT-601 Lecture Notes-UNIT-1.pdf
KIT-601 Lecture Notes-UNIT-1.pdf
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene Polonichko
 
Apache hive introduction
Apache hive introductionApache hive introduction
Apache hive introduction
 
Session 14 - Hive
Session 14 - HiveSession 14 - Hive
Session 14 - Hive
 
Introduction to Data Engineering
Introduction to Data EngineeringIntroduction to Data Engineering
Introduction to Data Engineering
 
Data engineering
Data engineeringData engineering
Data engineering
 
SQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesSQL vs. NoSQL Databases
SQL vs. NoSQL Databases
 
Apache HBase™
Apache HBase™Apache HBase™
Apache HBase™
 
Azure data factory
Azure data factoryAzure data factory
Azure data factory
 
NoSql
NoSqlNoSql
NoSql
 
Migrating Oracle to PostgreSQL
Migrating Oracle to PostgreSQLMigrating Oracle to PostgreSQL
Migrating Oracle to PostgreSQL
 
Data Engineering Basics
Data Engineering BasicsData Engineering Basics
Data Engineering Basics
 
Apache PIG
Apache PIGApache PIG
Apache PIG
 
Object relational and extended relational databases
Object relational and extended relational databasesObject relational and extended relational databases
Object relational and extended relational databases
 
Tableau Training For Beginners | Tableau Tutorial | Tableau Dashboard | Edureka
Tableau Training For Beginners | Tableau Tutorial  | Tableau Dashboard | EdurekaTableau Training For Beginners | Tableau Tutorial  | Tableau Dashboard | Edureka
Tableau Training For Beginners | Tableau Tutorial | Tableau Dashboard | Edureka
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
 
Neo4j Bloom: Data Visualization for Everyone
Neo4j Bloom: Data Visualization for EveryoneNeo4j Bloom: Data Visualization for Everyone
Neo4j Bloom: Data Visualization for Everyone
 
SSAS Tabular model importance and uses
SSAS  Tabular model importance and usesSSAS  Tabular model importance and uses
SSAS Tabular model importance and uses
 
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...
 
Core Concepts in azure data factory
Core Concepts in azure data factoryCore Concepts in azure data factory
Core Concepts in azure data factory
 

Viewers also liked

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
 
A short introduction of D3js
A short introduction of D3jsA short introduction of D3js
A short introduction of D3jsdreampuf
 
Stochastic Optimization: Solvers and Tools
Stochastic Optimization: Solvers and ToolsStochastic Optimization: Solvers and Tools
Stochastic Optimization: Solvers and ToolsSSA KPI
 
Big Data Introduction to D3
Big Data Introduction to D3Big Data Introduction to D3
Big Data Introduction to D3Vishal Kumar
 

Viewers also liked (6)

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
 
A short introduction of D3js
A short introduction of D3jsA short introduction of D3js
A short introduction of D3js
 
Introduction to D3.js
Introduction to D3.jsIntroduction to D3.js
Introduction to D3.js
 
Stochastic Optimization: Solvers and Tools
Stochastic Optimization: Solvers and ToolsStochastic Optimization: Solvers and Tools
Stochastic Optimization: Solvers and Tools
 
D3 data visualization
D3 data visualizationD3 data visualization
D3 data visualization
 
Big Data Introduction to D3
Big Data Introduction to D3Big Data Introduction to D3
Big Data Introduction to D3
 

Similar to 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 to 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
 

More from 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
 

More from 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
 

Recently uploaded

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 AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Recently uploaded (20)

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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

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