meraki-analytics / cassiopeia

An all-inclusive Python framework for the Riot Games League of Legends API. Cass focuses on making the data easy and fun to work with, while providing all the tools necessary to create a website or do data analysis.
MIT License
553 stars 134 forks source link

Roles not assigned properly #194

Closed InvalidPointer closed 6 years ago

InvalidPointer commented 6 years ago

Got participant .side, .role, .lane:

Side.red Role.support Lane.bot_lane Side.blue Role.support Lane.bot_lane Side.blue SOLO Lane.top_lane Side.blue None Lane.jungle Side.blue Role.adc Lane.bot_lane Side.blue SOLO Lane.mid_lane Side.red None Lane.jungle Side.red SOLO Lane.mid_lane Side.red Role.adc Lane.bot_lane Side.red SOLO Lane.top_lane

Why roles can't be assigned for middle, jungle and top players according to their lanes automatically (Role.middle, Role.jungle and so on already exist)?

jjmaldonis commented 6 years ago

This isn't a Cass problem, this data is what the Riot API returns. We have a plugin for Cass that will do a much better lane assignment here: https://github.com/meraki-analytics/role-identification

Riot's algorithm for determining roles/lane is based on in-game data such as positions during the first 10 minutes. If the algorithm can't figure it out, it results in weird values. The lane information from champion select is for some reason not passed through to the API, but even if it were, it wouldn't be especially helpful due to things like swapping in champ select. If you want good data, I encourage you to use the plugin above. You'll need a champion.gg API key. Our algorithm works very well, and it works for current games as well as already-played matches.

InvalidPointer commented 6 years ago

Thanks for quick and awesome replies, they are very helpful!