From 10fca4973d7bd8c3bb4e04dbf1494ffdfd7b5b6b Mon Sep 17 00:00:00 2001 From: Ray Slakinski Date: Fri, 21 May 2021 12:24:17 -0400 Subject: [PATCH] setting population to 18+ as this is what the ont gov is using --- contrib/ages.csv | 22 ------------------- contrib/calc_eligible_population.py | 12 ---------- contrib/grafana/dashboard.json | 2 +- .../ontvacstats-snapshot.json | 2 +- main.go | 2 +- 5 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 contrib/ages.csv delete mode 100644 contrib/calc_eligible_population.py diff --git a/contrib/ages.csv b/contrib/ages.csv deleted file mode 100644 index 7e2de1b..0000000 --- a/contrib/ages.csv +++ /dev/null @@ -1,22 +0,0 @@ -"All ages","14,734,014" -"0 to 4 years","723,016" -"5 to 9 years","762,654" -"10 to 14 years","792,947" -"15 to 19 years","852,405" -"20 to 24 years","1,039,661" -"25 to 29 years","1,077,433" -"30 to 34 years","1,041,952" -"35 to 39 years","992,844" -"40 to 44 years","921,378" -"45 to 49 years","932,058" -"50 to 54 years","968,546" -"55 to 59 years","1,073,519" -"60 to 64 years","961,243" -"65 to 69 years","803,962" -"70 to 74 years","673,546" -"75 to 79 years","461,015" -"80 to 84 years","319,548" -"85 to 89 years","204,227" -"90 to 94 years","98,638" -"95 to 99 years","29,527" -"100 years and over","3,895" \ No newline at end of file diff --git a/contrib/calc_eligible_population.py b/contrib/calc_eligible_population.py deleted file mode 100644 index 862fec8..0000000 --- a/contrib/calc_eligible_population.py +++ /dev/null @@ -1,12 +0,0 @@ -import csv - -ages = [] -with open("ages.csv", newline="") as csvfile: - spamreader = csv.reader(csvfile, delimiter=",", quotechar='"') - for row in spamreader: - ages.append(row) - -total = 0 -for age in ages[4:]: - total += int(age[1].replace(",", "")) -print(total) diff --git a/contrib/grafana/dashboard.json b/contrib/grafana/dashboard.json index 5000364..3b81de6 100644 --- a/contrib/grafana/dashboard.json +++ b/contrib/grafana/dashboard.json @@ -350,7 +350,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "Total Vaccinations & Fully Vaccinated", + "title": "Total Vaccinations & Fully Vaccinated (18+)", "type": "bargauge" } ], diff --git a/contrib/update_dashboard/ontvacstats-snapshot.json b/contrib/update_dashboard/ontvacstats-snapshot.json index c22251e..0fe8468 100644 --- a/contrib/update_dashboard/ontvacstats-snapshot.json +++ b/contrib/update_dashboard/ontvacstats-snapshot.json @@ -351,7 +351,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "Total Vaccinations & Fully Vaccinated", + "title": "Total Vaccinations & Fully Vaccinated (18+)", "type": "bargauge" } ], diff --git a/main.go b/main.go index 77189c2..48a97cd 100644 --- a/main.go +++ b/main.go @@ -64,7 +64,7 @@ func init() { func updateMetrics() { data_url := "https://data.ontario.ca/api/3/action/datastore_search?sort=report_date+desc&limit=1&resource_id=8a89caa9-511c-4568-af89-7f2174b4378c" - eligiblePopulation := int64(14527497) + eligiblePopulation := int64(11971129) // Ontario population 18+ resp, getErr := http.Get(data_url) if getErr != nil { log.Println(getErr)