Counters for the sequence, useful for filtering
Duration of the sequence (in seconds)
Game time of the last event in the sequence.
Events that compose the sequence
Game that this sequence is associated with.
ID of the sequence, generated while parsing the game
Number of events composing the sequence, it's the same as events.length
An optional name for the sequence, useful in custom sequences or for naming built in sequences while processing them.
Period in which the sequence occurred
The rule that created this event, undefined if it comes from the data source.
Game time of the first event in the sequence.
Team that this sequence is associated with.
The sequence specific attributes
First event of the sequence
Last event of the sequence
Last event of the sequence of the team that started the sequence
Get the opponent team (the team that is not the one performing the events in this sequence)
Add an attribute to a sequence. The attribute will be visible in all the events of the sequence and in the sequence itself. NOTE attributes in sequences require at least one event to be added to the sequence.
name of the attribute to add
value of the attribute (can be null for boolean attributes)
Add an event to a sequence
the event to add to the sequence
Returns the distance that have been gained in this sequence. The distance is expressed as percent of the field length, to get the distance in meters for football simpy multiply it by 105 and divide it by 100. If you want to get the maximum distance gained in this seuqnece use maxDistanceGained()
the distance gained in this sequence as percentage of the field length.
Get the value of an attribute. NOTE: use hasAttribute() if you want to query a boolean attribute.
name of the attribute
the value of the attribute or undefined if the attribute is not present
Check if a sequence contains a given attribute.
name of the attribute
a boolean value indicating if the attribute is present
Returns true if the sequence has EXACTLY the given number of occurrencies of the given event type.
type of the event
number of occurrencies
Returns true if the sequence has more than the given number of occurrencies of the given event type.
type of the event
number of occurrencies
Returns true if the sequence has at least one event of the given type.
type of the event
Returns the maximum distance that have been gained in this sequence. The distane is expressed as percent of the field length, to get the distance in meters for football simpy multiply it by 105 and divide it by 100. The most forward event may be not the last one. If you want to get the distance gained from the first and the last event use distanceGained().
The maximum distance gained in percentage of the field length.
A sequence of events by the same team