swdata/calc_participants.py
2018-06-16 21:37:40 +08:00

26 lines
707 B
Python

# from G254
import json
from pathlib import Path
from island.match import Match
from island.matches import Matches
result = 0
count = 0
# ms = Matches.from_profile('CCCN')
ms = Matches.from_profile_expr(lambda r: 'LAB' in r and 'SURVIVE' in r and 'COMM' in r)
for m in ms.data:
result += len(m.query('player', 'join').where(lambda x: 'bot' not in x or x['bot'] == False).select('pid').raw_data)
count += 1
print(result)
print("avg:", result / count)
# 146 users
# casual: 324
# new(254-354, 全国复杂网络大会): 205
# new-2(375-421, 无交流): 320
# new-3(426-440, 有交流): 203
# new-4(443-472, 经典模式,无交流): 230
# new-5(474-,经典模式,有交流): 159
# total: 1117