Skip to content

Instantly share code, notes, and snippets.

@alanjones2
Created June 2, 2022 11:03
Show Gist options
  • Save alanjones2/125e6aac6ce66bfab2a2ed859b8d110e to your computer and use it in GitHub Desktop.
Save alanjones2/125e6aac6ce66bfab2a2ed859b8d110e to your computer and use it in GitHub Desktop.
# Countries
clist = df['country'].unique()
country = st.selectbox("Select a country:", clist)
col1, col2 = st.columns(2)
fig = px.line(df[df['country'] == country],
x="year", y="gdpPercap", title="GDP per Capita")
col1.plotly_chart(fig, use_container_width=True)
fig = px.line(df[df['country'] == country],
x="year", y="pop", title="Population Growth")
col2.plotly_chart(fig, use_container_width=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment