fix(crawler): Fix invalid calculation of number of first vaccinations

Numbers for second shot are actually inclusive of booster
shots, so booster shots do not
have to be subtracted from the
total number of vaccinations.

Fixes #10.
This commit is contained in:
Adrian Rumpold committed 2021-11-11 19:50:44 +01:00
1 parent a44308a4e1
commit f6f799e85f
1 file changed
+2 -2
@@ -187,8 +187,8 @@ class CovidCrawler(CovidCrawlerBase):
if not matches: if not matches:
raise ValueError(f"Could not extract date from scraped web page, {text=}") raise ValueError(f"Could not extract date from scraped web page, {text=}")
values["num_vaccinated_once"] = values["total_vaccinations"] - ( values["num_vaccinated_once"] = (
values["num_vaccinated_full"] + values["num_vaccinated_booster"] values["total_vaccinations"] - values["num_vaccinated_full"]
) )
values["date"] = parse_date(**matches.groupdict()).strftime("%Y-%m-%d") values["date"] = parse_date(**matches.groupdict()).strftime("%Y-%m-%d")