+-+-+ +-+ +-+-+-+-+
|G|O| |4| |H|I|V|E|
+-+-+ +-+ +-+-+-+-+

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

COVID-19 cases for data analysis (5)

BY: @fooblic | CREATED: April 19, 2020, 9:58 a.m. | VOTES: 5 | PAYOUT: $0.34 | [ VOTE ]

https://images.hive.blog/0x0/https://files.peakd.com/file/peakd-hive/fooblic/gegivRrW-cov19.png

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

[IMAGE: https://files.peakd.com/file/peakd-hive/fooblic/mhOJGQe9-confirmed.png]

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

[IMAGE: https://files.peakd.com/file/peakd-hive/fooblic/jWQi3oMx-increase.png]

Growth in US turn into linear increase.

[IMAGE: https://files.peakd.com/file/peakd-hive/fooblic/jj8x6zNw-us_exp_04-19.png]

Russia confirmed cases growth is in exponential trend.

[IMAGE: https://files.peakd.com/file/peakd-hive/fooblic/IXHOnURg-rus_exp_04-19.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

TAGS: [ #coronavirus ] [ #covid ] [ #stats ] [ #python ]

Replies

NO REPLIES FOUND.

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>