Spaces:
Runtime error
Runtime error
File size: 596 Bytes
dd0ef30 9c1ffe9 dd0ef30 9c1ffe9 dd0ef30 9c1ffe9 dd0ef30 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import numpy as np
import pandas as pd
import streamlit as st
@st.cache_data
def load_data():
df = pd.DataFrame(np.random.randn(200, 3), columns=["a", "b", "c"])
return df
df = load_data()
st.vega_lite_chart(
df,
{
"mark": {"type": "circle", "tooltip": True},
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"},
"size": {"field": "c", "type": "quantitative"},
"color": {"field": "c", "type": "quantitative"},
},
},
use_container_width=True,
)
|