You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

read_top.py 657B

1234567891011121314151617181920212223
  1. from million.view.bar_chart import plot as bar_chart
  2. from million.analyze.count_participations import count_participations
  3. from million.analyze.retain_counts import retain_counts
  4. from million.parse.fb_exports import FacebookExportParser
  5. DATA_PATH = './data/'
  6. parser = FacebookExportParser()
  7. export = parser.parse(DATA_PATH)
  8. filtered = retain_counts(export.messages)
  9. print(len(filtered))
  10. counted_participations = count_participations(filtered, export.participants)
  11. kept_participations = [
  12. p for p in counted_participations if p['participations'] > 100]
  13. print("\n".join(
  14. [f"{p['name']}: {p['participations']}" for p in kept_participations]))