liveBook · Manning

Ratio

A ratio is a quantitative comparison of two quantities expressed through their relative sizes or quotient.

How 3 Manning books explain it

Math for Web Design

A ratio is a mathematical comparison between quantities that expresses their relative sizes or how many times one contains another.

How it is used
Applies ratios to proportional layouts, responsive behavior, typography, sliders, and touch scaling.
How deep it goes
Defines ratios and works through CSS and JavaScript implementations, including modular-scale formulas and range mapping.
Examples
Uses 16:9 video thumbnails, 3fr 2fr 1fr grids, modular type scales, photo-editor sliders, and pinch-zoomed photos.
What you can do after
Apply it via CSS and JavaScript to preserve proportions, generate type scales, and map interaction input to values.

Read how Math for Web Design explains ratio →

Starting Data Analytics with Generative AI and Python

A ratio is a quantitative comparison of two values expressed through their quotient or relative size.

How it is used
Uses normalized review shares to identify product groups with comparatively strong or weak customer satisfaction.
How deep it goes
Calculates group-level shares and visualizes them, but stops short of establishing causal explanations for the differences.
Examples
Uses positive and negative review counts, product groups, pandas aggregation, and a bar chart with a negative-ratio line.
What you can do after
Apply it via pandas to calculate review shares and compare them with raw counts in a visualization.

Read how Starting Data Analytics with Generative AI and Python explains ratio →

Data Storytelling with Altair and AI

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

How it is used
Uses division-based comparisons to add context, normalize counts, and answer audience questions more accurately.
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 you can do after
Apply it via pandas and Altair to calculate normalized rates and communicate comparisons through charts.

Read how Data Storytelling with Altair and AI explains ratio →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.