___|  _ \   |  |    |   |_ _|\ \     / ____|
 |     |   |  |  |    |   |  |  \ \   /  __|
 |   | |   | ___ __|  ___ |  |   \ \ /   |
\____|\___/     _|   _|  _|___|   \_/   _____| 

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

COVID-19 cases for data analysis (4)

BY: @fooblic | CREATED: April 12, 2020, 9:29 a.m. | VOTES: 2 | PAYOUT: $0.00 | [ VOTE ]

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

US covid-19 cases curve switched to polynomial growth from exponential.

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

Rates of growth for new case are slightly declines in Spain and Italy.

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

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

Python code:

# Pylynomial fit
coeff = np.polyfit(xdata, US1000, deg=4)
poly = np.poly1d(coeff)

plt.plot(xdata, US1000, "bo", label="US data")
plt.plot(func(xdata7, *popt), "k-.", label="Exponential")
plt.plot(xdata7, poly(xdata7), "b--", label='Polynomial') 
plt.title("US confirmed cases - Polynomial fit")
plt.xlabel("Days from 1000 cases (March, 11)")
plt.ylim(0, 800000)
txt = "p4 = %.2f \np3 = %.2f \np2 = %.2f \np1 = %.2f\np0 = %.2f" % tuple(coeff)
plt.text(2, 550000, r'$f(x) = p_n * x^n + p_{n-1} * x^{n-1}... + p_0$')
plt.text(2, 400000, txt)
plt.legend(loc=2)
plt.tight_layout()

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

TAGS: [ #stats ] [ #python ] [ #covid-19 ]

Replies

NO REPLIES FOUND.

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