X-Git-Url: https://projects.mako.cc/source/harrypotter-wikipedia-cdsw/blobdiff_plain/89f6c8568e611b9740bbd0afed5fbfa536bf4198..fcf662671099db62bdfd5607f9fe51c31747a999:/hpwp-minor.py diff --git a/hpwp-minor.py b/hpwp-minor.py new file mode 100644 index 0000000..4e173f2 --- /dev/null +++ b/hpwp-minor.py @@ -0,0 +1,16 @@ +from csv import DictReader + +input_file = open("hp_wiki.csv", 'r') + +num_edits = 0 +num_anon = 0 +for row in DictReader(input_file): + num_edits = num_edits + 1 + if row["anon"] == "False": + num_anon = num_anon + 1 + +prop_anon = num_anon / num_edits + +print("total edits: %s" % num_edits) +print("anon edits: %s" % num_anon) +print("proportion anon: %s" % prop_anon)