# AoE2 Mining

NAC 4 civ stats
https://docs.google.com/spreadsheets/d/16dc1TQ2qOIfN9bmqhxKeYP_CErMccD6m2xhC-j0Mhh8/edit#gid=785059360

Model the group stage of NAC4
https://gist.github.com/aseyboldt/3fe105acbb15f74cfd659b4f44641ebd



Datensatz mit Drafts und Ergebnissen pro Map
Is there such a thing as a "home map"?
account for skill difference: against better players, it does not matter as much who choose the map 



Datensatz selber Erstellen für Plünderparty

Toornament API kostenpflichtig
https://www.toornament.com/de/pricing


Get Liquipedia Tournament data
https://liquipedia.net/ageofempires/Nili%27s_Apartment_Cup/4

Liquipedia APIs are parsing HTML, which is specific for each Game
Python wrapper for liquipedia API
https://github.com/c00kie17/liquipediapy
only dota, cs, smash

https://github.com/Ampa1R/liquipedia-api


https://liquipedia.net/ageofempires/api.php



contains link to Captains mode

use captains mode api to get draft

Take home maps from AoE2 CM?

https://aoe2cm.net/api

Draft Hera Lierrey final
https://aoe2cm.net/draft/FMHZx



Airflow:
Steps:
 - input aoecm link
 - download json data
 - run python script to process data 



Actually, the API-usage on the official site is straight forward.
A request to POST https://api.ageofempires.com/api/v2/AgeII/GetMPFull with content of {profileId: "199325", matchType: "3"} and a Header Content-Type: application/json for example will return JSON-encoded stats for Hera and RM. matchType corresponds to the leaderboard and is one of those: (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4).


https://github.com/SiegeEngineers/aoc-reference-data



Data format:
# NAC3 Group Stage
NAC3_Group_Stage,1000,1,TheViper,Hera,3-1,2020-01-04

https://github.com/SiegeEngineers/aoc-reference-data/blob/master/data/events/series.csv


Even if toornament API could be used: it only contains the set result, not the individual games

Score not enough to know who won which maps?
2:0 -> HOST won both
2:1 -> Host lost Neutral OR opponents home map


Data of who won which map can be retrieved via AoE Api

