See DeltaGenerator.deck_gl_chart for docs.
if layers is None:
layers = []
// Syntax sugar: if no layers defined and data is passed at the top
// level, created a scatterplot layer with the top-level data by default.
if data is not None and not layers:
After Change
data = pd.DataFrame(data)
if spec is None:
spec = dict()
// Merge spec with unflattened kwargs, where kwargs take precedence.
// This only works for string keys, but kwarg keys are strings anyways.
spec = dict(spec, **unflatten(kwargs, _ENCODINGS, set(["viewport"])))
if "layers" not in spec:
spec["layers"] = []