India

Last update: 28-Jul-20

Confirmed cases:

1514800 (+1481448)

Confirmed deaths:

34121 (+770)

#collapse
df = dft_ct_new_cases.copy()
# print(df)
df.loc['Total'] = df.sum()
n = 5
ax = []
fig = plt.figure(figsize = (16,20))
gs = fig.add_gridspec(n+3, 3)
# gs = fig.add_gridspec(2, 3)
ax0 = fig.add_subplot(gs[0, :])
ef = df.loc['Total'].rename_axis('date').reset_index()
ef['date'] = ef['date'].astype('datetime64[ns]')
ax0.bar(ef.date,ef.Total,alpha=0.3,color='#007acc')
ax0.plot(ef.date,ef.Total , marker="o", color='#007acc')
ax0.xaxis.set_major_locator(mdates.WeekdayLocator())
ax0.xaxis.set_major_formatter(mdates.DateFormatter('%b %d'))
ax0.text(0.02, 0.5,'India daily case count', transform = ax0.transAxes, fontsize=25);
ax0.spines['right'].set_visible(False)
ax0.spines['top'].set_visible(False)

ax1 = fig.add_subplot(gs[1, :])
ef = df.loc['Delhi'].rename_axis('date').reset_index()
ef['date'] = ef['date'].astype('datetime64[ns]')
ax1.bar(ef.date,ef.Delhi,alpha=0.3,color='#007acc')
ax1.plot(ef.date,ef.Delhi , marker="o", color='#007acc')
ax1.xaxis.set_major_locator(mdates.WeekdayLocator())
ax1.xaxis.set_major_formatter(mdates.DateFormatter('%b %d'))
ax1.text(0.02, 0.5,'Capital-Delhi', transform = ax1.transAxes, fontsize=25);
ax1.spines['right'].set_visible(False)
ax1.spines['top'].set_visible(False)

ax2 = fig.add_subplot(gs[2,0])
ef = df.loc['Andhra Pradesh'].rename_axis('date').reset_index()
ef['date'] = ef['date'].astype('datetime64[ns]')

ax2.bar(ef.date, ef['Andhra Pradesh'],color = '#007acc',alpha=0.5)
ax2.xaxis.set_major_locator(mdates.WeekdayLocator())
ax2.xaxis.set_major_formatter(mdates.DateFormatter('%b %d'))
ax2.set_xticks(ax2.get_xticks()[::3])
maxyval = ef['Andhra Pradesh'].max()
ax2.set_ylim([0,maxyval])
ax2.text(0.05, 0.5,'Andhra Pradesh', transform = ax2.transAxes, fontsize=20);
ax2.spines['right'].set_visible(False)
ax2.spines['top'].set_visible(False)


ax3 = fig.add_subplot(gs[2,1])
ef = df.loc['Tamil Nadu'].rename_axis('date').reset_index()
ef['date'] = ef['date'].astype('datetime64[ns]')
ax3.bar(ef.date, ef['Tamil Nadu'],color = '#007acc',alpha=0.5,)
ax3.xaxis.set_major_locator(mdates.WeekdayLocator())
ax3.xaxis.set_major_formatter(mdates.DateFormatter('%b %d'))
ax3.set_xticks(ax3.get_xticks()[::3])
ax3.text(0.05, 0.5,'Tamil Nadu', transform = ax3.transAxes, fontsize=20);
ax3.spines['right'].set_visible(False)
ax3.spines['top'].set_visible(False)

ax4 = fig.add_subplot(gs[2,2])
ef = df.loc['Maharashtra'].rename_axis('date').reset_index()
ef['date'] = ef['date'].astype('datetime64[ns]')
ax4.bar(ef.date, ef.Maharashtra,color = '#007acc',alpha=0.5)
ax4.set_xticks([])
ax4.xaxis.set_major_locator(mdates.WeekdayLocator())
ax4.xaxis.set_major_formatter(mdates.DateFormatter('%b %d'))
ax4.set_xticks(ax4.get_xticks()[::3])
ax4.spines['right'].set_visible(False)
ax4.spines['top'].set_visible(False)
ax4.text(0.05, 0.5,'Maharashtra', transform = ax4.transAxes, fontsize=20)


for i in range(n):
    
    ax.append(fig.add_subplot(gs[i+3,:]))
    ef = df.iloc[i+3].rename_axis('date').reset_index()
    ef['date'] = ef['date'].astype('datetime64[ns]')
    ax[i].bar(ef.date,ef.iloc[:,-1],color = '#007acc',alpha=0.3)
    ax[i].plot(ef.date,ef.iloc[:,-1],marker='o',color='#007acc')
    ax[i].text(0.02,0.5,f'{ef.columns.values[-1]}',transform = ax[i].transAxes, fontsize = 20);
    ax[i].xaxis.set_major_locator(mdates.WeekdayLocator())
    ax[i].xaxis.set_major_formatter(mdates.DateFormatter('%b %d'))
    ax[i].set_ylim([0,7000])
    ax[i].spines['right'].set_visible(False)
    ax[i].spines['top'].set_visible(False)
plt.tight_layout() 

                      states   Cases  PCases  Deaths  PDeaths  Cases (+)  Deaths (+)  Fatality Rate
                 Maharashtra  391440   13882   14164    13882     377558         282           3.62
                  Tamil Nadu  227688    3571    3659     3571     224117          88           1.61
                       Delhi  132275    3853    3881     3853     128422          28           2.93
              Andhra Pradesh  110297    1090    1148     1090     109207          58           1.04
                   Karnataka  107001    1962    2064     1962     105039         102           1.93
               Uttar Pradesh   73951    1456    1497     1456      72495          41           2.02
                 West Bengal   62964    1411    1449     1411      61553          38           2.30
                     Gujarat   57982    2348    2372     2348      55634          24           4.09
                   Telangana   57142     471     480      471      56671           9           0.84
                       Bihar   43591     255     269      255      43336          14           0.62
                   Rajasthan   38636     633     644      633      38003          11           1.67
                       Assam   34846      90      92       90      34756           2           0.26
                     Haryana   32876     397     406      397      32479           9           1.23
              Madhya Pradesh   29217     821     831      821      28396          10           2.84
                      Orissa   28107     181     189      181      27926           8           0.67
                      Kerala   20895      64      68       64      20831           4           0.33
           Jammu and Kashmir   18879     321     333      321      18558          12           1.76
                      Punjab   14378     318     336      318      14060          18           2.34
                   Jharkhand    9563      90      94       90       9473           4           0.98
                         Goa    5287      36      36       36       5251           0           0.68
                     Tripura    4287      17      21       17       4270           4           0.49
                 Pondicherry    3013      43      47       43       2970           4           1.56
            Himachal Pradesh    2330      13      13       13       2317           0           0.56
                     Manipur    2317       0       0        0       2317           0           0.00
                    Nagaland    1460       5       4        5       1455           0           0.27
           Arunachal Pradesh    1330       3       3        3       1327           0           0.23
                  Chandigarh     934      14      14       14        920           0           1.50
                   Meghalaya     779       5       5        5        774           0           0.64
                      Sikkim     592       1       1        1        591           0           0.17
                     Mizoram     384       0       0        0        384           0           0.00
 Andaman and Nicobar Islands     359       1       1        1        358           0           0.28
               Daman and Diu       0       0       0        0          0           0            NaN
                 Lakshadweep       0       0       0        0          0           0            NaN