SlideShare ist ein Scribd-Unternehmen logo
1 von 59
Downloaden Sie, um offline zu lesen
Data Visualization
                            Fundamentals



                                                    Source: US Census
                                                    Renderer: Many Eyes
                                                    Created: 12/8/2012




                              by Daniel Greenfeld             @pydanny
Saturday, December 8, 12
@pydanny
                             • Learned Data Visualization at
                               NASA
                             • Principal at Cartwheel Web
                             • Author of pydanny.com, a
                               popular technology blog
                             • Entrepreneur and CTO

                                                         @pydanny
Saturday, December 8, 12
Helping tomorrow!

                            I’ll be there to help, so ask away!

                    Or email me at pydanny@cartwheelweb.com



                                                                  @pydanny
Saturday, December 8, 12
Tools covered

      •      Many Eyes                   No coding



      • Google Charts                   Some coding



      • D3.js                       Need a developer


                                                     @pydanny
Saturday, December 8, 12
Many Eyes
                            bit.ly/many-eyes


                                               @pydanny
Saturday, December 8, 12
Many Eyes




                           bit.ly/many-eyes
                                              @pydanny
Saturday, December 8, 12
Many Eyes
                           Pros:
                           • Great for rapid visualizations
                           • Free service provided by IBM.
                           • All data posted is freely available.
                           • Generates accessible content.

                                                                    @pydanny
Saturday, December 8, 12
Many Eyes
                       Cons:
                           • Closed source - IBM can shut it down.
                           • All data posted is freely available.
                           • Uses Java applets to present data.


                                                                     @pydanny
Saturday, December 8, 12
Using Many Eyes
                            1. Go to bit.ly/many-eyes
                            2. Sign up with your email
                            3. Upload some data
                            4. Create a visualization


                              Let’s try it out!

                                                         @pydanny
Saturday, December 8, 12
Many Eyes




                           bit.ly/many-eyes   @pydanny
Saturday, December 8, 12
Signing Up I

                                         Click ‘login’




                           bit.ly/many-eyes              @pydanny
Saturday, December 8, 12
Signing Up II




                                   Click ‘register’


                                                      @pydanny
Saturday, December 8, 12
Signup III



                                   Email and
                                    Captcha




                                               @pydanny
Saturday, December 8, 12
Follow emailed
                            instructions

                Talk to me afterwards if you have any problems.




                                                                  @pydanny
Saturday, December 8, 12
What data to use?

                    • Many Eyes has a lot of free data on it.
                    • I want a new report.
                    • On data that I generated.

                                                                @pydanny
Saturday, December 8, 12
Example I
                    • I run a site called
                    • I want to know how many of each pet type
                           is registered.




                                                                 @pydanny
Saturday, December 8, 12
Example I Data Prep

                           • I exported the data from         to CSV.


                           • Opened the            CSV with Excel




                                                                    @pydanny
Saturday, December 8, 12
Uploading Data I



                                         Copy/paste
                                          from your
                                         spreadsheet


                                                   @pydanny
Saturday, December 8, 12
Uploading Data II
                                Copy/pasted from Excel




                                                    Many Eyes
                                                  interpretation
                                                    of my data
                                                             @pydanny
Saturday, December 8, 12
Upload saved!


                                       Visualize!




                                                    @pydanny
Saturday, December 8, 12
Choosing Visualizations
                    • Analyze Text
                    • Compare a set of values
                    • See relationships among data points
                    • See the parts of a whole
                    • See the world
                    • Track rises and falls over time
                                                            @pydanny
Saturday, December 8, 12
Choosing Visualizations
                    •      Analyze Text               Bar/Bubble
                                                        charts
                    • Compare a set of values
                    • See relationships among data points
                    • See the parts of a whole
                                                       Pie Charts
                    • See the world
                    • Track rises and falls over time
                                                                    @pydanny
Saturday, December 8, 12
Bar Chart




                                       @pydanny
Saturday, December 8, 12
Bubble Chart




                                          @pydanny
Saturday, December 8, 12
Pie Chart




                                       @pydanny
Saturday, December 8, 12
Easy Conclusions

                    • Dogs are clearly the most popular pet
                    • Cats come second
                    • Birds, Fish, Rabbits are roughly the same

                                                                  @pydanny
Saturday, December 8, 12
Many Eyes
                            Text Analysis


                                            @pydanny
Saturday, December 8, 12
Example II

                    • I built a site called
                    • I want to do some text analysis.



                                                         @pydanny
