Skip to content

Instantly share code, notes, and snippets.

@andfanilo
Last active June 30, 2023 08:08
Show Gist options
  • Save andfanilo/d2645e42ae223ae936605e13a759752c to your computer and use it in GitHub Desktop.
Save andfanilo/d2645e42ae223ae936605e13a759752c to your computer and use it in GitHub Desktop.
Vega Datasets Streamlit Explorer
import streamlit as st
from vega_datasets import data
st.title("Vega Datasets Explorer")
all_datasets = data.list_datasets()
selected_dataset = st.selectbox("Select data:", all_datasets)
df = getattr(data, selected_dataset.replace("-", "_"))()
st.dataframe(df, use_container_width=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment