Last active
March 21, 2021 15:07
-
-
Save kurasaiteja/9b4380e856043c16ca07e60f270cd00b to your computer and use it in GitHub Desktop.
This file contains 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
countries = short.groupby('country')['total_vaccinations'].max().sort_values(ascending=False)[:10].index.tolist() | |
title = get_multi_line_title("Vaccination Progress", "Rate of vaccinations for the top-10 vaccinated countries") | |
line_plots = [] | |
for c in countries: | |
vacc_data = short[short.country == c] | |
line_plots.append( | |
go.Scatter( | |
name = c, | |
x = vacc_data.date, | |
mode='lines+markers', | |
y=vacc_data['total_vaccinations'], | |
) | |
) | |
fig = go.Figure(line_plots) | |
fig.update_layout( | |
title =title, | |
yaxis_title="Count", | |
hovermode='x', | |
legend_orientation = 'h', | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment