Created
January 21, 2017 18:45
-
-
Save Lauler/4eb2b284968707f963c29c89c2d44c75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(jsonlite) | |
faton <- fromJSON("https://api.opendota.com/api/players/36933/matches") # My matches and basic stats | |
fatonmatch <- fromJSON("https://api.opendota.com/api/matches/2863026979") # one of my parsed matches | |
# Need to make SQL-call to | |
# https://api.opendota.com/api/explorer in order to get a full list of professional matches | |
promatches <- fromJSON("https://api.opendota.com/api/proMatches") | |
faton$match_id # matchid of all my matches | |
faton$kills # My kills in all matches | |
faton$deaths # My deaths | |
faton$hero_id # hero_id picked (id key needs tranforming to hero name) | |
str(promatches) | |
str(fatonmatch, max.level = 2) # structure of a match parsed by opendota | |
fatonmatch$players$player_slot | |
fatonmatch$players$personaname # nicknames of the players in player_slot-order | |
fatonmatch$players$kills # Kills | |
fatonmatch$players$kills_log # list of which heroes playey_slot 1:10 killed, and when they were killed | |
fatonmatch$players$lane_pos$`128` | |
fatonmatch$radiant_gold_adv | |
fatonmatch$duration/60 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment