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>
Annotations and comments
  • 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
  • Calculate time difference between sales data and today: Granularity: months
  • Only sales older than 12 months
  • Convert to Date & Time object
  • on RowID inner join
  • Compare the two moving averages on time
  • Moving average on price; Window size: 11
  • Moving average on price; Window size: 21

Nodes

Extensions

Links