In [1]:
import pandas as pd
df = pd.read_json('cars.json')
In [2]:
df.head()
Out[2]:
In [3]:
from vega import VegaLite
In [4]:
VegaLite({
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"mark": "point",
"encoding": {
"y": {"type": "quantitative", "field": "Acceleration"},
"x": {"type": "quantitative", "field": "Horsepower"}
}
}, df)
In [ ]: