In [1]:
try:
import pycandela
except ImportError:
# Import hack for when in the pycandela source tree.
import sys
sys.path.append('..')
import pycandela
In [2]:
import requests
data = requests.get('https://raw.githubusercontent.com/vega/vega-datasets/gh-pages/data/iris.json').json()
pycandela.components.ScatterPlotMatrix(
data=data, color='species', fields=['sepalLength', 'sepalWidth', 'petalLength', 'petalWidth'], width=800)
In [3]:
from pandas import DataFrame
df = DataFrame.from_records(data)
pycandela.components.ScatterPlot(data=df, color='species', x='sepalLength', y='sepalWidth')
In [ ]: