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

Seminar Presentation Hadoop
Seminar Presentation HadoopSeminar Presentation Hadoop
Seminar Presentation HadoopVarun Narang
 
Big Data and the Cloud a Best Friend Story
Big Data and the Cloud a Best Friend StoryBig Data and the Cloud a Best Friend Story
Big Data and the Cloud a Best Friend StoryAmazon Web Services
 
Intro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesIntro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesNeo4j
 
Bootstrap seminar presentation
Bootstrap seminar presentationBootstrap seminar presentation
Bootstrap seminar presentationPratikDoiphode1
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design Mindy McAdams
 
Tailwind: The Future of CSS is Here!
Tailwind: The Future of CSS is Here!Tailwind: The Future of CSS is Here!
Tailwind: The Future of CSS is Here!Abdullah Al Mahi
 
Introduction to PySpark
Introduction to PySparkIntroduction to PySpark
Introduction to PySparkRussell Jurney
 
Web Design
Web DesignWeb Design
Web Designmisterel
 
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...Simplilearn
 
Geo server 성능향상을 위한 튜닝 기법 20111028
Geo server 성능향상을 위한 튜닝 기법 20111028Geo server 성능향상을 위한 튜닝 기법 20111028
Geo server 성능향상을 위한 튜닝 기법 20111028BJ Jang
 
Introduction to Azure Databricks
Introduction to Azure DatabricksIntroduction to Azure Databricks
Introduction to Azure DatabricksJames Serra
 
Emerging 3D Scanning Technologies for PropTech
Emerging 3D Scanning Technologies for PropTechEmerging 3D Scanning Technologies for PropTech
Emerging 3D Scanning Technologies for PropTechPetteriTeikariPhD
 
Design your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDBDesign your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDBLuca Garulli
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정BJ Jang
 
Tailwind CSS - KanpurJS
Tailwind CSS - KanpurJSTailwind CSS - KanpurJS
Tailwind CSS - KanpurJSNaveen Kharwar
 
Using GeoServer for spatio-temporal data management with examples for MetOc a...
Using GeoServer for spatio-temporal data management with examples for MetOc a...Using GeoServer for spatio-temporal data management with examples for MetOc a...
Using GeoServer for spatio-temporal data management with examples for MetOc a...GeoSolutions
 
Tableau desktop & server
Tableau desktop & serverTableau desktop & server
Tableau desktop & serverChris Raby
 

What's hot (20)

Seminar Presentation Hadoop
Seminar Presentation HadoopSeminar Presentation Hadoop
Seminar Presentation Hadoop
 
Big Data and the Cloud a Best Friend Story
Big Data and the Cloud a Best Friend StoryBig Data and the Cloud a Best Friend Story
Big Data and the Cloud a Best Friend Story
 
Intro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesIntro to Neo4j and Graph Databases
Intro to Neo4j and Graph Databases
 
Bootstrap seminar presentation
Bootstrap seminar presentationBootstrap seminar presentation
Bootstrap seminar presentation
 
Css animation
Css animationCss animation
Css animation
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design
 
En 20 minutos ...Control de Cambios de la BD con Liquibase
En 20 minutos ...Control de Cambios de la BD con LiquibaseEn 20 minutos ...Control de Cambios de la BD con Liquibase
En 20 minutos ...Control de Cambios de la BD con Liquibase
 
Tailwind: The Future of CSS is Here!
Tailwind: The Future of CSS is Here!Tailwind: The Future of CSS is Here!
Tailwind: The Future of CSS is Here!
 
Introduction to PySpark
Introduction to PySparkIntroduction to PySpark
Introduction to PySpark
 
Web Design
Web DesignWeb Design
Web Design
 
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
 
Geo server 성능향상을 위한 튜닝 기법 20111028
Geo server 성능향상을 위한 튜닝 기법 20111028Geo server 성능향상을 위한 튜닝 기법 20111028
Geo server 성능향상을 위한 튜닝 기법 20111028
 
Introduction to Azure Databricks
Introduction to Azure DatabricksIntroduction to Azure Databricks
Introduction to Azure Databricks
 
Emerging 3D Scanning Technologies for PropTech
Emerging 3D Scanning Technologies for PropTechEmerging 3D Scanning Technologies for PropTech
Emerging 3D Scanning Technologies for PropTech
 
Design your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDBDesign your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDB
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정
 
Tailwind CSS - KanpurJS
Tailwind CSS - KanpurJSTailwind CSS - KanpurJS
Tailwind CSS - KanpurJS
 
Big data and Hadoop
Big data and HadoopBig data and Hadoop
Big data and Hadoop
 
Using GeoServer for spatio-temporal data management with examples for MetOc a...
Using GeoServer for spatio-temporal data management with examples for MetOc a...Using GeoServer for spatio-temporal data management with examples for MetOc a...
Using GeoServer for spatio-temporal data management with examples for MetOc a...
 
Tableau desktop & server
Tableau desktop & serverTableau desktop & server
Tableau desktop & server
 

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
 
Introduction to data visualisation with D3
Introduction to data visualisation with D3Introduction to data visualisation with D3
Introduction to data visualisation with D3Aleksander Fabijan
 
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
 
Introduction to data visualisation with D3
Introduction to data visualisation with D3Introduction to data visualisation with D3
Introduction to data visualisation with D3
 
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
 

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

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

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