Py.Cafe

maartenbreddels/

altair-car-performance-comparison

Car Performance Comparison with Altair

DocsPricing
  • app.py
  • requirements.txt
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import altair as alt
from vega_datasets import data

cars = data.cars()

chart = alt.Chart(cars).mark_circle().encode(
    x='Horsepower',
    y='Miles_per_Gallon',
    color='Origin',
)

# assign a widget to page so solara knows what to render
page = alt.JupyterChart(chart)
requirements.txt
1
2
3
4
solara
altair
vega_datasets
anywidget