Saturday, December 8, 12
Scraping Text


                                                copy/paste
                                               with explicit
                                              permission of
                                             site and author



                            http://bit.ly/WPfEde               @pydanny
Saturday, December 8, 12
Upload the Data




                                             @pydanny
Saturday, December 8, 12
Word Tree

            Click for
           better view




                           Warning: Dependent on java applets


                                                                @pydanny
Saturday, December 8, 12
Tag Cloud




              http://www.niemanlab.org/2011/10/word-clouds-considered-harmful/
                                                                                 @pydanny
Saturday, December 8, 12
Word Cloud




                                        @pydanny
Saturday, December 8, 12
Many Eyes
                            Geo Analysis


                                           @pydanny
Saturday, December 8, 12
Example III
                    • I’m the CTO of
                    • We want to share information about
                           people moving.




                                                           @pydanny
Saturday, December 8, 12
Prep the data


                    • Export to CSV
                    • Open with Excel


                                            @pydanny
Saturday, December 8, 12
Upload the Data




                                             @pydanny
Saturday, December 8, 12
Choose Visualization




                                                  @pydanny
Saturday, December 8, 12
Destinations




                                          @pydanny
Saturday, December 8, 12
Google
                           Charts

                                    @pydanny
Saturday, December 8, 12
Google Charts Boot Camp




     https://developers.google.com/chart/
                                                     @pydanny
Saturday, December 8, 12
Google Charts
                Pros
                    • Free for many use cases
                    • Customizable skins and themes
                    • Relatively easy to use
                    • Really good documentation
                    • Bootcamp coming up!
                                                      @pydanny
Saturday, December 8, 12
Google Charts
              Cons

                    • Closed source - Google can change terms
                    • You have to know a little code.
                    • You won’t need much of my help!

                                                                @pydanny
Saturday, December 8, 12
D3.js

                                   @pydanny
Saturday, December 8, 12
D3.js example I




                           http://nyti.ms/SN5mfh
                    Four Ways to Slice Obama’s Budget Proposal
                                                                 @pydanny
Saturday, December 8, 12
D3.js example II




                     http://www.isbarackobamathepresident.com/   @pydanny
Saturday, December 8, 12
D3.js
                Pros

                    • Open source! (source code on Github)
                    • W3C Standard Friendly
                    • Unbelievable power
                    • Killer examples
                    • Can use the same CSVs as Many-Eyes
                                                             @pydanny
Saturday, December 8, 12
D3.js
              Cons


                    • You will need a developer
                    • Very steep learning curve


                                                  @pydanny
Saturday, December 8, 12
Warning
                            code ahead!




                                          @pydanny
Saturday, December 8, 12
JQuery-like selectors


                            d3.selectAll("p").style("color", "white");




                                                                         @pydanny
Saturday, December 8, 12
Dynamic Properties
                   d3.selectAll("p").style("color", function() {
                     return "hsl(" + Math.random() * 360 + ",100%,50%)";
                   });




                    d3.selectAll("p").style("color", function(d, i) {
                      return i % 2 ? "#fff" : "#eee";
                    });




                                                                           @pydanny
Saturday, December 8, 12
Loading Data
                   d3.json("census.json", function(error, data){}
                       // Do logic here
                   });


                   d3.csv("pets.csv", function(error, data){}
                       // Do logic here
                   });


                   d3.tsv("immigrants.tsv", function(error, data){}
                       // Do logic here
                   });


                            Supports JSON, CSV, and TSV.
                                                                      @pydanny
Saturday, December 8, 12
Data Binding
                                                     Binds values to
                                                       the first six
                                                       paragraphs
                           d3.selectAll("p")
                               .data([4, 8, 15, 16, 23, 42])
                               .style("font-size", function(d) {
                                  return d + "px"; }
                                  );

                                            Sets font-size
                                             per bound
                                             paragraph


                                                                       @pydanny
Saturday, December 8, 12
Entering Data
                           var p = d3.select("body").selectAll("p")
                               .data([4, 8, 15, 16, 23, 42])
                               .text(String);


                           p.enter().append("p")
                               .text(String);
                                                      If less than six
                                                     paragraphs, then
                                                    add until six exist.



                            Create nodes for incoming data
                                                                           @pydanny
Saturday, December 8, 12
Exiting Data
                           var p = d3.select("body").selectAll("p")
                               .data([4, 8, 15, 16, 23, 42])
                               .text(String);


                           p.enter().append("p")
                               .text(String);


                           p.exit().remove();
                                                    Remove extra
                                                       nodes



                              Cleaning up your workspace
                                                                      @pydanny
