forked from owid/covid-19-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslovenia.py
35 lines (26 loc) · 934 Bytes
/
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
import pandas as pd
def main(paths):
df = pd.read_csv(
"https://raw.githubusercontent.com/sledilnik/data/master/csv/vaccination.csv",
usecols=[
"date",
"vaccination.administered.todate",
"vaccination.administered2nd.todate",
],
)
df = df.rename(
columns={
"vaccination.administered.todate": "people_vaccinated",
"vaccination.administered2nd.todate": "people_fully_vaccinated",
}
)
df = df[-df["people_vaccinated"].isna()]
df["total_vaccinations"] = df["people_vaccinated"] + df[
"people_fully_vaccinated"
].fillna(0)
df.loc[:, "location"] = "Slovenia"
df.loc[:, "source_url"] = "https://covid-19.sledilnik.org/en/stats"
df.loc[:, "vaccine"] = "Oxford/AstraZeneca, Pfizer/BioNTech"
df.to_csv(paths.tmp_vax_out("Slovenia"), index=False)
if __name__ == "__main__":
main()