timeline - comparing trends
This example shows how to compare trends between two time series by presenting raw and relative (mean-reduced) data side-by-side. The left graph displays raw values, while the right graph shows each value divided by its series mean, allowing users to assess whether absolute or proportional changes are more meaningful. Drag-and-drop interactions enable manipulation of individual data points or entire timelines, with the linked reduced trends updating in real-time. Built with D3 v3.5.5, the visualization uses SVG for rendering, d3.behavior.drag for interactions, and a least-squares regression line computed for each trend.
AI-generated descriptionAn example of how to compare trends of several time series.
Question: a trend of +10 over 100 things is higher or lower than a trend of +5 over 10 things ?
Response: it depends ... if you are interested in the raw trend, then the first trend is higher (+10 > +5); but if you are interested in the relative trend, then the second trend is higher (+10/100 < +5/10)
In the above viz, the left graph concerns raw data, and the right graph deals with relative data. If you want to compare raw trends, look at the left graph; and if you want to compare relative trends, look at the right one.
Relative values (dots on the rigth graph) are the raw values divided by the mean of their respective serie. The mean is used because it has interesting mathematical/computationnal properties over other possible ways to divide values (such as min, max, median, ...). In the statistical world, data divided by their respective mean are called reduced (reduced value, reduced trend, ..., but the reduced standard deviation is called coefficient of variation).
Usages :
- in the left graph, Drag & Drop a point to see the overall impact (on its trend, its related reduced values, and its related reduced trend)
- in the left graph, Drag & Drop a timeline (to change each vaue of the related time serie), and see the impact on the related reduced trend;
Notes:
- trend line computed using least square method
Acknowledgments:
- done with D3 v3.5.5
- <a href='http://blockbuilder.org'>blockbuilder.org</a>