setting population to 18+ as this is what the ont gov is using

main
Ray Slakinski 2021-05-21 12:24:17 -04:00
parent 51cb9ba6c4
commit 10fca4973d
5 changed files with 3 additions and 37 deletions

View File

@ -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"
1 All ages 14,734,014
2 0 to 4 years 723,016
3 5 to 9 years 762,654
4 10 to 14 years 792,947
5 15 to 19 years 852,405
6 20 to 24 years 1,039,661
7 25 to 29 years 1,077,433
8 30 to 34 years 1,041,952
9 35 to 39 years 992,844
10 40 to 44 years 921,378
11 45 to 49 years 932,058
12 50 to 54 years 968,546
13 55 to 59 years 1,073,519
14 60 to 64 years 961,243
15 65 to 69 years 803,962
16 70 to 74 years 673,546
17 75 to 79 years 461,015
18 80 to 84 years 319,548
19 85 to 89 years 204,227
20 90 to 94 years 98,638
21 95 to 99 years 29,527
22 100 years and over 3,895

View File

@ -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)

View File

@ -350,7 +350,7 @@
],
"timeFrom": null,
"timeShift": null,
"title": "Total Vaccinations & Fully Vaccinated",
"title": "Total Vaccinations & Fully Vaccinated (18+)",
"type": "bargauge"
}
],

View File

@ -351,7 +351,7 @@
],
"timeFrom": null,
"timeShift": null,
"title": "Total Vaccinations & Fully Vaccinated",
"title": "Total Vaccinations & Fully Vaccinated (18+)",
"type": "bargauge"
}
],

View File

@ -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)