e-Statの 人口動態調査 - 人口動態統計 - 月報(概数) の第7表に毎月の新型コロナウイルス感染症による死者数が載っている。これをCSVにしたものを COVID-deaths.csv として置いておく。グラフにしてみよう。
import matplotlib.pyplot as plt
import pandas as pd
URL = "https://okumuralab.org/~okumura/python/data/COVID-deaths.csv"
df = pd.read_csv(URL, parse_dates=["month"])
plt.bar(df["month"], df["deaths"], width=25)
# plt.xticks(rotation=10)
# plt.savefig("COVID-deaths.svg", bbox_inches="tight")
年ごとに集計すると次のようになる。ただし2022年以降は令和5年(2023)人口動態統計月報年計(概数)の概況および令和6年(2024)人口動態統計月報年計(概数)の概況の第6表によった。
| 年 | 新型コロナウイルス感染症 | 新型コロナウイルス感染症ワクチン |
|---|---|---|
| 2020 | 3466 | - |
| 2021 | 16756 | - |
| 2022 | 47638 | 23 |
| 2023 | 38086 | 34 |
| 2024 | 35865 | 8 |