Hands-On Data Visualization

Book description

Tell your story and show it with data, using free and easy-to-learn tools on the web. This introductory book teaches you how to design interactive charts and customized maps for your website, beginning with simple drag-and-drop tools such as Google Sheets, Datawrapper, and Tableau Public. You'll also gradually learn how to edit open source code templates like Chart.js, Highcharts, and Leaflet on GitHub.

Hands-On Data Visualization takes you step-by-step through tutorials, real-world examples, and online resources. This practical guide is ideal for students, nonprofit organizations, small business owners, local governments, journalists, academics, and anyone who wants to take data out of spreadsheets and turn it into lively interactive stories. No coding experience is required.

  • Build interactive charts and maps and embed them in your website
  • Understand the principles for designing effective charts and maps
  • Learn key data visualization concepts to help you choose the right tools
  • Convert and transform tabular and spatial data to tell your data story
  • Edit and host Chart.js, Highcharts, and Leaflet map code templates on GitHub
  • Learn how to detect bias in charts and maps produced by others

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Audience and Overview
      1. Advice for Hands-On Learning
      2. Chapter Outline
    2. Conventions Used in This Book
    3. O’Reilly Online Learning
    4. How to Contact Us
    5. Acknowledgments
  2. Introduction
    1. Why Data Visualization?
    2. What Can You Believe?
    3. Some Pictures Are More Persuasive
    4. Different Shades of the Truth
    5. Organization of the Book
  3. I. Foundational Skills
  4. 1. Choose Tools to Tell Your Story
    1. Start Sketching Your Data Story
    2. Ten Factors When Considering Tools
      1. 1. Easy to Learn
      2. 2. Free or Affordable
      3. 3. Powerful
      4. 4. Supported
      5. 5. Portable
      6. 6. Secure and Private
      7. 7. Collaborative
      8. 8. Cross-Platform
      9. 9. Open Source
      10. 10. Accessible for Visually Impaired Readers
    3. Our Recommended Tools
    4. Use a Password Manager
  5. 2. Strengthen Your Spreadsheet Skills
    1. Select Your Spreadsheet Tools
    2. Download to CSV or ODS Format
    3. Make a Copy of a Google Sheet
    4. Share Your Google Sheets
    5. Upload and Convert to Google Sheets
    6. Geocode Addresses in Google Sheets
    7. Collect Data with Google Forms
    8. Sort and Filter Data
    9. Calculate with Formulas
    10. Summarize Data with Pivot Tables
    11. Match Columns with VLOOKUP
    12. Spreadsheet Versus Relational Database
  6. 3. Find and Question Your Data
    1. Guiding Questions for Your Search
    2. Public and Private Data
    3. Mask or Aggregate Sensitive Data
    4. Open Data Repositories
    5. Source Your Data
    6. Recognize Bad Data
    7. Question Your Data
  7. 4. Clean Up Messy Data
    1. Smart Cleanup with Google Sheets
    2. Find and Replace with Blank
    3. Transpose Rows and Columns
    4. Split Data into Separate Columns
      1. Example 1: Simple Splitting
      2. Example 2: Complex Splitting
    5. Combine Data into One Column
    6. Extract Tables from PDFs with Tabula
    7. Clean Data with OpenRefine
      1. Set Up OpenRefine
      2. Load Data and Start a New Project
      3. Convert Dollar Amounts from Text to Numbers
      4. Cluster Similar Spellings
  8. 5. Make Meaningful Comparisons
    1. Precisely Describe Comparisons
    2. Normalize Your Data
    3. Beware of Biased Comparisons
  9. II. Building Visualizations
  10. 6. Chart Your Data
    1. Chart Design Principles
      1. Deconstruct a Chart
      2. Some Rules Are More Important Than Others
      3. Chart Aesthetics
    2. Google Sheets Charts
    3. Bar and Column Charts
      1. Grouped Bar and Column Charts
      2. Split Bar and Column Charts
      3. Stacked Bar and Column Charts
    4. Histograms
      1. Quick Histograms with Google Sheets Column Stats
      2. Regular Histograms with Google Sheets Charts
    5. Pie, Line, and Area Charts
      1. Pie Charts
      2. Line Charts
      3. Stacked Area Charts
    6. Datawrapper Charts
    7. Annotated Charts
    8. Range Charts
    9. Scatter and Bubble Charts
      1. Scatter Charts with Google Sheets
      2. Bubble Charts
    10. Tableau Public Charts
    11. Scatter Charts with Tableau Public
      1. Install Tableau Public and Connect Data
      2. Create Scatter Chart in the Worksheet
      3. Add Title and Caption, and Publish
    12. Filtered Line Chart
      1. Connect Data to Tableau Public
      2. Build and Publish a Filtered Line Chart
  11. 7. Map Your Data
    1. Map Design Principles
      1. Deconstructing a Map
      2. Clarify Point-Versus-Polygon Data
      3. Map One Variable, Not Two
      4. Choose Smaller Geographies for Choropleth Maps
    2. Design Choropleth Colors and Intervals
      1. Choose Choropleth Palettes to Match Your Data
      2. Choose Color Intervals to Group Choropleth Map Data
    3. Normalize Choropleth Map Data
    4. Point Map with Google My Maps
    5. Symbol Point Map with Datawrapper
    6. Choropleth Map with Datawrapper
    7. Choropleth Map with Tableau Public
    8. Current Map with Socrata Open Data
  12. 8. Table Your Data
    1. Table Design Principles
    2. Datawrapper Table with Sparklines
    3. Other Table-Making Tools
  13. 9. Embed on the Web
    1. Static Image Versus Interactive iframe
    2. Get the Embed Code or iframe Tag
      1. From Google Sheets
      2. From Datawrapper
      3. From Tableau Public
    3. Paste Code or iframe to a Website
      1. To WordPress.com Sites
      2. To Self-Hosted WordPress Sites
      3. For Squarespace, Wix, Weebly, or Other Web-Building Sites
  14. III. Code Templates and Advanced Tools
  15. 10. Edit and Host Code with GitHub
    1. Copy, Edit, and Host a Simple Leaflet Map Template
    2. Convert GitHub Pages Link to iframe
    3. Create a New Repo and Upload Files on GitHub
    4. GitHub Desktop and Atom Text Editor to Code Efficiently
  16. 11. Chart.js and Highcharts Templates
    1. Bar or Column Chart with Chart.js
    2. Error Bars with Chart.js
    3. Line Chart with Chart.js
    4. Annotated Line Chart with Highcharts
    5. Scatter Chart with Chart.js
    6. Bubble Chart with Chart.js
  17. 12. Leaflet Map Templates
    1. Leaflet Maps with Google Sheets
      1. Tutorial Requirements and Overview
    2. Leaflet Storymaps with Google Sheets
      1. Tutorial Requirements and Overview
    3. Get Your Google Sheets API Key
    4. Leaflet Maps with CSV Data
    5. Leaflet Heatmap Points with CSV Data
    6. Leaflet Searchable Point Map
      1. Step 1: Prepare Your Data
      2. Step 2: Download and Edit This Template
      3. Step 3: Publish Your Map
    7. Leaflet Maps with Open Data APIs
  18. 13. Transform Your Map Data
    1. Geospatial Data and GeoJSON
      1. GeoJSON
      2. Shapefiles
      3. GPS Exchange Format
      4. Keyhole Markup Language
      5. MapInfo TAB
    2. Find GeoJSON Boundary Files
    3. Draw and Edit with GeoJson.io
      1. Convert KML, GPX, and Other Formats into GeoJSON
      2. Create GeoJSON from a CSV File
      3. Create New GeoJSON Data with Drawing Tools
    4. Edit and Join with Mapshaper
      1. Import, Convert, and Export Map Boundary Files
      2. Edit Data for Specific Polygons
      3. Rename Data Fields
      4. Remove Unwanted Data Fields
      5. Simplify Map Boundaries to Reduce File Size
      6. Dissolve Internal Polygons to Create an Outline Map
      7. Clip a Map to Match an Outline Layer
      8. Join Spreadsheet Data With Polygon Map
      9. Count Points in Polygons with Mapshaper
      10. More About Joins
      11. Merge Selected Polygons with Join and Dissolve Commands
    5. Convert Compressed KMZ to KML
    6. Georeference with Map Warper
    7. Bulk Geocode with US Census
    8. Pivot Points into Polygon Data
  19. IV. Telling True, Meaningful Stories
  20. 14. Detect Lies and Reduce Bias
    1. How to Lie with Charts
      1. Exaggerate Change in Charts
      2. Diminish Change in Charts
    2. How to Lie with Maps
      1. Examine Data and Upload to Datawrapper
      2. Modify the Map Color Ranges
    3. Recognize and Reduce Data Bias
    4. Recognize and Reduce Spatial Bias
  21. 15. Tell and Show Your Data Story
    1. Build a Narrative on a Storyboard
    2. Draw Attention to Meaning
    3. Acknowledge Sources and Uncertainty
    4. Decide on Your Data Story Format
  22. A. Fix Common Problems
    1. Tool or Platform Problems
    2. Try a Different Browser
    3. Diagnose with Developer Tools
    4. Mac or Chromebook Problems
    5. Watch Out for Bad Data
    6. Common iframe Errors
    7. Fix Your Code on GitHub
  23. Index

Product information

  • Title: Hands-On Data Visualization
  • Author(s): Jack Dougherty, Ilya Ilyankou
  • Release date: April 2021
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492086000