SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Exploring Web
                            Standards for Data
                               Visualization



                               Nicolas Garcia Belmonte

                                         @philogb
Thursday, February 28, 13
Nicolas Garcia Belmonte




                                   @philogb




Thursday, February 28, 13
Why so many standards
                     for Graphics?
                            SVG     WebGL


                            HTML   2D Canvas


                            CSS    JavaScript

Thursday, February 28, 13
What is the right standard
          for my Visualization?
                            SVG     WebGL


                            HTML   2D Canvas


                            CSS    JavaScript

Thursday, February 28, 13
Political Engagement Map




Thursday, February 28, 13
Tweet Histogram            Choropleth Map




              Visual Component




                  # of Elements       Small (~40)               Small (~50)


                                                         Complex: (Concave, Convex,
              Shape Complexity     Simple: (Rectangle)
                                                          Connected, Disconnected)


                     Interactive          Yes                       Yes



               Standard Chosen           HTML                      SVG

Thursday, February 28, 13
HTML / SVG
               Good for a small # of simple-to-complex shaped
                            interactive elements




Thursday, February 28, 13
Mobility Flow in France



                  Per State and County Mobility Data for France




Thursday, February 28, 13
Thursday, February 28, 13
Mobility Flow in France
                  Per State and County Mobility Data for France

                            Visual Component               Choropleth Map


                              # of Elements    Medium/Big: ~40.000. US has only ~3.000.


                                               Complex: (Concave, Convex, Connected,
                            Shape Complexity
                                                          Disconnected)


                               Interactive                       Yes



                            Standard Chosen                       ?




Thursday, February 28, 13
Mobility Flow in France
                            Take 1




                            SVG


Thursday, February 28, 13
Use SVG to render the Map
Thursday, February 28, 13
Failed Attempt




Thursday, February 28, 13
Mobility Flow in France
                                  Take 2




                            2D Canvas / CSS3


Thursday, February 28, 13
Mobility Flow in France
                            Take 2 - 2D Canvas / CSS3


           • Use Layered Images to render the Map

           • Canvas Color Picking for Interaction

           • CSS Transitions / Transforms for Zooming /
             Panning


Thursday, February 28, 13
Mobility Flow in France
                            Canvas / CSS3




Thursday, February 28, 13
Mobility Flow in France
                               Images to render the Map




                     outline             data             picking



Thursday, February 28, 13
Mobility Flow in France
                   Canvas Color Picking for fast Interaction




 Each State and County is assigned a unique (r, g, b, a) tuple.
       We can encode up to 256^4 -1 data elements.
Thursday, February 28, 13
Canvas
                                            An HTML Element
                       <canvas id='map' width='500' height='500'></canvas>


                                       In which you can paste images
                       1    var canvas = document.querySelector('#map'),
                       2        ctx = canvas.getContext('2d'),
                       3        img = new Image();
                       4
                       5    img.src = 'map.jpg';
                       6    img.onload = function() {
                       7       ctx.drawImage(img, 0, 0);
                       8    };



                                         And then retrieve it’s pixels
                  var pixelArray = ctx.getImageData(0, 0, width, height);



Thursday, February 28, 13
2D Canvas Color Picking for fast Interaction
                            Offline: Encode index to county data array in colors
                     3 counties.forEach(function(county, i) {
                     4   var r = i % 256,
                     5       g = ((i / 256) >>> 0) % 256,
                     6       b = ((i / (256 * 256)) >>> 0) % 256;
                     7
                     8   county.setAttribute('fill', 'rgb(' + r + ',' + g + ',' + b + ')');
                     9 });




                                 Online: Decode RGB color to array index
                               1 //decode index from image
                               2 function getCounty(canvas, counties, x, y) {
                               3   var imageData = canvas.getImageData(),
                               4     width = imageData.width,
                               5     data = imageData.data,
                               6     index = (x + y * width) * 4, //RGBA components
                               7     r = data[index],
                               8     g = data[index + 1],
                               9     b = data[index + 2],
                              10     i = r + (g + b * 256) * 256;
                              11
                              12   return counties[i];
                              13 }


Thursday, February 28, 13
CSS3 for Zooming
                                   CSS transition definition
                             1 .maps {
                             2   transition: transform ease-out 500ms;
                             3 }
                             4



                              Set CSS transform via JavaScript
