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:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user