-
Notifications
You must be signed in to change notification settings - Fork 0
PlayerData
Initialization:
- Class
PlayerData
takes the following params:- Season object (See
SeasonData
documentation here) - Player ID or Player name
- Season object (See
>>> from fantasylcs import SeasonData, PlayerData
>>> season = SeasonData("na", 16)
>>> doublelift = PlayerData(season, 1803)
>>> doublelift = PlayerData(season, "doublelift") # works as well
Get Player ID
- Returns the player id
>>> doublelift.get_player_id()
>>> 1803
Get Player Name
- Returns the player name
>>> doublelift.get_name()
'Doublelift'
Get Photo URL
- Returns the photo url of the player
>>> doublelift.get_photo_url()
'https://lolstatic-a.akamaihd.net/esports-assets/production/player/doublelift-d4lzeawl.png'
Get Positions
- Returns a list of all the player's positions
>>> doublelift.get_positions()
['AD_CARRY']
Get Team ID
- Returns the player's team id
>>> doublelift.get_team_id()
202
Get Riot ID
- Returns the player's riot id
>>> doublelift.get_riot_id()
153
Get trends by week
- Returns a dictionary of all the player's weekly trends
>>> doublelift.get_trends_by_week()
{
'1': [0.7601478540625641, 0.7131220480525703, 10418, 175, 259],
'2': [0.9408268565083927, 0.9207759127424727, 14098, 179, 119],
'3': [0.9591134887275506, 0.9340211438033371, 14666, 162, 205],
'4': [0.964314883457938, 0.9045674436137463, 14398, 124, 213],
'5': [0.9729190066142518, 0.9370398103082491, 15017, 195, 159],
'6': [0.9619160039761432, 0.8822688866799204, 14201, 130, 342],
'7': [0.9578529812817652, 0.8756043138713276, 14127, 213, 312],
'8': [0.942357753811826, 0.8498202553613488, 13711, 107, 389],
'9': [0.942357753811826, 0.8498202553613488, 13711, 0, 0]
}
Get total matches played
- Returns the total matches played
>>> doublelift.get_matches_played()
14
Get all match stats
- Returns a list of all matches played by the player
>>> doublelift.get_all_match_stats()
[
[1803, 202, 2000.0, 1, 4, 0, 9, 328, 1, 0, 0, 0, 0],
[1803, 202, 2006, 1, 0, 2, 1, 209, 0, 0, 0, 0, 0],
[1803, 202, 1927, 1, 2, 0, 4, 351, 0, 0, 0, 0, 0],
[1803, 202, 1931, 1, 0, 2, 1, 306, 0, 0, 0, 0, 0],
[1803, 202, 1932, 1, 5, 1, 8, 308, 1, 0, 0, 0, 0],
[1803, 202, 1936, 1, 5, 0, 5, 289, 0, 0, 0, 0, 0],
[1803, 202, 2033, 1, 2, 2, 1, 291, 0, 0, 0, 0, 0],
[1803, 202, 2047, 1, 2, 4, 7, 518, 0, 0, 0, 0, 0],
[1803, 202, 2053, 1, 3, 0, 6, 324, 0, 0, 0, 0, 0],
[1803, 202, 2056, 1, 2, 1, 2, 460, 0, 0, 0, 0, 0],
[1803, 202, 2057, 1, 2, 2, 2, 494, 0, 0, 0, 0, 0],
[1803, 202, 2071, 1, 4, 2, 1, 445, 0, 0, 0, 0, 0],
[1803, 202, 2077, 1, 1, 2, 5, 302, 0, 0, 0, 0, 0],
[1803, 202, 1994, 1, 4, 0, 5, 289, 1, 0, 0, 0, 0]
]
Get stats of a particular match
-
Returns match stats of a player given a number in a range from the first match to the most recent match
-
Parameters:
- match number - # of the match to get
>>> doublelift.get_match_stats(0)
[1803, 202, 2000.0, 1, 4, 0, 9, 328, 1, 0, 0, 0, 0]
Defined values following the order of the list:
Player ID
- 1803
Team ID
- 202
Match ID
- 2000.0
# games played
- 1
kills
- 4
deaths
- 0
assists
- 9
cs
- 328
10+ K/A
- 1
double-kill
- 0
triple-kill
- 0
quadra-kill
- 0
penta-kill
- 0
Get all projected match stats
- Returns a list of all projected matches to be played by the player
>>> doublelift.get_all_projected_stats()
[
[1803, 202, 1936, 1, 3.3, 2.1, 5, 330.2, 0, 0.1, 0, 0, 0],
[1803, 202, 2000.0, 1, 4.1, 2, 5.7, 395, 0, 0.1, 0, 0, 0],
[1803, 202, 2053, 1, 5.399, 1.84, 6.273, 341.033, 0, 0.107, 0.0194, 0.0061, 0],
[1803, 202, 2057, 1, 4.181, 1.39, 6.415, 373.876, 0, 0.111, 0.0234, 0.0061, 0],
[1803, 202, 1932, 1, 4.557, 1.72, 5.429, 373.296, 0, 0.089, 0.0234, 0.0071, 0],
[1803, 202, 1994, 1, 4.371, 1.55, 6.756, 506.855, 0, 0.13, 0.0194, 0.0081, 0],
[1803, 202, 2071, 1, 4.434, 1.85, 5.678, 334.285, 0, 0.099, 0.0174, 0.0061, 0],
[1803, 202, 1931, 1, 3.954, 2.18, 4.806, 355.536, 0, 0.094, 0.0184, 0.0061, 0],
[1803, 202, 2056, 1, 4.806, 1.77, 5.514, 387.316, 0, 0.114, 0.0184, 0.0061, 0],
[1803, 202, 2047, 1, 5.119, 1.25, 5.508, 355.082, 0, 0.096, 0.0214, 0.0071, 0],
[1803, 202, 2077, 1, 3.763, 1.75, 4.713, 373.966, 0, 0.095, 0.0164, 0.0061, 0],
[1803, 202, 2006, 1, 3.829, 1.56, 5.14, 362.059, 0, 0.106, 0.0184, 0.0071, 0],
[1803, 202, 1927, 1, 5.074, 1.42, 6.326, 369.38, 0, 0.114, 0.0204, 0.0071, 0],
[1803, 202, 2033, 1, 4.257, 1.96, 5.197, 356.593, 0, 0.115, 0.0164, 0.0071, 0],
[1803, 202, 2003, 1, 3.762, 2.07, 5.618, 312.792, 0, 0.089, 0.0164, 0.0061, 0],
[1803, 202, 1989, 1, 4.534, 1.78, 6.657, 443.378, 0, 0.114, 0.0214, 0.0071, 0],
[1803, 202, 2013, 1, 3.816, 1.8, 5.351, 336.298, 0, 0.106, 0.0174, 0.0061, 0],
[1803, 202, 1958, 1, 4.591, 1.6, 5.881, 342.696, 0, 0.106, 0.0174, 0.0081, 0]
]
Get stats of a particular projection
-
Returns projected stats of a player given a number in a range from the first match to the most recent match
-
Parameters:
- match number - # of the match to get
>>> doublelift.get_projected_stats(0)
[1803, 202, 1936, 1, 3.3, 2.1, 5, 330.2, 0, 0.1, 0, 0, 0]
Defined values following the order of the list:
Player ID
- 1803
Team ID
- 202
Match ID
- 1936
# games played
- 1
kills
- 3.3
deaths
- 2.1
assists
- 5
cs
- 330.2
10+ K/A
- 0
double-kill
- 0.1
triple-kill
- 0
quadra-kill
- 0
penta-kill
- 0