|
32 | 32 | top10DD = tDD.nlargest(10, 'Total Deaths')
|
33 | 33 | top10CD['24 hour change'] = top10CD[yesterday.strftime('%#m/%#d/%y')] - top10CD[otherday.strftime('%#m/%#d/%y')]
|
34 | 34 | top10DD['24 hour change'] = top10DD[yesterday.strftime('%#m/%#d/%y')] - top10DD[otherday.strftime('%#m/%#d/%y')]
|
35 |
| -newtop10CD = top10CD[['Country/Region', 'Total Confirmed Cases', '24 hour change']] |
36 |
| -newtop10DD = top10DD[['Country/Region', 'Total Deaths', '24 hour change']] |
| 35 | +newtop10CD = top10CD[['Country/Region', '24 hour change', 'Total Confirmed Cases']] |
| 36 | +newtop10DD = top10DD[['Country/Region', '24 hour change', 'Total Deaths']] |
37 | 37 |
|
38 | 38 | #Creates the data used for tables containing top 10 changes in countries deaths and cases
|
39 | 39 | top10changeCD = tCD.nlargest(10, '24 hour change')
|
@@ -78,12 +78,12 @@ def create_daily_top_10_changes_tables():
|
78 | 78 | axs[0].set_title('Countries With Largest Change in Confirmed COVID Cases (24 hours)', pad=10)
|
79 | 79 | axs[0].axis('off')
|
80 | 80 | axs[0].axis('tight')
|
81 |
| - axs[0].table(cellText=newtop10CD.values, colLabels=newtop10changeCD.columns, loc='center') |
| 81 | + axs[0].table(cellText=newtop10changeCD.values, colLabels=newtop10changeCD.columns, loc='center') |
82 | 82 |
|
83 | 83 | axs[1].set_title('Countries With Most COVID Deaths (24 hours)', pad=10)
|
84 | 84 | axs[1].axis('off')
|
85 | 85 | axs[1].axis('tight')
|
86 |
| - axs[1].table(cellText=newtop10DD.values, colLabels=newtop10changeDD.columns, loc='center') |
| 86 | + axs[1].table(cellText=newtop10changeDD.values, colLabels=newtop10changeDD.columns, loc='center') |
87 | 87 | fig.tight_layout(pad=2)
|
88 | 88 | plt.savefig(dt.date.today().strftime('%m%d%y') + 'daily.png')
|
89 | 89 |
|
|
0 commit comments