Icon

Exercise2

<p><strong>Chapter 4/Exercise 2</strong></p><p>Read the file datetime_ex2.csv created in the previous exercise "Chapter 4/Exercise 2".</p><p>First, calculate the difference (in months) between the sales date and today. Keep only sales that are older than 12 months. Then, calculate the Moving Average to the sales trend. In this exercise, we apply two moving averages with different window size (11 and 21), and eventually compare them visually using a <em>Line Plot</em>.</p>

Workflow: Chapter 4/Exercise 2


Read the file datetime_ex2.csv created in the previous exercise "Chapter 4/Exercise 2".

First, calculate the difference (in months) between the sales date and today. Keep only sales that are older than 12 months. Then, calculate the Moving Average to the sales trend. In this exercise, we apply two moving averages with different window size (11 and 21), and eventually compare them visually using a Line Plot.

Reading data

This file was generated in Chapter4/Exercise1

Calculate center simple moving average

  • top branch: window size: 11

  • bottom branch: window size: 21

Visualizing data

Compare the twomoving averages on time
Line Plot
datetime_ex2.csv
CSV Reader
Calculate time difference
Moving average on price;Window size: 11
Moving Average
Column Renamer
Column Renamer
Moving average on price;Window size: 21
Moving Average
on RowID inner join
Joiner

Nodes

Extensions

Links