liveBook · Manning

Ratio

As explained in Data Storytelling with Altair and AI

A ratio is a quantitative comparison between two quantities obtained by division.

A ratio compares two quantities through division. Its meaning depends on the denominator: a larger count does not necessarily indicate a larger share or rate. section 5.1.1 section 1.4.2

Participation rate

A pet event has 1,138 cat participants and 150 advertised websites, giving 1,138 ÷ 150 = 7.59 participants per website. Dogs have 130 participants across 28 websites, or 4.64 per website. The raw count favors cats, while the ratio adds useful context about participation. section 1.4.2

Use a ratio to make comparisons more meaningful:

  • Identify the quantity being compared and the denominator that supplies its context. section 5.1.1
  • Divide the numerator by the denominator, then label the result clearly as a rate, proportion, or percentage. section 1.4.2
  • Use the ratio in a chart or explanation so the audience can interpret counts across different-sized groups. section 5.1.1 section 1.4.2

Normalizing regional homelessness

A region with more homeless people may still have a lower homelessness share. One comparison shows 30% homelessness in one scenario versus 80% in another. A Python workflow joins homeless and population datasets, computes homeless ÷ population × 1,000, and charts the normalized result. section 5.1.1

Table 1.3 Data related to pets involved in the event, with a focus on the participants’ rates
Pet
Number of Participants
Percentage
Number of Advertised Websites
Participants-to-website rate (# of participants/#
of websites)
Cat
1138
88.56
150
7.59
Dog
130
10.12
28
4.64

Inspect the participant-rate table to compare raw counts, percentages, denominators, and calculated ratios together. section 1.4.2

How Data Storytelling with Altair and AI covers it

How deep it goes
Works through denominator choice, manual calculations, dataset joins, and chart encoding, without developing abstract ratio theory.
Examples
Compares cats’ and dogs’ participants-per-website rates and normalizes regional homelessness by population.
What it assumes
Assumes basic division and chart reading while demonstrating how denominators and context change data interpretation.
What you can do after
Apply it via pandas and Altair to calculate normalized rates and communicate comparisons through charts.
How it connects
Connects ratios with percentages, normalization, context, data visualization, and audience-focused data storytelling.

Also explained in

Compare how 3 books explain ratio →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Storytelling with Altair and AI. The section links point to the parts of the book it draws on.