2 var style = map.style;
3 style.transform = 'translate(' + dx + 'px,' + dy + 'px) scale(' + s + ')';




Thursday, February 28, 13
Mobility Flow in France
                            CSS Transitions for Zooming




          • Not good for synchronized / responsive animations
          • GPU compositing messes up images when scaling
Thursday, February 28, 13
Almost had it...




Thursday, February 28, 13
Mobility Flow in France
                            WebGL

     •Same image tile principle
     •More control on animations
     •More control on GPU management

Thursday, February 28, 13
WebGL
Thursday, February 28, 13
How does WebGL work?
                                       ...and why is it so fast?

                                                     JavaScript


                            WebGL JS API

                            GLSL API               Vertex Shader




                            GLSL API              Fragment Shader




Thursday, February 28, 13
How does WebGL work?
                            The 3D scene




                                      image source: http://computer.yourdictionary.com/graphics

Thursday, February 28, 13
How does WebGL Scale?
                            Examples using PhiloGL




Thursday, February 28, 13
Thursday, February 28, 13
Data Facts
                            • 1200 weather stations
                            • 72 hours of data
                            • 5 variables - latitude, longitude, speed &
                              wind direction, temperature


                               = 460.000 items
Thursday, February 28, 13
Thursday, February 28, 13
Going 3D




Thursday, February 28, 13
  //Create application
       PhiloGL('canvasId', {
         program: {
           from: 'uris',
           vs: 'shader.vs.glsl',
                                       WebGL / PhiloGL
           fs: 'shader.fs.glsl'
         },                                            Rendering
         camera: {
           position: {
             x: 0, y: 0, z: -50
           }
         },
         textures: {
           src: ['arroway.jpg', 'earth.jpg']
         },
         events: {
           onDragMove: function(e) {
             //do things...
           },
           onMouseWheel: function(e) {
             //do things...
           }
         },
         onError: function() {
           alert("There was an error creating the app.");
         },
         onLoad: function(app) {
           /* Do things here */
         }
       });
Thursday, February 28, 13
When choosing a Standard for
                    your Viz you could start by
                      asking yourself about...
                            # of Elements             Small, Large

                    Shape Complexity               Simple, Complex

                             Interaction                Yes, No

                             Animation                  Yes, No

                            Compatibility   Desktop, Mobile, Browsers, etc.

                              Libraries            d3js, three.js, etc.
Thursday, February 28, 13
Thanks
                                @philogb

                            http://philogb.github.com/




Thursday, February 28, 13

Weitere ähnliche Inhalte

Andere mochten auch

JavaScript InfoVis Toolkit Overview
JavaScript InfoVis Toolkit OverviewJavaScript InfoVis Toolkit Overview
JavaScript InfoVis Toolkit Overviewphilogb
 
IAB UK Digital Britain: UNICEF UK and IgnitionOne Integrated Marketing
IAB UK Digital Britain: UNICEF UK and IgnitionOne Integrated MarketingIAB UK Digital Britain: UNICEF UK and IgnitionOne Integrated Marketing
IAB UK Digital Britain: UNICEF UK and IgnitionOne Integrated MarketingIgnitionOne
 
InfoVis para la Web: Teoria, Herramientas y Ejemplos.
InfoVis para la Web: Teoria, Herramientas y Ejemplos.InfoVis para la Web: Teoria, Herramientas y Ejemplos.
InfoVis para la Web: Teoria, Herramientas y Ejemplos.philogb
 
JavaScript InfoVis Toolkit - Create interactive data visualizations for the web
JavaScript InfoVis Toolkit - Create interactive data visualizations for the webJavaScript InfoVis Toolkit - Create interactive data visualizations for the web
JavaScript InfoVis Toolkit - Create interactive data visualizations for the webphilogb
 
Nuevas herramientas de visualizacion en JavaScript
Nuevas herramientas de visualizacion en JavaScript Nuevas herramientas de visualizacion en JavaScript
Nuevas herramientas de visualizacion en JavaScript philogb
 
#interactives at Twitter
#interactives at Twitter#interactives at Twitter
#interactives at Twitterphilogb
 
