In [1]:
#!python3 -m pip install altair
#!python3 -m pip install -U vega3
#!python3 -m pip install vega_datasets

In [1]:
import altair as alt

In [2]:
alt.renderers.enable('notebook')


Out[2]:
RendererRegistry.enable('notebook')

In [3]:
#alt.list_datasets()

In [4]:
df = alt.load_dataset('flights-5k')

In [5]:
df.head(3)


Out[5]:
date delay destination distance origin
0 2001-01-10 18:20:00 25 HOU 192 SAT
1 2001-01-31 16:45:00 17 OAK 371 SNA
2 2001-02-16 12:07:00 21 SAN 417 SJC

In [6]:
alt.Chart(df).mark_point().encode(
    x='date',
    y='delay',
    size='distance',
)


/usr/local/lib/python3.6/dist-packages/altair/utils/core.py:294: FutureWarning: A future version of pandas will default to `skipna=True`. To silence this warning, pass `skipna=True|False` explicitly.
  attrs['type'] = infer_vegalite_type(data[attrs['field']])
Out[6]:


In [ ]:


In [ ]: