- Home
- Computers & IT
- Interactive Data Visualization for the Web
Interactive Data Visualization for the Web

Publisher: O’Reilly Media
Keywords: web, visualization, data, interactive
Number of Pages: 272
Published: 2013-04-02
ISBN-10: 1449339735
ISBN-13: 9781449339739

Book Description:
Create and publish your own interactive data visualization projects on the Web—even if you have little or no experience with data visualization or web development. It’s easy and fun with this practical, hands-on introduction. Author Scott Murray teaches you the fundamental concepts and methods of D3, a JavaScript library that lets you express data visually in a web browser. Along the way, you’ll expand your web programming skills, using tools such as HTML and JavaScript.
This step-by-step guide is ideal whether you’re a designer or visual artist with no programming experience, a reporter exploring the new frontier of data journalism, or anyone who wants to visualize and share data.
Learn HTML, CSS, JavaScript, and SVG basics Dynamically generate web page elements from your data—and choose visual encoding rules to style them Create bar charts, scatter plots, pie charts, stacked bar charts, and force-directed layouts Use smooth, animated transitions to show changes in your data Introduce interactivity to help users explore data through different views Create customized geographic maps with data Explore hands-on with downloadable code and over 100 examples
The icon indicates sections that contain interactive examples.
-
Preface
- Conventions Used in This Book
- Using Code Examples
- List of Interactive Examples
- Safari® Books Online
- How to Contact Us
- Acknowledgments
-
1. Introduction
- Why Data Visualization?
- Why Write Code?
- Why Interactive?
- Why on the Web?
- What This Book Is
- Who You Are
- What This Book Is Not
- Using Sample Code
- Thank You
-
2. Introducing D3
- What It Does
- What It Doesn’t Do
- Origins and Context
-
Alternatives
- Easy Charts
- Graph Visualizations
- Geomapping
- Almost from Scratch
- Three-Dimensional
- Tools Built with D3
-
3. Technology Fundamentals
- The Web
-
HTML
- Content Plus Structure
- Adding Structure with Elements
- Common Elements
- Attributes
- Classes and IDs
- Comments
- DOM
- Developer Tools
- Rendering and the Box Model
-
CSS
- Selectors
- Properties and Values
- Comments
- Referencing Styles
- Inheritance, Cascading, and Specificity
-
JavaScript
- Hello, Console
- Variables
- Other Variable Types
- Arrays
- Objects
- Objects and Arrays
- Mathematical Operators
- Comparison Operators
- Control Structures
- Functions
- Comments
- Referencing Scripts
- JavaScript Gotchas
-
SVG
- The SVG Element
- Simple Shapes
- Styling SVG Elements
- Layering and Drawing Order
- Transparency
- A Note on Compatibility
-
4. Setup
- Downloading D3
- Referencing D3
-
Setting Up a Web Server
- Terminal with Python
- MAMP, WAMP, and LAMP
- Diving In
-
5. Data
-
Generating Page Elements
- Chaining Methods
- One Link at a Time
- The Hand-off
- Going Chainless
-
Binding Data
- In a Bind
- Data
- Please Make Your Selection
- Bound and Determined
- Using Your Data
- High-Functioning
- Data Wants to Be Held
- Beyond Text
-
Generating Page Elements
-
6. Drawing with Data
-
Drawing divs
- Setting Attributes
- A Note on Classes
- Back to the Bars
- Setting Styles
-
The Power of data()
- Random Data
-
Drawing SVGs
- Create the SVG
- Data-Driven Shapes
- Pretty Colors, Oooh!
-
Making a Bar Chart
- The Old Chart
- The New Chart
- Color
- Labels
-
Making a Scatterplot
- The Data
- The Scatterplot
- Size
- Labels
- Next Steps
-
Drawing divs
-
7. Scales
- Apples and Pixels
- Domains and Ranges
- Normalization
- Creating a Scale
-
Scaling the Scatterplot
- d3.min() and d3.max()
- Setting Up Dynamic Scales
- Incorporating Scaled Values
- Refining the Plot
- Other Methods
- Other Scales
-
8. Axes
- Introducing Axes
- Setting Up an Axis
- Cleaning It Up
- Check for Ticks
- Y Not?
- Final Touches
- Formatting Tick Labels
-
9. Updates, Transitions, and Motion
-
Modernizing the Bar Chart
- Ordinal Scales, Explained
- Round Bands Are All the Range These Days
- Referencing the Ordinal Scale
- Other Updates
-
Updating Data
- Interaction via Event Listeners
- Changing the Data
- Updating the Visuals
-
Transitions
- duration(), or How Long Is This Going to Take?
- ease()-y Does It
- Please Do Not delay()
- Randomizing the Data
- Updating Scales
- Updating Axes
- each() Transition Starts and Ends
-
Other Kinds of Data Updates
- Adding Values (and Elements)
- Removing Values (and Elements)
- Data Joins with Keys
- Add and Remove: Combo Platter
- Recap
-
Modernizing the Bar Chart
-
10. Interactivity
- Binding Event Listeners
-
Introducing Behaviors
- Hover to Highlight
-
Grouping SVG Elements
- Click to Sort
-
Tooltips
- Default Browser Tooltips
- SVG Element Tooltips
- HTML div Tooltips
- Consideration for Touch Devices
- Moving Forward
-
11. Layouts
- Pie Layout
- Stack Layout
- Force Layout
-
12. Geomapping
- JSON, Meet GeoJSON
- Paths
- Projections
- Choropleth
- Adding Points
-
Acquiring and Parsing Geodata
- Find Shapefiles
- Choose a Resolution
- Simplify the Shapes
- Convert to GeoJSON
-
13. Exporting
- Bitmaps
- SVG
-
A. Appendix: Further Study
- Books
- Websites
- Twitterers
- Index