Data visualization for the web
Data visualization for the webData visualization for the web
Data visualization for the webphilogb
 
Hacking public-facing data visualizations at Twitter
Hacking public-facing data visualizations at TwitterHacking public-facing data visualizations at Twitter
Hacking public-facing data visualizations at Twitterphilogb
 
From Data Journalism to Data Illustration - Visualizing Data with JavaScript ...
From Data Journalism to Data Illustration - Visualizing Data with JavaScript ...From Data Journalism to Data Illustration - Visualizing Data with JavaScript ...
From Data Journalism to Data Illustration - Visualizing Data with JavaScript ...philogb
 
JavaScript para Graficos y Visualizacion de Datos - BogotaJS
JavaScript para Graficos y Visualizacion de Datos - BogotaJSJavaScript para Graficos y Visualizacion de Datos - BogotaJS
JavaScript para Graficos y Visualizacion de Datos - BogotaJSphilogb
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Webphilogb
 
Principles of Analytical Design - Visually Meetup - Sept. 2011
Principles of Analytical Design - Visually Meetup - Sept. 2011Principles of Analytical Design - Visually Meetup - Sept. 2011
Principles of Analytical Design - Visually Meetup - Sept. 2011philogb
 
New Tools for Visualization in JavaScript - Sept. 2011
New Tools for Visualization in JavaScript - Sept. 2011New Tools for Visualization in JavaScript - Sept. 2011
New Tools for Visualization in JavaScript - Sept. 2011philogb
 

Andere mochten auch (13)

JavaScript InfoVis Toolkit Overview
JavaScript InfoVis Toolkit OverviewJavaScript InfoVis Toolkit Overview
JavaScript InfoVis Toolkit Overview
 
IAB UK Digital Britain: UNICEF UK and IgnitionOne Integrated Marketing
IAB UK Digital Britain: UNICEF UK and IgnitionOne Integrated MarketingIAB UK Digital Britain: UNICEF UK and IgnitionOne Integrated Marketing
IAB UK Digital Britain: UNICEF UK and IgnitionOne Integrated Marketing
 
InfoVis para la Web: Teoria, Herramientas y Ejemplos.
InfoVis para la Web: Teoria, Herramientas y Ejemplos.InfoVis para la Web: Teoria, Herramientas y Ejemplos.
InfoVis para la Web: Teoria, Herramientas y Ejemplos.
 
JavaScript InfoVis Toolkit - Create interactive data visualizations for the web
JavaScript InfoVis Toolkit - Create interactive data visualizations for the webJavaScript InfoVis Toolkit - Create interactive data visualizations for the web
JavaScript InfoVis Toolkit - Create interactive data visualizations for the web
 
Nuevas herramientas de visualizacion en JavaScript
Nuevas herramientas de visualizacion en JavaScript Nuevas herramientas de visualizacion en JavaScript
Nuevas herramientas de visualizacion en JavaScript
 
#interactives at Twitter
#interactives at Twitter#interactives at Twitter
#interactives at Twitter
 
Data visualization for the web
Data visualization for the webData visualization for the web
Data visualization for the web
 
Hacking public-facing data visualizations at Twitter
Hacking public-facing data visualizations at TwitterHacking public-facing data visualizations at Twitter
Hacking public-facing data visualizations at Twitter
 
From Data Journalism to Data Illustration - Visualizing Data with JavaScript ...
From Data Journalism to Data Illustration - Visualizing Data with JavaScript ...From Data Journalism to Data Illustration - Visualizing Data with JavaScript ...
From Data Journalism to Data Illustration - Visualizing Data with JavaScript ...
 
JavaScript para Graficos y Visualizacion de Datos - BogotaJS
JavaScript para Graficos y Visualizacion de Datos - BogotaJSJavaScript para Graficos y Visualizacion de Datos - BogotaJS
JavaScript para Graficos y Visualizacion de Datos - BogotaJS
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
 
Principles of Analytical Design - Visually Meetup - Sept. 2011
Principles of Analytical Design - Visually Meetup - Sept. 2011Principles of Analytical Design - Visually Meetup - Sept. 2011
Principles of Analytical Design - Visually Meetup - Sept. 2011
 
