diff --git a/generate_data.py b/generate_data.py index 975657b6..6c082655 100644 --- a/generate_data.py +++ b/generate_data.py @@ -72,20 +72,15 @@ usersByCount = [] +for val in values: + val["users_published"] = int(sum([1 / k["multiplier"] for k in keys if k["publishedOn"] == val["date"] and k["transmissionRiskLevel"] == 6])) + for f in sorted(Path("page/users_hourly").iterdir()): if f.name == ".gitkeep": continue print(f) with open(f) as tmp: last_line = tmp.readlines()[-1] - user_count = int(last_line.split("/")[0].strip()) - if datetime.datetime.fromisoformat(f.stem[: f.stem.rfind("-")]) >= datetime.datetime.fromisoformat("2020-07-02"): # ignoring old android apps since server version 1.0.9 - if "old Android app" in last_line: - to_be_ignored = int(last_line.split("(")[1].split(" ")[0]) - user_count -= to_be_ignored - for val in values: - if val["date"] == f.stem[: f.stem.rfind("-")]: - val["users_published"] += user_count user_dist = last_line.split("/")[1].split(",") if "(" in user_dist[-1]: diff --git a/page/plots/usercount.json b/page/plots/usercount.json index 5c964073..59f200d7 100644 --- a/page/plots/usercount.json +++ b/page/plots/usercount.json @@ -1,6 +1,6 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v4.json", - "title": "number of users publishing keys (approx.)", + "title": "number of users publishing keys", "width": 550, "height": 250, "data": {