fooblic avatar

COVID-19 cases for data analysis (5)

fooblic

Published: 19 Apr 2020 › Updated: 19 Apr 2020COVID-19 cases for data analysis (5)

COVID-19 cases for data analysis (5)

France confirmed cases exceed Germany. UK, Turkey and Russia are growing fast.

confirmed.png

US, Spain and Italy on a plateau. US daily increase peak was on April 4.

increase.png

Growth in US turn into linear increase.

us_exp_0419.png

Russia confirmed cases growth is in exponential trend.

rus_exp_0419.png

Python code:

# US
coeff = np.polyfit(xdata, US1000, deg=1)
poly = np.poly1d(coeff)

plt.plot(xdata, US1000, "bo", label="US data")
plt.plot(xdata7, poly(xdata7), "b--", label='Linear')

# Russia
RUS = data["Russia"]["2020-03-17":]  # more then 100 cases
xdata = np.arange(len(RUS))

popt, pcov = curve_fit(func, xdata, RUS)
print(popt, pcov)

plt.plot(xdata, RUS, "ro", label="RU cases data")
plt.plot(func(np.arange(len(RUS)+10), *popt), "r--", label="Exponential fit")
plt.plot(func(np.arange(len(RUS)+10), 142.84, 0.19938, -26.9), "k--", label="fit for Apr. 4")

plt.title("Russia confirmed cases - exponential fit")
plt.xlabel("Days from 100 cases (March, 17)")
plt.ylim(0, 70000)
txt = "a = %.2f, \nb = %.2f, \nc = %.2f" % (popt[0], popt[1], popt[2])
plt.text(2, 50000, r'$f(x) = a * \exp(b x) + c$')
plt.text(2, 40000, txt)
plt.legend(loc=2)
plt.tight_layout()

Please see my previous posts for more details: 4 3 2 1

Leave COVID-19 cases for data analysis (5) to:

Written by

Blockchain-enthusiast, independent researcher, amateur photographer, travel lover

Read more #coronavirus posts


Best Posts From fooblic

We have not curated any of fooblic's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From fooblic