__________     __ __     __  _______    ________
  / ____/ __ \   / // /    / / / /  _/ |  / / ____/
 / / __/ / / /  / // /_   / /_/ // / | | / / __/
/ /_/ / /_/ /  /__  __/  / __  // /  | |/ / /___
\____/\____/     /_/    /_/ /_/___/  |___/_____/

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

COVID-19 cases for data analysis (3)

BY: @fooblic | CREATED: April 4, 2020, 10:48 a.m. | VOTES: 3 | PAYOUT: $0.00 | [ VOTE ]

[IMAGE: https://files.peakd.com/file/peakd-hive/fooblic/gegivRrW-cov19.png]

The CoV-19 epidemic in US still in progress. If the exponential trend will continue we will see more 700K case on next week. Let's hope that the trend will be broken and a rate will go down due to efficient virus counteractions.

[IMAGE: https://files.peakd.com/file/peakd-hive/fooblic/7xUzJ3a4-us_exp.png]

CoV-19 has started in Italy early than US and Spain, and already seems to not increasing a rate. On March 8, was expanded quarantine to whole Italy and after roughly 2 weeks was reached a peak rate. Now it looks like the epidemic stay on a plateau.

Infection in Spain started spreading later then Italy, but reached higher rate. Now it looks also reached a plateau.

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

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

Python code:

# Exponential fit
from scipy.optimize import curve_fit

def func(x, a, b, c):
    return a * np.exp(b * x) + c


US1000 = data["US"]["2020-03-11":]  # more then 1000 cases
xdata = np.arange(len(US1000))

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

plt.plot(xdata, US1000, "bo")
plt.plot(func(np.arange(len(US1000)+7), *popt), "b--")
plt.title("US confirmed cases - exponential fit")
plt.xlabel("Days from 1000 cases (March, 11)")
plt.ylim(0, 800000)
txt = "a = %s , b = %s, c = %s" % (popt[0], popt[1], popt[2])
plt.text(2, 600000, r'$f(x) = a * \exp(b x) + c$')
plt.text(2, 550000, txt)

Please see my previous posts for more details: 2 1

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

Replies

NO REPLIES FOUND.

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