{"id":22624646,"url":"https://github.com/barrettotte/lol-r-data-visual","last_synced_at":"2025-03-29T03:16:52.795Z","repository":{"id":114090770,"uuid":"177895620","full_name":"barrettotte/LoL-R-Data-Visual","owner":"barrettotte","description":"Use the Riot Games API to visualize League of Legends user's stats; An introduction to data visualization and R (Only 2 basic visualizations)","archived":false,"fork":false,"pushed_at":"2019-04-08T23:26:53.000Z","size":2992,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T13:13:19.023Z","etag":null,"topics":["data-visualization","ggplot","league-api","league-of-legends","r","riot-games-api"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barrettotte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-27T01:26:12.000Z","updated_at":"2024-02-26T03:19:51.000Z","dependencies_parsed_at":"2023-06-12T13:45:30.644Z","dependency_job_id":null,"html_url":"https://github.com/barrettotte/LoL-R-Data-Visual","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FLoL-R-Data-Visual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FLoL-R-Data-Visual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FLoL-R-Data-Visual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FLoL-R-Data-Visual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barrettotte","download_url":"https://codeload.github.com/barrettotte/LoL-R-Data-Visual/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246131335,"owners_count":20728303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visualization","ggplot","league-api","league-of-legends","r","riot-games-api"],"created_at":"2024-12-09T00:17:12.573Z","updated_at":"2025-03-29T03:16:52.769Z","avatar_url":"https://github.com/barrettotte.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LoL-R-Data-Visual\n\n\nUse the Riot Games API to visualize League of Legends user's stats; An introduction to data visualization and R.\n\nI also added an additional constraint to this side project, try to do the bulk of everything in R (wrangling, cleaning, filtering)\n\n\n## KDA vs Gold Graph (A friend's account)\n[![graph_kda_gold](https://raw.githubusercontent.com/barrettotte/LoL-R-Data-Visual/master/graphs/Digital/graph_kda_gold.png)](https://raw.githubusercontent.com/barrettotte/LoL-R-Data-Visual/master/graphs/Digital/graph_kda_gold.png)\n\n\n## Win Rate on Day of Week (A friend's account)\n[![graph_winrate_dow](https://raw.githubusercontent.com/barrettotte/LoL-R-Data-Visual/master/graphs/Mivaro/graph_winrate_dow.png)](https://raw.githubusercontent.com/barrettotte/LoL-R-Data-Visual/master/graphs/Mivaro/graph_winrate_dow.png)\n\n\n## Config\n```JSON\n{\n  \"db-server\": \"SERVER_NAME\",\n  \"db-name\": \"DB_NAME\",\n  \"db-port\": 1433,\n  \"db-user\": \"user\",\n  \"db-table\": \"[DB_NAME].[dbo].[Matches]\",\n  \"api-key\": \"RIOT_API\",\n  \"csv-data\": \"D:/some/where\",\n  \"graphs-output\": \"D:/graphs\",\n  \"summoners\": [\n    {\n      \"username\":\"Some Summoner\"\n    },\n    {\n      \"username\": \"Another Summoner\"\n    }\n  ]\n}\n```\n\n\n## Process\n* Create ```config.json``` to define Riot API key and specify summoners to gather data for\n* Run ```wrangler.R``` to gather all data, output to ```./Matches.csv```, and populate ```[database].[dbo].[tablename]```\n* Additional runs of either ```wrangler.R``` or ```append-matches.R``` will append data to ```[database].[dbo].[tablename]```\n* Generate visualizations with ```visualize.R```\n\n\n## wrangler.R Output\n```\n[1] \"HTTP Status_Code 200 ; Summoner = some-summoner\"\n[1] \"HTTP Status_Code 200 ; Matchlist   : \"\n[1] \"HTTP Status_Code 200 ; Matchlist  100 : 125\"\n[1] \"Found 838 match(es)\"\n[1] \"HTTP Status_Code 200 ; Matchlist  0 : 100\"\n[1] \"HTTP Status_Code 200 ; Matchlist  100 : 200\"\n[1] \"HTTP Status_Code 200 ; Matchlist  200 : 300\"\n[1] \"HTTP Status_Code 200 ; Matchlist  300 : 400\"\n[1] \"HTTP Status_Code 200 ; Matchlist  400 : 500\"\n[1] \"HTTP Status_Code 200 ; Matchlist  500 : 600\"\n[1] \"HTTP Status_Code 200 ; Matchlist  600 : 700\"\n[1] \"HTTP Status_Code 200 ; Matchlist  700 : 800\"\n[1] \"HTTP Status_Code 200 ; Matchlist  800 : 838\"\n[1] \"HTTP Status_Code 200 ; Match 1 - 2156013942\"\n[1] \"HTTP Status_Code 200 ; Match 2 - 2155966676\"\n[1] \"HTTP Status_Code 200 ; Match 3 - 2155295129\"\n[1] \"HTTP Status_Code 200 ; Match 4 - 2155281121\"\n[1] \"HTTP Status_Code 200 ; Match 5 - 2154585294\"\n```\n\n\n## Example Cached Match Data\n| gameId       | champion | season | timestamp       | role   | lane  | summoner        | accountId    | gameMode  | duration | stats       | \n| ------------ | -------- | ------ | --------------- | ------ | ----- | --------------- | ------------ | --------- | -------- | ----------- |\n| \"2932305512\" | \"122\"    | \"12\"   | \"1544835952093\" | \"SOLO\" | \"TOP\" | \"some-summoner\" | \"1234567890\" | \"CLASSIC\" | \"1615\"   | JSON String |\n\n\n## Sources\n* https://www.programmableweb.com/news/how-to-access-any-restful-api-using-r-language/how-to/2017/07/21\n* https://db.rstudio.com/getting-started/connect-to-database/\n* https://bookdown.org/yihui/rmarkdown/notebook.html\n* League of Legends\n  * https://developer.riotgames.com/api-methods/\n  * https://developer.riotgames.com/\n  * Items https://ddragon.leagueoflegends.com/cdn/9.6.1/data/en_US/item.json\n  * Champions https://ddragon.leagueoflegends.com/cdn/9.6.1/data/en_US/champion.json\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarrettotte%2Flol-r-data-visual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarrettotte%2Flol-r-data-visual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarrettotte%2Flol-r-data-visual/lists"}