Created
April 13, 2021 00:16
-
-
Save mikekeith52/17be4eb3ca7d7ff777d264dbe674c591 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sns.set(rc={'figure.figsize':(14,8)}) | |
| ax3 = sns.lineplot(x=data_cumsum_doses.index,y='total_distributed',data=data_cumsum_doses,color='purple',linestyle='--',label='Total Distributed') | |
| sns.lineplot(x=data_cumsum_doses.index,y='people_vaccinated',data=data_cumsum_doses,color='red',label='Received at Least One Dose') | |
| sns.lineplot(x=data_cumsum_doses.index,y='people_fully_vaccinated',data=data_cumsum_doses,color='orange',label='Fully Vaccinated') | |
| above_val = 5000000 | |
| plt.text(data_cumsum_doses.index.to_list()[-1], data_cumsum_doses['total_distributed'].max() + above_val, '{:,.0f}'.format(data_cumsum_doses['total_distributed'].max()),size=14,color = 'purple') | |
| plt.text(data_cumsum_doses.index.to_list()[-1], data_cumsum_doses['people_vaccinated'].max() + above_val, '{:,.0f}'.format(data_cumsum_doses['people_vaccinated'].max()),size=14,color = 'red') | |
| plt.text(data_cumsum_doses.index.to_list()[-1], data_cumsum_doses['people_fully_vaccinated'].max() + above_val, '{:,.0f}'.format(data_cumsum_doses['people_fully_vaccinated'].max()),size=14,color = 'orange') | |
| plt.ylabel('Cumulative Vaccine Counts') | |
| plt.xlabel('Date') | |
| plt.title('Cumulative Vaccines by Date',size=16) | |
| plt.xticks(rotation=45) | |
| ax3.yaxis.set_major_formatter(ticker.StrMethodFormatter('{x:,.0f}')) | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment