Icon

02_Inspect_and_Remove_Seasonality

Exercise 2: Inspecting and Removing Seasonality

This workflow shows the seasonality of time series (energy consumption) in an autocorrelation plot. The seasonality is removed by differencing the time series at the lag where the maximum peak is detected in the autocorrelation plot. As an alternative approach, the time series is decomposed into its trend, first and second seasonalities, and irregular component. The distribution of energy consumption for each hour is shown in a conditional box plot for both the original and differenced time series.

URL: Extract Date&Time Fields Node https://youtu.be/Iur4s3gf6zc

Annotations and comments
  • Time Series Analysis 02. Inspecting & Removing Seasonality Summary: In this exercise we'll explore seasonality in the time series using conditional box plots and the (P)ACF plots. Instructions: 1) Run the workflow up through the Missing Value node, this is where we left off in the previous exercise 2) Use the Inspect Seasonality Component to kook at the ACF and PACF plots of the Time Series. Do we have any Seasonality? 3) Use the Remove Seasonality Component to remove the seasonality we discovered 4) Apply another copy of the Inspect Seasonality component after the removal. Does the ACF plot look better? 5) Use the Extract Date&Time Fields node to extract the Hour from the timestamp (Row ID column) after the Missing Value node 6) Use the Number to String node to convert the Hour values into string 7) Use the Conditional Box Plot node to visualize the Energy Usage by hour, do we see a pattern? 8) Repeat steps 5-7 after the Remove Seasonality component, does it look better? Optional) Use the Decompose Signal component after the Missing Value node and look at the view
  • Hourly Box-Plots Compare Hourly Box-Plots before and after seasonality removal After applying a lag transformation with a lag of 24 to reduce daily seasonality, the box plot shows reduced variation across hours compared to the original. This indicates that the seasonal component has been partially removed, resulting in a more stable distribution of energy usage. Among the tested models, ARIMA(1,1,2) has the lowest AIC value (37841.597), indicating that it provides the best fit to the data compared to the other models.
  • ACF Plot & seasonality removal
  • Data Loading
  • Data Preparation
  • Energy usage data
  • convert date/time into Date&Time objects
  • boolean to replace timestamp column
  • take only the timestamp col
  • select timestamp
  • rename col to lower bound
  • rename col to upper bound
  • update domain
  • extract table dim
  • extract table spec
  • get index of last row
  • merge all
  • take only last row
  • take only first row
  • top port: Local Date Time second port: Local Date
  • top port: Local Time bottom port: Zoned Date Time
  • for Local Date Time
  • for Local Date
  • for Local Time
  • for Zoned Date Time
  • determine the port for the CASE Switch node
  • merge all flow variables
  • rename the new timestamp col to the old timestamp name
  • rename the new timestamp col
  • top: replace bottom: append
  • create column name
  • join with other input columns
  • sort by timestamp
  • create new RowIDs
  • map the selected window to the corresponding period
  • determine port
  • select time window

Nodes

Extensions

Links