** Warning! This article does not contain more information than "I tried to graph the data". ** **
This is a csv summary of the number of infected people in each country, compiled by the Center for Systems Science and Engineering of John Hopkins University. https://github.com/CSSEGISandData/COVID-19
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
#Read CSV data with pandas.
data = pd.read_csv('COVID-19/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv')
confirmed = [0] * (len(data.columns) - 4)
days_from_22_Jan_20 = np.arange(0, len(data.columns) - 4, 1)
#Process the data
for i in range(0, len(data), 1):
if (data.iloc[i][1] == "Japan"):
print(str(data.iloc[i][0]) + " of " + data.iloc[i][1])
for day in range(4, len(data.columns), 1):
confirmed[day - 4] += data.iloc[i][day]
print(days_from_22_Jan_20)
print(confirmed)
#Pour into matplotlib
fig = plt.figure(1, figsize=(1.6180 * 4, 4))
axes = fig.add_subplot(111)
axes.set_xlabel("days from 22, Jan, 2020")
axes.set_ylabel("Comfirmed (JP)")
plt.grid()
axes.plot(days_from_22_Jan_20, confirmed, "o-", color="orange")
plt.show()
This is (as of March 10, 2020).
I feel that the horizontal axis 25-40 is linear and extends, but it seems that I got on a slightly different line from around 41-. I'm still not sure if this is a straight line with a large slope or a logistic one. I wonder why it went up in the first place. ((I wrote that it doesn't contain more information than "I tried to graph the data", but I started thinking by looking at the data. I don't like it!))
--Like data from other countries → Please change Japan on the 11th line to US or Mainland China. ――What does the graph look like? → Please clean it yourself. ――Set the date and time on the horizontal axis → If you give me about 3000 yen with a Bank of Japan note, I will do it!