Binary data transfer¶
Often for visualizations in genomics, massive social networks, or sensor data visualizations, it helps to be able to plot millions rather than simply hundreds of thousands of points.
By default, pydeck sends data from Jupyter to the frontend by serializing data to JSON. However, for massive data sets, the costs to serialize and deserialize this JSON can prevent a visualization from rendering.
Binary transport will only work if the following requirements are met:
use_binary_transportmust be set to
Trueexplictly on your
Layer input data must be a
Data that is not intend to be rendered should not be passed into the layer.
Accessor names must be strings representing column names within the data frame, e.g.,
get_position='position'is correct, not
get_position=['x', 'y']. For example,
This data format, where
yrepresent a position and
brepresent color values,
should be converted to this format
[0, 0, 0]
[255, 0, 0]
[255, 255, 0]
Binary transfer only works within Jupyter environments via
pydeck.bindings.deck.Deck.show(). It relies on the socket-level communication built into the Jupyter environment.