New Tools for Visualization in JavaScript - Sept. 2011
New Tools for Visualization in JavaScript - Sept. 2011New Tools for Visualization in JavaScript - Sept. 2011
New Tools for Visualization in JavaScript - Sept. 2011
 

Ähnlich wie Exploring Web standards for data visualization

Rendering of Complex 3D Treemaps (GRAPP 2013)
Rendering of Complex 3D Treemaps (GRAPP 2013)Rendering of Complex 3D Treemaps (GRAPP 2013)
Rendering of Complex 3D Treemaps (GRAPP 2013)Matthias Trapp
 
Concepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into MapsConcepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into MapsMohammad Liton Hossain
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceOSCON Byrum
 
D3 Mapping Visualization
D3 Mapping VisualizationD3 Mapping Visualization
D3 Mapping VisualizationSudhir Chowbina
 
Mapping For Sharepoint T11 Peter Smith
Mapping For Sharepoint T11 Peter SmithMapping For Sharepoint T11 Peter Smith
Mapping For Sharepoint T11 Peter SmithSpatialSmith
 
Tilemill gwu-wboykinm
Tilemill gwu-wboykinmTilemill gwu-wboykinm
Tilemill gwu-wboykinmBill Morris
 
Visualization of Big Data in Web Apps
Visualization of Big Data in Web AppsVisualization of Big Data in Web Apps
Visualization of Big Data in Web AppsEPAM
 
Adding where to your ruby apps
Adding where to your ruby appsAdding where to your ruby apps
Adding where to your ruby appsRoberto Pepato
 
FME World Tour 2015 - Around the World - Ken Bragg
FME World Tour 2015 - Around the World - Ken BraggFME World Tour 2015 - Around the World - Ken Bragg
FME World Tour 2015 - Around the World - Ken BraggIMGS
 
Brewing the Ultimate Data Fusion
Brewing the Ultimate Data FusionBrewing the Ultimate Data Fusion
Brewing the Ultimate Data FusionSafe Software
 
EU SatCen Workflow Automation for Data
EU SatCen Workflow Automation for DataEU SatCen Workflow Automation for Data
EU SatCen Workflow Automation for DataSafe Software
 
Hacking the Kinect with GAFFTA Day 3
Hacking the Kinect with GAFFTA Day 3Hacking the Kinect with GAFFTA Day 3
Hacking the Kinect with GAFFTA Day 3benDesigning
 
Resolution Independent 2D Cartoon Video Conversion
Resolution Independent 2D Cartoon Video ConversionResolution Independent 2D Cartoon Video Conversion
Resolution Independent 2D Cartoon Video ConversionEswar Publications
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Patrick Chanezon
 
Web visualization of complex reality-based 3D models with Nubes
Web visualization of complex reality-based 3D models with NubesWeb visualization of complex reality-based 3D models with Nubes
Web visualization of complex reality-based 3D models with Nubes3D ICONS Project
 
FITC 2013 - The Technical Learning Curve
FITC 2013 - The Technical Learning CurveFITC 2013 - The Technical Learning Curve
FITC 2013 - The Technical Learning CurveLittle Miss Robot
 
The Visualization Pipeline
The Visualization PipelineThe Visualization Pipeline
The Visualization PipelineTheo Santana
 
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
Stockage, manipulation et analyse de données matricielles avec PostGIS RasterStockage, manipulation et analyse de données matricielles avec PostGIS Raster
Stockage, manipulation et analyse de données matricielles avec PostGIS RasterACSG Section Montréal
 

Ähnlich wie Exploring Web standards for data visualization (20)

Rendering of Complex 3D Treemaps (GRAPP 2013)
Rendering of Complex 3D Treemaps (GRAPP 2013)Rendering of Complex 3D Treemaps (GRAPP 2013)
Rendering of Complex 3D Treemaps (GRAPP 2013)
 
Seeing Like Software
Seeing Like SoftwareSeeing Like Software
Seeing Like Software
 
Concepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into MapsConcepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into Maps
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
 
D3 Mapping Visualization
D3 Mapping VisualizationD3 Mapping Visualization
D3 Mapping Visualization
 
