Skip to content

Instantly share code, notes, and snippets.

@kurasaiteja
Created March 21, 2021 16:04
Show Gist options
  • Save kurasaiteja/94ae47e0f87cdeb7ffd0f057bb961740 to your computer and use it in GitHub Desktop.
Save kurasaiteja/94ae47e0f87cdeb7ffd0f057bb961740 to your computer and use it in GitHub Desktop.
title = fill_title_and_subtitle("The Race Against Covid", "Visualizing Cumulative Statistics of Disease vs Vaccine")
fig = go.Figure(data=[
go.Scatter(
mode="lines+markers",
name="Total Deaths",
x=data['date'],
y=data['cumulative_total_deaths'],
marker_color="crimson",
),
go.Scatter(
mode="lines+markers",
name="Total Cases",
x=data['date'],
y=data['cumulative_total_cases'],
marker_color="royalblue"
),
go.Scatter(
mode="lines+markers",
name="Total Vaccinated",
x=data['date'],
y=data['total_vaccinations'],
marker_color="lightseagreen"
),
])
fig.update_layout(
title = title,
xaxis_title="",
yaxis_title="Count",
hovermode="x",
legend_orientation = 'h'
)
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment