An example of how seasonality impacts the trend.

Seasonality means that the time serie has a periodic component, repeating the same pattern on each period. For example, sales of a store may have a week-based seasonality: sales increase on saturday, while there is no sale at all on sunday.

In this example, the season has a length of 4: the first value is high, and the last one is low. Hence, each season has an internal negative trend, which lowers the global trend. A positive internal trend would increase the global trend.

The impact of the season’s internal trend on the global trend is higher when :

- the order of magnitude of the seasonilaty is high (ie. lowest and highest values are far from season’s mean)
- the season’s length and the time serie’s length are of the same order

In this example, we mitigate seasonality with a windowed approach: for each season, we retain the mean of the season (big dots). This produces a deseasonalized time serie. The deseasonalized global trend (light blue line) is then computed based on this deseasonalized time serie.

Seasonality can be mitigated by various approaches, such as simple linear regression, windowed mean (used in this example), moving mean, smoothing, …

- Drag & Drop each point to see the impact on the trend line
- inverse seasonality (in each season, the higher value becomes the lower, and
*vice versa*) to inverse the season’s internal trend, and hence inverse the impact on the global trend - permute seasonality (in each season, the n-th value becomes the (n-1)-th value and the first one becomes the last one) to lower/increase the season’s internal trend (because extremum values are no longer at the begining and end of each season), and hence lower/increase the impact on the global trend

- trend line computed using
*least square method*

- done with D3 v3.5.5
- blockbuilder.org