Cover image for Getting Started with D3

Book description

Learn how to create beautiful, interactive, browser-based data visualizations with the D3 JavaScript library. This hands-on book shows you how to use a combination of JavaScript and SVG to build everything from simple bar charts to complex infographics. You’ll learn how to use basic D3 tools by building visualizations based on real data from the New York Metropolitan Transit Authority.

Table of Contents

  1. Getting Started with D3
  2. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  3. A Note Regarding Supplemental Files
  4. Preface
    1. Who This Book Is For
    2. Conventions Used in This Book
    3. Using Code Examples
    4. Safari® Books Online
    5. How to Contact Us
    6. Acknowledgements
  5. 1. Introduction
    1. D3
    2. The Basic Setup
    3. The New York Metropolitan Transit Authority Data Set
      1. Cleaning the Data
      2. Serving the Data
  6. 2. The Enter Selection
    1. Building a Simple Subway Train Status Board
      1. The draw Function
      2. Adding Data-Dependent Style
    2. Graphing Mean Daily Plaza Traffic
      1. Using div Tags to Create a Horizontal Bar Chart
      2. Styling the Visualization using CSS
      3. Introducing Labels
  7. 3. Scales, Axes, and Lines
    1. Bus Breakdown, Accident, and Injury
      1. A Tiny SVG Primer
      2. Using extent and scale to Map Data to Pixels
      3. Adding Axes
      4. Adding Axis Titles
    2. Graphing Turnstile Traffic
      1. Setting up the Viewport
      2. Creating a Time Scale
      3. Adding Axes
      4. Adding A Path
  8. 4. Interaction and Transitions
    1. A Subway Wait Assessment UI I—Interactions
      1. A Robust Viewport Setup
      2. Adding Interaction
    2. Subway Wait Assessment UI II—Transitions
      1. A Simple Interactive Transition
      2. Adding Mouseover Labels
      3. An Entry Animation Using Delays
      4. Adding Line Labels
      5. Style
  9. 5. Layout
    1. Subway Connectivity
      1. Force Directed Graphs
    2. Scheduled Wait Time Distribution
      1. Using the Histogram Layout
      2. Using the Stack Layout
  10. 6. Conclusion
    1. What Next?
  11. About the Author
  12. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  13. Copyright