Saturday, December 8, 12
Transitions
                           d3.select("body").transition()
                               .style("background-color", "black");




                                                                      @pydanny
Saturday, December 8, 12
Build on Web-Standards

                    • Creates SVG images on the fly
                    • No Java or Flash needed
                    • Works on modern browsers
                    • Easy to debug with browser inspectors

                                                              @pydanny
Saturday, December 8, 12
Requires Javascript skill
                                  var m = [20, 120, 20, 120],
                                      w = 1280 - m[1] - m[3],
                                      h = 800 - m[0] - m[2],
                                      i = 0,
                                      root;

                                  var tree = d3.layout.tree()
                                      .size([h, w]);

                                  var diagonal = d3.svg.diagonal()
                                      .projection(function(d) { return [d.y, d.x]; });

                                  var vis = d3.select("#body").append("svg:svg")
                                      .attr("width", w + m[1] + m[3])
                                      .attr("height", h + m[0] + m[2])
                                    .append("svg:g")
                                      .attr("transform", "translate(" + m[3] + "," + m[0]

                                  d3.json("flare.json", function(json) {
                                    root = json;
                                    root.x0 = h / 2;
                                    root.y0 = 0;

                                    function toggleAll(d) {
                                      if (d.children) {
                                        d.children.forEach(toggleAll);
                                        toggle(d);
                                      }


       Remember the Many-Eyes
                                    }

                                    // Initialize the display to show a few nodes.


         version of this data.
                                    root.children.forEach(toggleAll);
                                    toggle(root.children[1]);
                                    toggle(root.children[1].children[2]);
                                    toggle(root.children[9]);
                                    toggle(root.children[9].children[0]);
                                                                            @pydanny
Saturday, December 8, 12            update(root);
Thank you!


                                        @pydanny
Saturday, December 8, 12

Weitere ähnliche Inhalte

Andere mochten auch

Lighting talk on django-social-auth
Lighting talk on django-social-authLighting talk on django-social-auth
Lighting talk on django-social-authDaniel Greenfeld
 
Round pegs and square holes
Round pegs and square holesRound pegs and square holes
Round pegs and square holesDaniel Greenfeld
 
An Extreme Talk about the Zen of Python
An Extreme Talk about the Zen of PythonAn Extreme Talk about the Zen of Python
An Extreme Talk about the Zen of PythonDaniel Greenfeld
 
Python Programming Essentials - M34 - List Comprehensions
Python Programming Essentials - M34 - List ComprehensionsPython Programming Essentials - M34 - List Comprehensions
Python Programming Essentials - M34 - List ComprehensionsP3 InfoTech Solutions Pvt. Ltd.
 
Python Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentPython Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentP3 InfoTech Solutions Pvt. Ltd.
 
How to Write a Popular Python Library by Accident
How to Write a Popular Python Library by AccidentHow to Write a Popular Python Library by Accident
How to Write a Popular Python Library by AccidentDaniel Greenfeld
 
Thinking hard about_python
Thinking hard about_pythonThinking hard about_python
Thinking hard about_pythonDaniel Greenfeld
 
10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-pythonDaniel Greenfeld
 
From NASA to Startups to Big Commerce
From NASA to Startups to Big CommerceFrom NASA to Startups to Big Commerce
From NASA to Startups to Big CommerceDaniel Greenfeld
 

Andere mochten auch (11)

Lighting talk on django-social-auth
Lighting talk on django-social-authLighting talk on django-social-auth
Lighting talk on django-social-auth
 
Round pegs and square holes
Round pegs and square holesRound pegs and square holes
Round pegs and square holes
 
An Extreme Talk about the Zen of Python
An Extreme Talk about the Zen of PythonAn Extreme Talk about the Zen of Python
An Extreme Talk about the Zen of Python
 
Python Programming Essentials - M34 - List Comprehensions
Python Programming Essentials - M34 - List ComprehensionsPython Programming Essentials - M34 - List Comprehensions
Python Programming Essentials - M34 - List Comprehensions
 
Python Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentPython Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web Development
 
How to Write a Popular Python Library by Accident
How to Write a Popular Python Library by AccidentHow to Write a Popular Python Library by Accident
How to Write a Popular Python Library by Accident
 
Thinking hard about_python
Thinking hard about_pythonThinking hard about_python
Thinking hard about_python
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python
 
From NASA to Startups to Big Commerce
From NASA to Startups to Big CommerceFrom NASA to Startups to Big Commerce
From NASA to Startups to Big Commerce
 
Python Worst Practices
Python Worst PracticesPython Worst Practices
Python Worst Practices
 

Ähnlich wie Intro to Data Visualizations

Branding yourself via Podcasting
Branding yourself via PodcastingBranding yourself via Podcasting
Branding yourself via PodcastingDave Woodson
 
JISC Anthologizr project
JISC Anthologizr projectJISC Anthologizr project
JISC Anthologizr projectRichard Davis
 
Sharja Womens'Council - Dubai University
Sharja Womens'Council - Dubai UniversitySharja Womens'Council - Dubai University
Sharja Womens'Council - Dubai UniversityRama Chakaki
 
Performance for Product Developers
Performance for Product DevelopersPerformance for Product Developers
Performance for Product DevelopersMatthew Wilkes
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternPuppet
 

Ähnlich wie Intro to Data Visualizations (7)

Branding yourself via Podcasting
Branding yourself via PodcastingBranding yourself via Podcasting
Branding yourself via Podcasting
 
JISC Anthologizr project
JISC Anthologizr projectJISC Anthologizr project
JISC Anthologizr project
 
Sharja Womens'Council - Dubai University
Sharja Womens'Council - Dubai UniversitySharja Womens'Council - Dubai University
Sharja Womens'Council - Dubai University
 
Performance for Product Developers
Performance for Product DevelopersPerformance for Product Developers
Performance for Product Developers
 
[Phind] Miracle
[Phind] Miracle[Phind] Miracle
[Phind] Miracle
 
The 4Cs in the 21st C
The 4Cs in the 21st CThe 4Cs in the 21st C
The 4Cs in the 21st C
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles Pattern
 

Mehr von Daniel Greenfeld

Mehr von Daniel Greenfeld (12)

Future of Collaboration
Future of CollaborationFuture of Collaboration
Future of Collaboration
 
Advanced Django Forms Usage
Advanced Django Forms UsageAdvanced Django Forms Usage
Advanced Django Forms Usage
 
Confessions of Joe Developer
Confessions of Joe DeveloperConfessions of Joe Developer
Confessions of Joe Developer
 
Django Worst Practices
Django Worst PracticesDjango Worst Practices
Django Worst Practices
 
How to sell django panel
How to sell django panelHow to sell django panel
How to sell django panel
 
Pinax Long Tutorial Slides
Pinax Long Tutorial SlidesPinax Long Tutorial Slides
Pinax Long Tutorial Slides
 
Testing In Django
Testing In DjangoTesting In Django
Testing In Django
 
Django Uni-Form
Django Uni-FormDjango Uni-Form
Django Uni-Form
 
Nova Django
Nova DjangoNova Django
Nova Django
 
Pinax Introduction
Pinax IntroductionPinax Introduction
Pinax Introduction
 
Why Django
Why DjangoWhy Django
Why Django
 
Pinax Tutorial 09/09/09
Pinax Tutorial 09/09/09Pinax Tutorial 09/09/09
Pinax Tutorial 09/09/09
 

Kürzlich hochgeladen

Group_5_US-China Trade War to understand the trade
Group_5_US-China Trade War to understand the tradeGroup_5_US-China Trade War to understand the trade
Group_5_US-China Trade War to understand the tradeRahatulAshafeen
 
Embed-4.pdf lkdiinlajeklhndklheduhuekjdh
Embed-4.pdf lkdiinlajeklhndklheduhuekjdhEmbed-4.pdf lkdiinlajeklhndklheduhuekjdh
Embed-4.pdf lkdiinlajeklhndklheduhuekjdhbhavenpr
 
06052024_First India Newspaper Jaipur.pdf
06052024_First India Newspaper Jaipur.pdf06052024_First India Newspaper Jaipur.pdf
06052024_First India Newspaper Jaipur.pdfFIRST INDIA
 
China's soft power in 21st century .pptx
China's soft power in 21st century   .pptxChina's soft power in 21st century   .pptx
China's soft power in 21st century .pptxYasinAhmad20
 
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...Faga1939
 
{Qatar{^🚀^(+971558539980**}})Abortion Pills for Sale in Dubai. .abu dhabi, sh...
{Qatar{^🚀^(+971558539980**}})Abortion Pills for Sale in Dubai. .abu dhabi, sh...{Qatar{^🚀^(+971558539980**}})Abortion Pills for Sale in Dubai. .abu dhabi, sh...
{Qatar{^🚀^(+971558539980**}})Abortion Pills for Sale in Dubai. .abu dhabi, sh...hyt3577
 
05052024_First India Newspaper Jaipur.pdf
05052024_First India Newspaper Jaipur.pdf05052024_First India Newspaper Jaipur.pdf
05052024_First India Newspaper Jaipur.pdfFIRST INDIA
 
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreie
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreieGujarat-SEBCs.pdf pfpkoopapriorjfperjreie
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreiebhavenpr
 
The political system of the united kingdom
The political system of the united kingdomThe political system of the united kingdom
The political system of the united kingdomlunadelior
 
*Navigating Electoral Terrain: TDP's Performance under N Chandrababu Naidu's ...
*Navigating Electoral Terrain: TDP's Performance under N Chandrababu Naidu's ...*Navigating Electoral Terrain: TDP's Performance under N Chandrababu Naidu's ...
*Navigating Electoral Terrain: TDP's Performance under N Chandrababu Naidu's ...anjanibaddipudi1
 
04052024_First India Newspaper Jaipur.pdf
04052024_First India Newspaper Jaipur.pdf04052024_First India Newspaper Jaipur.pdf
04052024_First India Newspaper Jaipur.pdfFIRST INDIA
 
422524114-Patriarchy-Kamla-Bhasin gg.pdf
422524114-Patriarchy-Kamla-Bhasin gg.pdf422524114-Patriarchy-Kamla-Bhasin gg.pdf
422524114-Patriarchy-Kamla-Bhasin gg.pdflambardar420420
 
Job-Oriеntеd Courses That Will Boost Your Career in 2024
Job-Oriеntеd Courses That Will Boost Your Career in 2024Job-Oriеntеd Courses That Will Boost Your Career in 2024
Job-Oriеntеd Courses That Will Boost Your Career in 2024Insiger
 
Transformative Leadership: N Chandrababu Naidu and TDP's Vision for Innovatio...
Transformative Leadership: N Chandrababu Naidu and TDP's Vision for Innovatio...Transformative Leadership: N Chandrababu Naidu and TDP's Vision for Innovatio...
Transformative Leadership: N Chandrababu Naidu and TDP's Vision for Innovatio...srinuseo15
 
declarationleaders_sd_re_greens_theleft_5.pdf
declarationleaders_sd_re_greens_theleft_5.pdfdeclarationleaders_sd_re_greens_theleft_5.pdf
declarationleaders_sd_re_greens_theleft_5.pdfssuser5750e1
 
KING VISHNU BHAGWANON KA BHAGWAN PARAMATMONKA PARATOMIC PARAMANU KASARVAMANVA...
KING VISHNU BHAGWANON KA BHAGWAN PARAMATMONKA PARATOMIC PARAMANU KASARVAMANVA...KING VISHNU BHAGWANON KA BHAGWAN PARAMATMONKA PARATOMIC PARAMANU KASARVAMANVA...
KING VISHNU BHAGWANON KA BHAGWAN PARAMATMONKA PARATOMIC PARAMANU KASARVAMANVA...IT Industry
 
Politician uddhav thackeray biography- Full Details
Politician uddhav thackeray biography- Full DetailsPolitician uddhav thackeray biography- Full Details
Politician uddhav thackeray biography- Full DetailsVoterMood
 
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...Andy (Avraham) Blumenthal
 
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopko
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopkoEmbed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopko
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopkobhavenpr
 

Kürzlich hochgeladen (20)

Group_5_US-China Trade War to understand the trade
Group_5_US-China Trade War to understand the tradeGroup_5_US-China Trade War to understand the trade
Group_5_US-China Trade War to understand the trade
 
Embed-4.pdf lkdiinlajeklhndklheduhuekjdh
Embed-4.pdf lkdiinlajeklhndklheduhuekjdhEmbed-4.pdf lkdiinlajeklhndklheduhuekjdh
Embed-4.pdf lkdiinlajeklhndklheduhuekjdh
 
06052024_First India Newspaper Jaipur.pdf
06052024_First India Newspaper Jaipur.pdf06052024_First India Newspaper Jaipur.pdf
06052024_First India Newspaper Jaipur.pdf
 
China's soft power in 21st century .pptx
China's soft power in 21st century   .pptxChina's soft power in 21st century   .pptx
China's soft power in 21st century .pptx
 
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
THE OBSTACLES THAT IMPEDE THE DEVELOPMENT OF BRAZIL IN THE CONTEMPORARY ERA A...
 
{Qatar{^🚀^(+971558539980**}})Abortion Pills for Sale in Dubai. .abu dhabi, sh...
{Qatar{^🚀^(+971558539980**}})Abortion Pills for Sale in Dubai. .abu dhabi, sh...{Qatar{^🚀^(+971558539980**}})Abortion Pills for Sale in Dubai. .abu dhabi, sh...
{Qatar{^🚀^(+971558539980**}})Abortion Pills for Sale in Dubai. .abu dhabi, sh...
 
05052024_First India Newspaper Jaipur.pdf
05052024_First India Newspaper Jaipur.pdf05052024_First India Newspaper Jaipur.pdf
05052024_First India Newspaper Jaipur.pdf
 
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreie
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreieGujarat-SEBCs.pdf pfpkoopapriorjfperjreie
Gujarat-SEBCs.pdf pfpkoopapriorjfperjreie
 
The political system of the united kingdom
The political system of the united kingdomThe political system of the united kingdom
The political system of the united kingdom
 
*Navigating Electoral Terrain: TDP's Performance under N Chandrababu Naidu's ...
*Navigating Electoral Terrain: TDP's Performance under N Chandrababu Naidu's ...*Navigating Electoral Terrain: TDP's Performance under N Chandrababu Naidu's ...
*Navigating Electoral Terrain: TDP's Performance under N Chandrababu Naidu's ...
 
04052024_First India Newspaper Jaipur.pdf
04052024_First India Newspaper Jaipur.pdf04052024_First India Newspaper Jaipur.pdf
04052024_First India Newspaper Jaipur.pdf
 
422524114-Patriarchy-Kamla-Bhasin gg.pdf
422524114-Patriarchy-Kamla-Bhasin gg.pdf422524114-Patriarchy-Kamla-Bhasin gg.pdf
422524114-Patriarchy-Kamla-Bhasin gg.pdf
 
Job-Oriеntеd Courses That Will Boost Your Career in 2024
Job-Oriеntеd Courses That Will Boost Your Career in 2024Job-Oriеntеd Courses That Will Boost Your Career in 2024
Job-Oriеntеd Courses That Will Boost Your Career in 2024
 
Transformative Leadership: N Chandrababu Naidu and TDP's Vision for Innovatio...
Transformative Leadership: N Chandrababu Naidu and TDP's Vision for Innovatio...Transformative Leadership: N Chandrababu Naidu and TDP's Vision for Innovatio...
Transformative Leadership: N Chandrababu Naidu and TDP's Vision for Innovatio...
 
declarationleaders_sd_re_greens_theleft_5.pdf
declarationleaders_sd_re_greens_theleft_5.pdfdeclarationleaders_sd_re_greens_theleft_5.pdf
declarationleaders_sd_re_greens_theleft_5.pdf
 
KING VISHNU BHAGWANON KA BHAGWAN PARAMATMONKA PARATOMIC PARAMANU KASARVAMANVA...
KING VISHNU BHAGWANON KA BHAGWAN PARAMATMONKA PARATOMIC PARAMANU KASARVAMANVA...KING VISHNU BHAGWANON KA BHAGWAN PARAMATMONKA PARATOMIC PARAMANU KASARVAMANVA...
KING VISHNU BHAGWANON KA BHAGWAN PARAMATMONKA PARATOMIC PARAMANU KASARVAMANVA...
 
Politician uddhav thackeray biography- Full Details
Politician uddhav thackeray biography- Full DetailsPolitician uddhav thackeray biography- Full Details
Politician uddhav thackeray biography- Full Details
 
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...
America Is the Target; Israel Is the Front Line _ Andy Blumenthal _ The Blogs...
 
9953056974 Call Girls In Pratap Nagar, Escorts (Delhi) NCR
9953056974 Call Girls In Pratap Nagar, Escorts (Delhi) NCR9953056974 Call Girls In Pratap Nagar, Escorts (Delhi) NCR
9953056974 Call Girls In Pratap Nagar, Escorts (Delhi) NCR
 
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopko
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopkoEmbed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopko
Embed-2 (1).pdfb[k[k[[k[kkkpkdpokkdpkopko
 

Intro to Data Visualizations

  • 1. Data Visualization Fundamentals Source: US Census Renderer: Many Eyes Created: 12/8/2012 by Daniel Greenfeld @pydanny Saturday, December 8, 12
  • 2. @pydanny • Learned Data Visualization at NASA • Principal at Cartwheel Web • Author of pydanny.com, a popular technology blog • Entrepreneur and CTO @pydanny Saturday, December 8, 12
  • 3. Helping tomorrow! I’ll be there to help, so ask away! Or email me at pydanny@cartwheelweb.com @pydanny Saturday, December 8, 12
  • 4. Tools covered • Many Eyes No coding • Google Charts Some coding • D3.js Need a developer @pydanny Saturday, December 8, 12
  • 5. Many Eyes bit.ly/many-eyes @pydanny Saturday, December 8, 12
  • 6. Many Eyes bit.ly/many-eyes @pydanny Saturday, December 8, 12
  • 7. Many Eyes Pros: • Great for rapid visualizations • Free service provided by IBM. • All data posted is freely available. • Generates accessible content. @pydanny Saturday, December 8, 12
  • 8. Many Eyes Cons: • Closed source - IBM can shut it down. • All data posted is freely available. • Uses Java applets to present data. @pydanny Saturday, December 8, 12
  • 9. Using Many Eyes 1. Go to bit.ly/many-eyes 2. Sign up with your email 3. Upload some data 4. Create a visualization Let’s try it out! @pydanny Saturday, December 8, 12
  • 10. Many Eyes bit.ly/many-eyes @pydanny Saturday, December 8, 12
  • 11. Signing Up I Click ‘login’ bit.ly/many-eyes @pydanny Saturday, December 8, 12
  • 12. Signing Up II Click ‘register’ @pydanny Saturday, December 8, 12
  • 13. Signup III Email and Captcha @pydanny Saturday, December 8, 12
  • 14. Follow emailed instructions Talk to me afterwards if you have any problems. @pydanny Saturday, December 8, 12
  • 15. What data to use? • Many Eyes has a lot of free data on it. • I want a new report. • On data that I generated. @pydanny Saturday, December 8, 12
  • 16. Example I • I run a site called • I want to know how many of each pet type is registered. @pydanny Saturday, December 8, 12
  • 17. Example I Data Prep • I exported the data from to CSV. • Opened the CSV with Excel @pydanny Saturday, December 8, 12
  • 18. Uploading Data I Copy/paste from your spreadsheet @pydanny Saturday, December 8, 12
  • 19. Uploading Data II Copy/pasted from Excel Many Eyes interpretation of my data @pydanny Saturday, December 8, 12
  • 20. Upload saved! Visualize! @pydanny Saturday, December 8, 12
  • 21. Choosing Visualizations • Analyze Text • Compare a set of values • See relationships among data points • See the parts of a whole • See the world • Track rises and falls over time @pydanny Saturday, December 8, 12
  • 22. Choosing Visualizations • Analyze Text Bar/Bubble charts • Compare a set of values • See relationships among data points • See the parts of a whole Pie Charts • See the world • Track rises and falls over time @pydanny Saturday, December 8, 12
  • 23. Bar Chart @pydanny Saturday, December 8, 12
  • 24. Bubble Chart @pydanny Saturday, December 8, 12
  • 25. Pie Chart @pydanny Saturday, December 8, 12
  • 26. Easy Conclusions • Dogs are clearly the most popular pet • Cats come second • Birds, Fish, Rabbits are roughly the same @pydanny Saturday, December 8, 12
  • 27. Many Eyes Text Analysis @pydanny Saturday, December 8, 12
  • 28. Example II • I built a site called • I want to do some text analysis. @pydanny Saturday, December 8, 12
  • 29. Scraping Text copy/paste with explicit permission of site and author http://bit.ly/WPfEde @pydanny Saturday, December 8, 12
  • 30. Upload the Data @pydanny Saturday, December 8, 12
  • 31. Word Tree Click for better view Warning: Dependent on java applets @pydanny Saturday, December 8, 12
  • 32. Tag Cloud http://www.niemanlab.org/2011/10/word-clouds-considered-harmful/ @pydanny Saturday, December 8, 12
  • 33. Word Cloud @pydanny Saturday, December 8, 12
  • 34. Many Eyes Geo Analysis @pydanny Saturday, December 8, 12
  • 35. Example III • I’m the CTO of • We want to share information about people moving. @pydanny Saturday, December 8, 12
  • 36. Prep the data • Export to CSV • Open with Excel @pydanny Saturday, December 8, 12
  • 37. Upload the Data @pydanny Saturday, December 8, 12
  • 38. Choose Visualization @pydanny Saturday, December 8, 12
  • 39. Destinations @pydanny Saturday, December 8, 12
  • 40. Google Charts @pydanny Saturday, December 8, 12
  • 41. Google Charts Boot Camp https://developers.google.com/chart/ @pydanny Saturday, December 8, 12
  • 42. Google Charts Pros • Free for many use cases • Customizable skins and themes • Relatively easy to use • Really good documentation • Bootcamp coming up! @pydanny Saturday, December 8, 12
  • 43. Google Charts Cons • Closed source - Google can change terms • You have to know a little code. • You won’t need much of my help! @pydanny Saturday, December 8, 12
  • 44. D3.js @pydanny Saturday, December 8, 12
  • 45. D3.js example I http://nyti.ms/SN5mfh Four Ways to Slice Obama’s Budget Proposal @pydanny Saturday, December 8, 12
  • 46. D3.js example II http://www.isbarackobamathepresident.com/ @pydanny Saturday, December 8, 12
  • 47. D3.js Pros • Open source! (source code on Github) • W3C Standard Friendly • Unbelievable power • Killer examples • Can use the same CSVs as Many-Eyes @pydanny Saturday, December 8, 12
  • 48. D3.js Cons • You will need a developer • Very steep learning curve @pydanny Saturday, December 8, 12
  • 49. Warning code ahead! @pydanny Saturday, December 8, 12
  • 50. JQuery-like selectors d3.selectAll("p").style("color", "white"); @pydanny Saturday, December 8, 12
  • 51. Dynamic Properties d3.selectAll("p").style("color", function() { return "hsl(" + Math.random() * 360 + ",100%,50%)"; }); d3.selectAll("p").style("color", function(d, i) { return i % 2 ? "#fff" : "#eee"; }); @pydanny Saturday, December 8, 12
  • 52. Loading Data d3.json("census.json", function(error, data){} // Do logic here }); d3.csv("pets.csv", function(error, data){} // Do logic here }); d3.tsv("immigrants.tsv", function(error, data){} // Do logic here }); Supports JSON, CSV, and TSV. @pydanny Saturday, December 8, 12
  • 53. Data Binding Binds values to the first six paragraphs d3.selectAll("p") .data([4, 8, 15, 16, 23, 42]) .style("font-size", function(d) { return d + "px"; } ); Sets font-size per bound paragraph @pydanny Saturday, December 8, 12
  • 54. Entering Data var p = d3.select("body").selectAll("p") .data([4, 8, 15, 16, 23, 42]) .text(String); p.enter().append("p") .text(String); If less than six paragraphs, then add until six exist. Create nodes for incoming data @pydanny Saturday, December 8, 12
  • 55. Exiting Data var p = d3.select("body").selectAll("p") .data([4, 8, 15, 16, 23, 42]) .text(String); p.enter().append("p") .text(String); p.exit().remove(); Remove extra nodes Cleaning up your workspace @pydanny Saturday, December 8, 12
  • 56. Transitions d3.select("body").transition() .style("background-color", "black"); @pydanny Saturday, December 8, 12
  • 57. Build on Web-Standards • Creates SVG images on the fly • No Java or Flash needed • Works on modern browsers • Easy to debug with browser inspectors @pydanny Saturday, December 8, 12
  • 58. Requires Javascript skill var m = [20, 120, 20, 120],     w = 1280 - m[1] - m[3],     h = 800 - m[0] - m[2],     i = 0,     root; var tree = d3.layout.tree()     .size([h, w]); var diagonal = d3.svg.diagonal()     .projection(function(d) { return [d.y, d.x]; }); var vis = d3.select("#body").append("svg:svg")     .attr("width", w + m[1] + m[3])     .attr("height", h + m[0] + m[2])   .append("svg:g")     .attr("transform", "translate(" + m[3] + "," + m[0] d3.json("flare.json", function(json) {   root = json;   root.x0 = h / 2;   root.y0 = 0;   function toggleAll(d) {     if (d.children) {       d.children.forEach(toggleAll);       toggle(d);     } Remember the Many-Eyes   }   // Initialize the display to show a few nodes. version of this data.   root.children.forEach(toggleAll);   toggle(root.children[1]);   toggle(root.children[1].children[2]);   toggle(root.children[9]);   toggle(root.children[9].children[0]); @pydanny Saturday, December 8, 12   update(root);
  • 59. Thank you! @pydanny Saturday, December 8, 12