Vega-Lite Bubble Chart
A bubble chart encoding three variables on a 2D plane: x-position, y-position, and bubble area (via the `size` channel) — plus a 4th categorical via `color`. Vega-Lite's `point` mark with a `size` encoding handles the bubble area calculation automatically (linear scale by default
Template details
- chart
- bubble
- scatter
- multi-encoding
- vega
- vega-lite
When to use this template
A bubble chart reveals relationships and patterns among four distinct variables for a set of entities. It's ideal for understanding how two primary quantitative metrics relate, while simultaneously assessing the magnitude (bubble size) and categorical grouping (color) of each entity. Analysts use it to spot clusters, outliers, and trends where the "weight" or importance of each data point is crucial to the interpretation.
- Datasets with exactly three quantitative and one categorical variable.
- Distinct entities where each has a unique combination of values.
- Comparing items where magnitude is a critical fourth dimension.
- Identifying clusters or outliers across four attributes simultaneously.
- Moderate cardinality for entities to prevent excessive overlap.
- Quantitative variables with scales suitable for visual comparison.