Options
All
  • Public
  • Public/Protected
  • All
Menu

The team class

Hierarchy

  • Team

Implements

  • ITeam

Index

Constructors

  • new Team(id: string, name: string): Team
  • Parameters

    • id: string
    • name: string

    Returns Team

Properties

id: string

ID of the team as defined by the data provider.

name: string

Name of the team.

players: Player[]

Players assigned to the team, the size of the list depends from the number of games used in the analysis.

Accessors

  • The position of the players of the opponent team, available only if we have tracking data

    Returns PlayerGroup

  • The position of the players of the team, available only if we have tracking data

    Returns PlayerGroup

Methods

  • addAttribute(name: string, value?: string): void
  • Add an attribute to the team, this attribute will persist on the team until the end of the game, starting from the current event timestamp.

    Parameters

    • name: string

      name of the attribute

    • Optional value: string

      value of the attribute

    Returns void

  • depth(): number
  • Returns the depth of the team in meters, available only if we have tracking data. DEPTH is the horizontal distance between the front-most and back-most player of the team.

    Returns number

    the team depth in meters or 0 if no tracking data is available

  • getAttribute(name: string): string
  • Get the value a team specific attribute, returns undefined if the attribute is not available for the given team in the current match or it's available from a timestamp greater than the one in the current event.

    Parameters

    • name: string

      name of the attribute

    Returns string

    an attribute value or undefined

  • hasAttribute(name: string): boolean
  • Check if the given team has a particular attribute active, returns false if the attribute is not available for the given team in the current match or it's available from a time greater than the one in the current event.

    Parameters

    • name: string

      name of the attribute

    Returns boolean

    true if a player attribute is available for the given player.

  • is(team: string | ITeam): boolean
  • Returns if the team is the one in the paramater.

    Parameters

    • team: string | ITeam

      the name, the id or the team object itself

    Returns boolean

  • resetAttribute(name: string): boolean
  • Reset the given attribute of the team from the timestamp of the current event. The attribute will not be available anymore on the team from that timestamp and on next events.

    Parameters

    • name: string

      name of the attribute

    Returns boolean

    true if the attribute was available for the given team

  • width(): number
  • Returns the width of the team in meters, available only if we have tracking data.

    WIDTH is the vertical distance between the left-most and right-most player of the team

    Returns number