import json

with open(r'C:\allgifted\mathapi11v2\_work_barmodels\audit_r6\r6_g0.json', 'r') as f:
    data = json.load(f)

judgments = {}
for e in data['entries']:
    j = e['judgment']
    judgments[j] = judgments.get(j, 0) + 1

print('Judgment counts:')
for j, c in sorted(judgments.items()):
    print(f'  {j}: {c}')
print(f'Total: {sum(judgments.values())}')
print(f'Header: good={data["good"]}, needs_revision={data["needs_revision"]}')
print(f'Revision IDs: {[s["id"] for s in data["needs_revision_summary"]]}')
