Aggregating Data Before Drawing a Chart

A chart can draw already aggregated values when the plotted grain is different from the source's individual records.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a monthly output
  2. Avoid aggregating already aggregated values twice

Trace a monthly output

Several transactions each day can become one total per month. The chart should then use those month totals rather than plotting one point per transaction at the same positions. Grouping by one column explains the operation.

Avoid aggregating already aggregated values twice

If a source row supplies per-store averages, retain counts for a pooled average. Weighted and unweighted means distinguish the two calculations.[1][2]

References

  1. Hadley Wickham, Tidy Data ↩
  2. Matplotlib Development Team, Plot Types ↩