forked from owid/covid-19-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslovenia.py
39 lines (31 loc) · 1.13 KB
/
slovenia.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import pandas as pd
from cowidev.utils import paths
def main():
df = (
pd.read_csv(
"https://raw.githubusercontent.com/sledilnik/data/master/csv/vaccination.csv",
usecols=[
"date",
"vaccination.administered.todate",
"vaccination.administered2nd.todate",
"vaccination.administered3rd.todate",
],
)
.rename(
columns={
"vaccination.administered.todate": "people_vaccinated",
"vaccination.administered2nd.todate": "people_fully_vaccinated",
"vaccination.administered3rd.todate": "total_boosters",
}
)
.dropna(subset=["people_vaccinated"])
)
df["total_vaccinations"] = (
df["people_vaccinated"] + df["people_fully_vaccinated"].fillna(0) + df["total_boosters"].fillna(0)
)
df["location"] = "Slovenia"
df["source_url"] = "https://covid-19.sledilnik.org/en/stats"
df["vaccine"] = "Oxford/AstraZeneca, Pfizer/BioNTech"
df.to_csv(paths.out_vax("Slovenia"), index=False)
if __name__ == "__main__":
main()