Available Components

Canvas contains a number of default components that can get you started with data and model analysis. These can be installed using pip install package_name, and passed into Canvas using symph.widget(ComponentName).

Component

Description

Package

Data Map

A rendered map where landmarks are colored by another variable. To configure the map, the spec of this component is defined as follows:

@dataclass
class DataMapSpec(WidgetSpec):
    projection: str
    id_map: dict
    feature: str
    id_column: str
    map_url: str

The projection is a vega-projection, the id_map maps names to multiple id in a TopoJSON, the feature defines what column to color by, the id_column defines where names are to be found, and the map_url provides a link to the appropriate TopoJSON.

pip install canvas_data_map

To learn how to use Canvas, see the documentation.

canvas_data_map

List

A list view that displays all data instances, which is useful for exploring data with Canvas’s built in filters and grouping interactions.

pip install canvas_list

To learn how to use Canvas, see the documentation.

canvas_list

Scatterplot

A scatterplot visualization based on regl. Useful for visualizing embeddings that have been been reduced to two dimensions. Visualizes data based on columns prefixed with projection_, with one column ending in _x and another ending in _y, e.g., projection_my_reduced_coordinate_x and projection_my_reduced_coordinate_y.

pip install canvas_scatterplot

To learn how to use Canvas, see the documentation.

canvas_scatterplot

Summary

A component that displays an overview of the provided dataset table. To configure it, pass a list of SummaryElement. One SummaryElement is defined as:

export interface SummaryElement {
    name: string;
    data: number | ChartData;
}

ChartData is defined as:

export interface ChartData {
    spec: VegaLiteSpec;
    data: Record<string, unknown>;
}
pip install canvas_summary

To learn how to use Canvas, see the documentation.

canvas_summary

Duplicates

A component that displays data duplicates based on a column prefixed duplicates_. This column must contain lists of numbers that signal which duplicate group an item belongs to.

pip install canvas_duplicates

To learn how to use Canvas, see the documentation.

canvas_duplicates