Add the ability to "rollup" values in a time series #554
Reference in New Issue
Block a user
Delete Branch "account-rollups"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Another prerequisite PR for #543 that aims to make it much easier to work with time series and aggregated data.
Overview
This PR introduces two important domain concepts:
TimeSeries+TimeSeries::ValueValueGroupTime Series Data
Maybe will be presenting user data in a time series format often. The
TimeSeriesmodel accepts an array ofTimeSeries::Valueobjects, which have adateandvalue. This is a generic domain concept that works with numeric and money values:It also works with collections via the
from_collectionclass method:Value Groups
The purpose of value groups is to recursively "roll up" both individual values and time series arrays based on an arbitrary hierarchy. For example, we can create a hierarchy of assets: