setting population to 18+ as this is what the ont gov is using
This commit is contained in:
parent
51cb9ba6c4
commit
10fca4973d
@ -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,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)
|
|
@ -350,7 +350,7 @@
|
|||||||
],
|
],
|
||||||
"timeFrom": null,
|
"timeFrom": null,
|
||||||
"timeShift": null,
|
"timeShift": null,
|
||||||
"title": "Total Vaccinations & Fully Vaccinated",
|
"title": "Total Vaccinations & Fully Vaccinated (18+)",
|
||||||
"type": "bargauge"
|
"type": "bargauge"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -351,7 +351,7 @@
|
|||||||
],
|
],
|
||||||
"timeFrom": null,
|
"timeFrom": null,
|
||||||
"timeShift": null,
|
"timeShift": null,
|
||||||
"title": "Total Vaccinations & Fully Vaccinated",
|
"title": "Total Vaccinations & Fully Vaccinated (18+)",
|
||||||
"type": "bargauge"
|
"type": "bargauge"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
2
main.go
2
main.go
@ -64,7 +64,7 @@ func init() {
|
|||||||
|
|
||||||
func updateMetrics() {
|
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"
|
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)
|
resp, getErr := http.Get(data_url)
|
||||||
if getErr != nil {
|
if getErr != nil {
|
||||||
log.Println(getErr)
|
log.Println(getErr)
|
||||||
|
Reference in New Issue
Block a user