-
Notifications
You must be signed in to change notification settings - Fork 0
TeamData
Initialization:
- Class
TeamData
takes the following params:- Season object (See
SeasonData
documentation here) - Team ID or Team name
- Season object (See
>>> from fantasylcs import SeasonData, TeamData
>>> season = SeasonData("na", 16)
>>> liquid = TeamData(season, 202)
>>> liquid = TeamData(season, "team liquid") # works as well
Get Team ID
- Returns the team id
>>> liquid.get_team_id()
202
Get Team Name
- Returns the team name
>>> liquid.get_name()
'Team Liquid'
Get Acronym
- Returns the acronym of the team name
>>> liquid.get_acronym()
'TL'
Get Region
- Returns the region of the team
>>> liquid.get_region()
'NA'
Get Positions
- Returns a list of the team's positions
>>> liquid.get_positions()
['TEAM']
Get Riot ID
- Returns the team's riot id
>>> liquid.get_riot_id()
53
Get trends by week
- Returns a dictionary of all the team's weekly trends
>>> liquid.get_trends_by_week()
{
'1': [0.6736942980354576, 0.5955233075501404, 8700, 224, 465],
'2': [0.8691137090980341, 0.817255567892365, 12513, 666, 155],
'3': [0.8867660170678895, 0.827283148643485, 12990, 471, 482],
'4': [0.8778664321166049, 0.7708739083998241, 12270, 159, 370],
'5': [0.8943591663546736, 0.8274054661175589, 13260, 540, 353],
'6': [0.8683523856858847, 0.7645999005964215, 12307, 203, 625],
'7': [0.8486968365009596, 0.7367671639943044, 11901, 141, 440],
'8': [0.8116103478153237, 0.6852333209555638, 11072, 62, 672],
'9': [0.8117960143582127, 0.6854189874984528, 11075, 0, 0]
}
Get total matches played
- Returns the total matches played
>>> liquid.get_matches_played()
14
Get all match stats
- Returns a list of all matches played by the team
>>> liquid.get_all_match_stats()
[
[202, 2000.0, 1, 0, 8, 1, 2, 1, 0, 0],
[202, 2006, 1, 1, 0, 0, 0, 0, 1, 0],
[202, 1927, 1, 1, 10, 1, 4, 1, 0, 0],
[202, 1931, 1, 0, 0, 0, 0, 0, 1, 0],
[202, 1932, 1, 1, 9, 1, 3, 1, 0, 1],
[202, 1936, 1, 1, 10, 1, 2, 1, 0, 1],
[202, 2033, 1, 0, 3, 0, 0, 0, 1, 0],
[202, 2047, 1, 1, 6, 0, 0, 0, 1, 0],
[202, 2053, 1, 1, 9, 1, 2, 1, 0, 1],
[202, 2056, 1, 0, 10, 2, 5, 1, 0, 0],
[202, 2057, 1, 0, 5, 1, 3, 0, 1, 0],
[202, 2071, 1, 1, 5, 1, 3, 0, 1, 0],
[202, 2077, 1, 0, 7, 1, 2, 1, 0, 0],
[202, 1994, 1, 1, 8, 1, 2, 1, 0, 1]
]
Get stats of a particular match
-
Returns match stats of the team given a number in a range from the first match to the most recent match
-
Parameters:
- match number - # of the match to get
>>> liquid.get_match_stats(0)
[202, 2000.0, 1, 0, 8, 1, 2, 1, 0, 0]
Defined values following the order of the list:
Team ID
- 202
Match ID
- 2000.0
# games played
- 1
First Blood
- 0
Towers Destroyed
- 8
Baron Kills
- 1
Dragon Kills
- 2
Win
- 1
Loss
- 0
<30 minute win
- 0
Get all projected match stats
- Returns a list of all projected matches to be played by the team
>>> liquid.get_all_projected_stats()
[
[202, 1936, 1, 0, 6, 0.7, 2.4, 1, 0, 0],
[202, 2000.0, 1, 1, 7, 1.1, 2.8, 1, 0, 0],
[202, 2053, 1, 1, 7, 0.86, 2.57, 1, 0, 0],
[202, 2057, 1, 1, 7, 0.81, 2.62, 1, 0, 0],
[202, 1932, 1, 1, 8, 1.04, 2.62, 1, 0, 0],
[202, 1994, 1, 1, 9, 1.11, 3.88, 0, 0, 0],
[202, 2071, 1, 1, 8, 0.98, 2.78, 1, 0, 0],
[202, 1931, 1, 1, 7, 0.82, 2.5, 0, 0, 0],
[202, 2056, 1, 1, 7, 1.13, 2.97, 1, 0, 0],
[202, 2047, 1, 1, 8, 0.78, 3.54, 1, 0, 0],
[202, 2077, 1, 1, 7, 0.79, 2.1, 1, 0, 0],
[202, 2006, 1, 1, 8, 0.79, 3.34, 1, 0, 0],
[202, 1927, 1, 1, 7, 1.06, 3.08, 1, 0, 0],
[202, 2033, 1, 1, 7, 0.94, 2.56, 1, 0, 0],
[202, 2003, 1, 1, 7, 0.7, 2.23, 1, 0, 0],
[202, 1989, 1, 1, 8, 1.1, 2.64, 1, 0, 0],
[202, 2013, 1, 0, 7, 0.77, 2.3, 0, 0, 0],
[202, 1958, 1, 1, 7, 0.89, 2.76, 0, 0, 0]
]
Get stats of a particular projection
-
Returns projected stats of a team given a number in a range from the first match to the most recent match
-
Parameters:
- match number - # of the match to get
>>> liquid.get_projected_stats(0)
[202, 1936, 1, 0, 6, 0.7, 2.4, 1, 0, 0]
Defined values following the order of the list:
Team ID
- 202
Match ID
- 1936.0
# games played
- 1
First Blood
- 0
Towers Destroyed
- 6
Baron Kills
- 0.7 (not sure why this is a decimal..)
Dragon Kills
- 2.4 (not sure why this is a decimal..)
Win
- 1
Loss
- 0
<30 minute win
- 0