Time Series
The Time Series module provides tools for exploring and analysing time series data. It is built on the modern tidyverts ecosystem, providing flexible handling of various time series formats and powerful visualisation capabilities.
This is the recommended Time Series module. If you need access to the older version (pre-2023), see Time Series (Legacy).
This documentation was generated based on source code inspection and may not fully reflect the current software. Items to verify:
- Exact menu paths and UI controls
- Available plot types and their options
- Supported time format patterns
- Settings and their effects
Features
- Flexible time formats: Supports various time frequencies (yearly, quarterly, monthly, weekly, daily, hourly)
- Multiple series: Handle panel data with "keys" to analyse multiple related time series
- Modern decomposition: STL decomposition to separate trend, seasonal, and residual components
- ARIMA forecasting: Automatic model selection for accurate predictions
- Interactive plots: Built with ggplot2 for high-quality, customisable graphics
Getting Started
Accessing the Module
Go to Advanced → Time Series from the menu bar.
Preparing Your Data
Your data should have:
- A time/date column - containing dates, timestamps, or time codes
- One or more measurement columns - the values to analyse over time
- (Optional) Key columns - categorical variables identifying different series in panel data
Time Information
Select your time variable from the dropdown. iNZight will automatically detect the time format if possible. Supported formats include:
| Format | Examples |
|---|---|
| Dates | 2023-01-15, 15/01/2023, Jan 2023 |
| Quarters | 2023Q1, 2023-Q1, Q1 2023 |
| Year-Month | 2023M01, 2023-01, Jan-2023 |
| Year-Week | 2023W01, 2023-W01 |
| Years | 2023, Y2023 |
Working with Multiple Series (Keys)
If your data contains multiple time series (e.g., sales data for different regions), select the identifying variable(s) as Keys. This allows iNZight to:
- Plot all series together for comparison
- Decompose and forecast each series separately
- Highlight specific series of interest
Plot Types
Select the plot type from the Plot Type dropdown in the module panel.
Default Plot
Shows the raw time series with an optional smoother overlay. Use this to:
- Identify overall trends
- Spot outliers or unusual patterns
- Compare multiple series
Options:
- Show smoother: Toggle trend line on/off
- Smoothness: Adjust the smoothness of the trend (0-100)
- Seasonally adjust series: Remove seasonal effects to see underlying trend
Decomposition Plot
Breaks the time series into components:
- Trend: The long-term direction of the data
- Seasonal: Repeating patterns within each period
- Remainder: What's left after removing trend and season
Choose between Additive (Season + Trend + Remainder = Data) or Multiplicative (Season × Trend × Remainder = Data) decomposition based on whether seasonal variation changes with the level of the series.
Seasonal Plot
Displays the seasonal pattern by overlaying data from each period (year, week, etc.) on the same axes. This helps identify:
- Consistent seasonal patterns
- Changes in seasonal behaviour over time
- Anomalous periods
Forecast Plot
Generates predictions for future time points using ARIMA models. The plot shows:
- Historical data
- Fitted values
- Future predictions with confidence intervals
Settings
Seasonal Pattern
- Additive: Use when seasonal fluctuations are roughly constant regardless of the level
- Multiplicative: Use when seasonal fluctuations grow proportionally with the level
Variable Types
- Numeric Variables: Standard time series of measurements
- Categorical Variables: Track how category proportions change over time
Range Settings
Adjust the time range to focus on specific periods of interest. This affects both the display and the data used for model fitting.
Tips
- Start with the default plot to get an overview of your data
- Check decomposition to understand the underlying structure
- Use seasonal plots to verify seasonal patterns before forecasting
- Adjust smoothness - lower values show more detail, higher values show clearer trends
- For forecasting, ensure you have enough historical data (typically at least 2-3 complete seasonal cycles)
Additional Resources
- tidyverts documentation - Learn about the underlying packages
- Forecasting: Principles and Practice - Comprehensive time series textbook
- CensusAtSchool NZ Time Series Resources