Skip to content

Instantly share code, notes, and snippets.

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