Mapping For Sharepoint T11 Peter Smith
Mapping For Sharepoint T11 Peter SmithMapping For Sharepoint T11 Peter Smith
Mapping For Sharepoint T11 Peter Smith
 
Tilemill gwu-wboykinm
Tilemill gwu-wboykinmTilemill gwu-wboykinm
Tilemill gwu-wboykinm
 
Visualization of Big Data in Web Apps
Visualization of Big Data in Web AppsVisualization of Big Data in Web Apps
Visualization of Big Data in Web Apps
 
Adding where to your ruby apps
Adding where to your ruby appsAdding where to your ruby apps
Adding where to your ruby apps
 
FME World Tour 2015 - Around the World - Ken Bragg
FME World Tour 2015 - Around the World - Ken BraggFME World Tour 2015 - Around the World - Ken Bragg
FME World Tour 2015 - Around the World - Ken Bragg
 
Brewing the Ultimate Data Fusion
Brewing the Ultimate Data FusionBrewing the Ultimate Data Fusion
Brewing the Ultimate Data Fusion
 
EU SatCen Workflow Automation for Data
EU SatCen Workflow Automation for DataEU SatCen Workflow Automation for Data
EU SatCen Workflow Automation for Data
 
Hacking the Kinect with GAFFTA Day 3
Hacking the Kinect with GAFFTA Day 3Hacking the Kinect with GAFFTA Day 3
Hacking the Kinect with GAFFTA Day 3
 
Resolution Independent 2D Cartoon Video Conversion
Resolution Independent 2D Cartoon Video ConversionResolution Independent 2D Cartoon Video Conversion
Resolution Independent 2D Cartoon Video Conversion
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
 
Web visualization of complex reality-based 3D models with Nubes
Web visualization of complex reality-based 3D models with NubesWeb visualization of complex reality-based 3D models with Nubes
Web visualization of complex reality-based 3D models with Nubes
 
FITC 2013 - The Technical Learning Curve
FITC 2013 - The Technical Learning CurveFITC 2013 - The Technical Learning Curve
FITC 2013 - The Technical Learning Curve
 
Resume_update_2015
Resume_update_2015Resume_update_2015
Resume_update_2015
 
The Visualization Pipeline
The Visualization PipelineThe Visualization Pipeline
The Visualization Pipeline
 
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
Stockage, manipulation et analyse de données matricielles avec PostGIS RasterStockage, manipulation et analyse de données matricielles avec PostGIS Raster
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
 

Kürzlich hochgeladen

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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
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
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
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
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
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
 

Kürzlich hochgeladen (20)

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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
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
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
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
 

