(refresh_cache: bool = False, threshold_round: int = 15)
| 216 | |
| 217 | |
| 218 | def main(refresh_cache: bool = False, threshold_round: int = 15): |
| 219 | # build_data_structure(refresh_cache) |
| 220 | |
| 221 | data = [] |
| 222 | with open(DATA_CACHE) as f: |
| 223 | print("loading data from", DATA_CACHE) |
| 224 | data = [json.loads(line) for line in f] |
| 225 | print(f"Found {len(data)} player-tournament entries in cache.") |
| 226 | # print(data) |
| 227 | |
| 228 | print(f"\n=== Throwaway Files Per Player (threshold: round {threshold_round}) ===") |
| 229 | throwaway_df = analyze_throwaway_files_per_player(data, threshold_round=threshold_round) |
| 230 | print(throwaway_df) |
| 231 | throwaway_df.to_csv(ASSETS_SUBFOLDER / "throwaway_files_per_player.csv", index=False) |
| 232 | |
| 233 | print("\n=== Plotting Throwaway Files Bar Charts ===") |
| 234 | plot_throwaway_files_bar_chart(throwaway_df) |
| 235 | |
| 236 | |
| 237 | if __name__ == "__main__": |
no test coverage detected