This class is under development

still, there are few things to try out. Remember, you need to set up dota API to use Match. Read how to make it in README.rst.


In [1]:
from atod import Match

In [2]:
# just a random match
match_id = 1000193456
match = Match(match_id)

In [3]:
# get the description of the match in terms of laning and heroes types
d = match.get_description(include=['laning', 'type'])
d


Out[3]:
side     variables                 
radiant  (laning, requires_farm)           8
         (laning, requires_setup)          5
         (laning, requires_babysit)        0
         (laning, provides_setup)          5
         (laning, solo_desire)             2
         (laning, survival_rating)         1
         (laning, provides_babysit)        7
         (type, push_support)              2
         (type, stun_support)              0
         (type, semi_carry)                0
         (type, hard_carry)                1
         (type, nuker)                     2
         (type, tank)                      2
         (type, pure_support)              1
         (type, ganker)                    2
dire     (laning, requires_farm)           6
         (laning, requires_setup)          7
         (laning, requires_babysit)        2
         (laning, provides_setup)          8
         (laning, solo_desire)             0
         (laning, survival_rating)         4
         (laning, provides_babysit)        8
         (type, push_support)              4
         (type, stun_support)              1
         (type, semi_carry)                0
         (type, hard_carry)                0
         (type, nuker)                     0
         (type, tank)                      2
         (type, pure_support)              2
         (type, ganker)                    3
result   radiant_win                   False
dtype: object

What's up with indexes? This is how pandas MultiIndex looks when you are not expirienced user (like me). But exactly that thing makes Hero descriptions very beautiful!

So, how to get how many point radiant team have in nuke power (type, nuker):


In [4]:
d['radiant'][('type', 'nuker')]


Out[4]:
2

Yes, this is ugly, I will try to fix this ASAP.

Here is another example of usage to make file look bigger.


In [5]:
print(match.get_description(include=['role']))


side     variables        
radiant  (role, disabler)         5
         (role, nuker)            6
         (role, escape)           3
         (role, durable)          2
         (role, initiator)        3
         (role, pusher)           3
         (role, support)          4
         (role, jungler)          1
         (role, carry)            3
dire     (role, disabler)         6
         (role, nuker)            5
         (role, escape)           6
         (role, durable)          6
         (role, initiator)        6
         (role, pusher)           0
         (role, support)          3
         (role, jungler)          1
         (role, carry)            6
result   radiant_win          False
dtype: object

In [ ]: