GroupFrames

Renames or groups frames that have common attributes.

Parameters

NameDefaultMeaning
columnThe attribute name to group the timeframes by
asThe updated name to be used
valuesThe values that must be matched in order to be renamed

Description

This sets an attribute on each time-frame based on a filter.

It searches through each time frame, looking for any with an attribute called column.

If it finds one, and it's one of the options in the values array, the value of column is changed to the value as'.

This is commonly used after a call to timeframes to group similar times.

Example

We have the following time frames…

StartEndType
06:00AM08:00AMPROD
08:00AM08:30AMBREAK
08:30AM11:30AMPROD
11:30AM12:30AMLUNCH
12:30AM06:00PMPROD
06:00PM07:00PMDINNER

We don't really need to differentiate our different meal breaks (BREAK, LUNCH and DINNER), so we can use the following layer…

{
   "type": "groupframes",
   "groupby": "Type",
   "as": "MEAL",
   "values": ["BREAK","LUNCH","DINNER"]
}

This will change the group name on each of the three meal breaks to MEAL.