---
# System prepended metadata

title: DV Project Phase 1 Proposal - Ernie

---

# DV Project Phase 1 Proposal - Ernie

## Data source
League of Legends [API](https://developer.riotgames.com/apis)
[Data Dragon](https://riot-api-libraries.readthedocs.io/en/latest/ddragon.html) (champions, runes, and items)

### Available data types

- numeric
	- discrete
		- e.g. **kills, pentaKills**
	- continuous
		- e.g. **goldEarned/Spent, totalDamageDealt**
- spatial
	- e.g. player's position at each time frame
- categorical
	- e.g. **lane, item0-6**
- temporal
	- e.g. attribute above at each time frame
- binary
	- e.g. **win**


## Visualization target

300 chanllengers' matches on NA server.

||single player|multi player|
|-|-|-|
|**intra-match stats**|personal growth within one match|team growth within one match|
|**inter-match stats**|relation between a player's every matches|relation between all challengers' every matches|

### 10 questions to answer with these data visually

1. Winning possibility over time (possibly require an ML server)
2. Total gold difference over time
3. Which champion is banned most frequently
4. Number of objectives killed over time (baron, champion, dragon, inhibitor, riftHerald, tower)
5. Kill map, damage dealt/receive, kill strike, ..., etc
6. 

## Query example
1. [Get the list of players in solo rank 5v5 challenger league.](#Get-the-list-of-players-in-solo-rank-5v5-challenger-league)
2. [Get the player with the highest league points.](#Get-the-player-with-the-highest-league-points)
3. [Get the player info by the `summonerId`](#Get-the-player-info-by-the-summonerId)
4. [Get the match history by the `puuid`](#Get-the-match-history-by-the-puuid)
5. [Choose a match to look into](#Choose-a-match-to-look-into)


#### Get the list of players in solo rank 5v5 challenger league.
```
GET https://na1.api.riotgames.com/lol/league/v4/challengerleagues/by-queue/RANKED_SOLO_5x5
``` 
Result:
```sj
{
  tier: 'CHALLENGER',
  leagueId: 'd609d862-7a3f-3f35-8c18-1fbc8198f70a',
  queue: 'RANKED_SOLO_5x5',
  name: "Swain's Villains",
  entries: [
    {
      summonerId: 'vU0waGg4fK_02Absmoqcn2cF4daBkJ0Y8yUlQtl1WBC0wWko',
      summonerName: 'EU Red',
      leaguePoints: 887,
      rank: 'I',
      wins: 97,
      losses: 71,
      veteran: false,
      inactive: false,
      freshBlood: false,
      hotStreak: false
    },
    {
      summonerId: '2rcrcKbYVdvZiQRk0tDr9QC8OrCbtdQYE4-dw4Q3JqnWXrA',
      summonerName: 'c2 meteos',
      leaguePoints: 992,
      rank: 'I',
      wins: 148,
      losses: 117,
      veteran: true,
      inactive: false,
      freshBlood: false,
      hotStreak: true
    },
    ... 298 more items
  ]
}

```

#### Get the player with the highest league points.
```js
const highest = Math.max(
  ...challengerLeague.entries.map(c => c.leaguePoints)
)
challengerLeague.entries.filter(c => c.leaguePoints === highest)
```
Result:
```js
[
  {
    summonerId: '0k4_lRS1qIzVNTxZmfqHXg-IoBlkEtCVkJIgh6FgWHPbRzospfdp6joi7g',
    summonerName: 'TwtchTV Sheiden',
    leaguePoints: 1524,
    rank: 'I',
    wins: 160,
    losses: 119,
    veteran: true,
    inactive: false,
    freshBlood: false,
    hotStreak: false
  }
]
```

Match the first player on [op.gg leaderboards](https://na.op.gg/leaderboards/tier?region=na) (at the time this proposal drafted).

#### Get the player info by the `summonerId`
```
GET https://na1.api.riotgames.com/lol/summoner/v4/summoners/0k4_lRS1qIzVNTxZmfqHXg-IoBlkEtCVkJIgh6FgWHPbRzospfdp6joi7g
```
Result:
```json=
{
    "id": "0k4_lRS1qIzVNTxZmfqHXg-IoBlkEtCVkJIgh6FgWHPbRzospfdp6joi7g",
    "accountId": "VLdHEMcui_nt41tOzDPCoChBsWvX0-VcK-6MLdj0xQuhU5L9KCDRWUtv",
    "puuid": "m5ASA7xtPb09yekhnGW4UQglNxWG0ymmqwFC3h4A8NeBmPU8QoV83eeRdt3v1xLRVi1SDA9kxJDtYA",
    "name": "TwtchTV Sheiden",
    "profileIconId": 5246,
    "revisionDate": 1647057215000,
    "summonerLevel": 79
}
```

#### Get the match history by the `puuid`
```
GET https://americas.api.riotgames.com/lol/match/v5/matches/by-puuid/m5ASA7xtPb09yekhnGW4UQglNxWG0ymmqwFC3h4A8NeBmPU8QoV83eeRdt3v1xLRVi1SDA9kxJDtYA/ids
```
Result:
```json=
[
    "NA1_4244352147",
    "NA1_4243618621",
    ...
]
```

#### Choose a match to look into
```
GET https://americas.api.riotgames.com/lol/match/v5/matches/NA1_4244352147
GET https://americas.api.riotgames.com/lol/match/v5/matches/NA1_4244352147/timeline
```
Then we'll get a rich dataset to explore & visualize.