|
|
@ -46,16 +46,12 @@ recovered = [dfChinaJan['Recovered'].sum(),dfChinaFeb['Recovered'].sum(),dfChina |
|
|
|
recoverPoss = [] |
|
|
|
for i in range(len(confirmed)): |
|
|
|
recoverPoss.append(recovered[i] / confirmed[i]) |
|
|
|
|
|
|
|
date = pd.date_range(start='2020-01', periods=12, freq="m").strftime('%Y-%m') |
|
|
|
data_1={ |
|
|
|
'confirmed':confirmed, |
|
|
|
'recovered':recovered, |
|
|
|
'recoverPoss':recoverPoss |
|
|
|
} |
|
|
|
data_1_df = pd.DataFrame(data_1, index=date) |
|
|
|
ax = data_1_df.plot(secondary_y=['recovery possibility'], x_compat=True, grid=True) |
|
|
|
ax.set_ylabel('confirmed/recovered') |
|
|
|
ax.grid(linestyle="--", alpha=0.3) |
|
|
|
|
|
|
|
fig = plt.figure() |
|
|
|
ax1 = fig.add_subplot(111) |
|
|
|
ax1.plot(date,confirmed,recovered) |
|
|
|
ax2 = ax1.twinx() |
|
|
|
ax2.plot(date,recoverPoss) |
|
|
|
|
|
|
|
plt.show() |