liveBook · Manning

Continuous data

As explained in D3.js in Action, Third Edition

A continuous value can take any value within a specified interval or spectrum.

Continuous data describes values that can be divided into smaller units while remaining meaningful. Temperature illustrates the idea: 17°C can become 16.8°C or a still more precise measurement. Continuous values may occur anywhere within a defined interval, unlike discrete values, which belong to a predetermined set. section 3.1.2 section 3.4.1

Use continuous data to guide visualization and scale choices:

  • Treat measured quantities such as time, weight, temperature, salaries, and GDP as quantitative data that may be continuous. section 3.1.2 section 6.4.2
  • Prefer visual channels such as position, length, area, angle, or a continuous color scale for quantitative values. section 14.2
  • Map a continuous domain with a suitable scale: a linear scale can transform data values into a continuous pixel range. section 3.4.1
  • Use a sequential color scale when a continuous quantity should become a graded color range, as in a choropleth map. section 13.2.3

Mapping values to chart positions

A D3 linear scale can map values from 0 through 200 to positions from 0 through 20: d3.scaleLinear().domain([0, 200]).range([0, 20]). Calling the resulting scale with 100 returns 10. The same pattern positions salaries along the continuous vertical axis of a box plot. section 3.4.1 section 6.4.2

Figure 3.4 A classification of data types
figure

A classification diagram places continuous data within the quantitative category, alongside discrete data, and distinguishes both from qualitative data. section 3.1.2

How D3.js in Action, Third Edition covers it

How deep it goes
Defines interval-based values and applies them to linear and sequential scales, without developing scale internals.
Examples
Uses temperature, salaries, TV review scores, and Nobel laureate counts as continuous-value visualization examples.
What it assumes
Assumes familiarity with basic data visualization while distinguishing continuous and discrete data through everyday measurements.
What you can do after
Apply it via D3 scales and visual channels to represent measured values as positions, lengths, areas, angles, or colors.
How it connects
Connects continuous data with quantitative data, discrete data, D3 scales, linear scales, sequential color scales, and visual encoding.

Also explained in

Compare how 5 books explain continuous data →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of D3.js in Action, Third Edition. The section links point to the parts of the book it draws on.