Exploring Web standards for data visualization

  • 1. Exploring Web Standards for Data Visualization Nicolas Garcia Belmonte @philogb Thursday, February 28, 13
  • 2. Nicolas Garcia Belmonte @philogb Thursday, February 28, 13
  • 3. Why so many standards for Graphics? SVG WebGL HTML 2D Canvas CSS JavaScript Thursday, February 28, 13
  • 4. What is the right standard for my Visualization? SVG WebGL HTML 2D Canvas CSS JavaScript Thursday, February 28, 13
  • 6. Tweet Histogram Choropleth Map Visual Component # of Elements Small (~40) Small (~50) Complex: (Concave, Convex, Shape Complexity Simple: (Rectangle) Connected, Disconnected) Interactive Yes Yes Standard Chosen HTML SVG Thursday, February 28, 13
  • 7. HTML / SVG Good for a small # of simple-to-complex shaped interactive elements Thursday, February 28, 13
  • 8. Mobility Flow in France Per State and County Mobility Data for France Thursday, February 28, 13
  • 10. Mobility Flow in France Per State and County Mobility Data for France Visual Component Choropleth Map # of Elements Medium/Big: ~40.000. US has only ~3.000. Complex: (Concave, Convex, Connected, Shape Complexity Disconnected) Interactive Yes Standard Chosen ? Thursday, February 28, 13
  • 11. Mobility Flow in France Take 1 SVG Thursday, February 28, 13
  • 12. Use SVG to render the Map Thursday, February 28, 13
  • 14. Mobility Flow in France Take 2 2D Canvas / CSS3 Thursday, February 28, 13
  • 15. Mobility Flow in France Take 2 - 2D Canvas / CSS3 • Use Layered Images to render the Map • Canvas Color Picking for Interaction • CSS Transitions / Transforms for Zooming / Panning Thursday, February 28, 13
  • 16. Mobility Flow in France Canvas / CSS3 Thursday, February 28, 13
  • 17. Mobility Flow in France Images to render the Map outline data picking Thursday, February 28, 13
  • 18. Mobility Flow in France Canvas Color Picking for fast Interaction Each State and County is assigned a unique (r, g, b, a) tuple. We can encode up to 256^4 -1 data elements. Thursday, February 28, 13
  • 19. Canvas An HTML Element <canvas id='map' width='500' height='500'></canvas> In which you can paste images 1 var canvas = document.querySelector('#map'), 2 ctx = canvas.getContext('2d'), 3 img = new Image(); 4 5 img.src = 'map.jpg'; 6 img.onload = function() { 7 ctx.drawImage(img, 0, 0); 8 }; And then retrieve it’s pixels var pixelArray = ctx.getImageData(0, 0, width, height); Thursday, February 28, 13
  • 20. 2D Canvas Color Picking for fast Interaction Offline: Encode index to county data array in colors 3 counties.forEach(function(county, i) { 4 var r = i % 256, 5 g = ((i / 256) >>> 0) % 256, 6 b = ((i / (256 * 256)) >>> 0) % 256; 7 8 county.setAttribute('fill', 'rgb(' + r + ',' + g + ',' + b + ')'); 9 }); Online: Decode RGB color to array index 1 //decode index from image 2 function getCounty(canvas, counties, x, y) { 3 var imageData = canvas.getImageData(), 4 width = imageData.width, 5 data = imageData.data, 6 index = (x + y * width) * 4, //RGBA components 7 r = data[index], 8 g = data[index + 1], 9 b = data[index + 2], 10 i = r + (g + b * 256) * 256; 11 12 return counties[i]; 13 } Thursday, February 28, 13
  • 21. CSS3 for Zooming CSS transition definition 1 .maps { 2 transition: transform ease-out 500ms; 3 } 4 Set CSS transform via JavaScript 2 var style = map.style; 3 style.transform = 'translate(' + dx + 'px,' + dy + 'px) scale(' + s + ')'; Thursday, February 28, 13
  • 22. Mobility Flow in France CSS Transitions for Zooming • Not good for synchronized / responsive animations • GPU compositing messes up images when scaling Thursday, February 28, 13
  • 23. Almost had it... Thursday, February 28, 13
  • 24. Mobility Flow in France WebGL •Same image tile principle •More control on animations •More control on GPU management Thursday, February 28, 13
  • 26. How does WebGL work? ...and why is it so fast? JavaScript WebGL JS API GLSL API Vertex Shader GLSL API Fragment Shader Thursday, February 28, 13
  • 27. How does WebGL work? The 3D scene image source: http://computer.yourdictionary.com/graphics Thursday, February 28, 13
  • 28. How does WebGL Scale? Examples using PhiloGL Thursday, February 28, 13
  • 30. Data Facts • 1200 weather stations • 72 hours of data • 5 variables - latitude, longitude, speed & wind direction, temperature = 460.000 items Thursday, February 28, 13
  • 33.   //Create application   PhiloGL('canvasId', {     program: {       from: 'uris',       vs: 'shader.vs.glsl', WebGL / PhiloGL       fs: 'shader.fs.glsl'     }, Rendering     camera: {       position: {         x: 0, y: 0, z: -50       }     },     textures: {       src: ['arroway.jpg', 'earth.jpg']     },     events: {       onDragMove: function(e) {         //do things...       },       onMouseWheel: function(e) {         //do things...       }     },     onError: function() {       alert("There was an error creating the app.");     },     onLoad: function(app) {       /* Do things here */     }   }); Thursday, February 28, 13
  • 34. When choosing a Standard for your Viz you could start by asking yourself about... # of Elements Small, Large Shape Complexity Simple, Complex Interaction Yes, No Animation Yes, No Compatibility Desktop, Mobile, Browsers, etc. Libraries d3js, three.js, etc. Thursday, February 28, 13
  • 35. Thanks @philogb http://philogb.github.com/ Thursday, February 28, 13