4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

COVID-19 cases for data analysis (4)

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.

us_exp_0412.png

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

increase.png

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

2 upvotes $0.00

Replies (0)

Conversation

No replies yet

Replies will appear here as people join the conversation.

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: