The Time Series tool in Savant allows you to perform complex aggregations on time series data without the need for extensive data parsing or extraction. With this tool, you can easily group and analyze data based on date or datetime columns, making it ideal for tasks such as tracking trends, seasonality, or historical patterns in your dataset.
Adding the Time Series tool
1. Navigate to your analysis.
Configuration
Select the Date Field (date or datetime column) from your dataset that you want to use for aggregations. The selected column will be the basis for your time series analysis.
Choose the Periodicity. Select the time period for aggregation (day, week, month, quarter, year, decade). The data will be grouped based on this periodicity.
Start Date (Optional): You can set a minimum date for your aggregations. Data before this date will not be considered.
End Date (Optional): Similarly, you can set a maximum date for your aggregations. Data after this date will not be included.
If you want to further group your data based on other columns, you can use the Group By (Optional) feature. Add columns by clicking the plus icon and selecting the desired column from the drop-down.
To create an Aggregation column in your dataset, click the plus button under Aggregations.
Select the field or use the expression option from the Argument dropdown.
Choose the appropriate Calculation for the data type of the argument selected, and provide a New field name if desired.
Click Apply to confirm the aggregation.
To add another aggregated column, click the plus button under your existing aggregation, configure the new aggregation, and click Apply.
Deleting Aggregations: To delete an aggregated column, click the trash can icon next to the aggregation.
Output Fields
When you use the Time Series tool, you'll notice two new fields appended to your dataset:
1. Period Name:
The "Period Name" field includes all the periods that have been aggregated in your dataset based on the selected date field and periodicity.
2. Period Offset:
The "Period Offset" field represents a numeric value that indicates the period's relationship to the current period. Negative values indicate periods from the past, and positive values indicate periods in the future. If a period does not exist within the specified date range, the aggregations will be represented as zero.
Time Period
The Start Date and End Date dates are optional configurations that you can set to control the boundaries of this date range.
Start Date
The Start Date option in the Time Series tool allows you to set a minimum date for your aggregations.
If the Start Date option in the Time Series tool is left empty, the minimum date in the dataset will be set as the start date for your aggregations.
Any data points with dates earlier than the specified Start Date or the minimum date in the dataset will not be included in the analysis.
End Date
On the other hand, the End Date option lets you set a maximum date for your aggregations.
If the End Date option in the Time Series tool is left empty, the maximum date in the dataset will be set as the end date for your aggregations.
Any data points with dates later than the specified date in the End Date field or the maximum date in the dataset will not be included in the analysis.
Aggregations
Aggregation Function | Description |
COUNT | Returns the number of rows in a group or the total number of rows in a table if used without grouping. |
COUNT DISTINCT | Returns the number of unique values in a column or a combination of columns. |
MIN | Returns the minimum value from a column. |
MAX | Returns the maximum value from a column. |
AVG | Returns the average value of a numeric column. |
SUM | Returns the sum of numeric values in a column. |
STDDEV | Returns the standard deviation of a set of numeric values in a column. |
VAR | Returns the variance of a set of numeric values in a column. |
MEDIAN | Returns the middle value of a numeric column when the data is ordered. If even values, returns the average. |
CONCAT | Concatenates two or more strings together. |
CONCAT DISTINCT | Concatenates two or more unique string values together. |