diff --git a/competition/data.py b/competition/data.py index 1eb6447..da8117a 100644 --- a/competition/data.py +++ b/competition/data.py @@ -1,6 +1,7 @@ import requests import pull import pandas as pd +import json def pull_new_tba_matches(apikey, competition, cutoff): api_key= apikey @@ -11,6 +12,12 @@ def pull_new_tba_matches(apikey, competition, cutoff): out.append({"match" : i['match_number'], "blue" : list(map(lambda x: int(x[3:]), i['alliances']['blue']['team_keys'])), "red" : list(map(lambda x: int(x[3:]), i['alliances']['red']['team_keys'])), "winner": i["winning_alliance"]}) return out +def pull_new_tba_matches_manual(apikey, competition, cutoff): + filename = competition+"-wins.json" + with open(filename, 'r') as f: + data = json.load(f) + return data + def get_team_match_data(client, competition, team_num): db = client.data_scouting mdata = db.matchdata