XVega magics¶
Magics that allow you to create graph visualizations using XVega an implementation of vega-light to C++.
X_FIELD¶
- %X_FIELD name_of_column
Represents the X axis of the graph. The name of the axis should be the same as the name of the SQLite column (or result of SQLite query).
TYPE¶
- %TYPE type_of_field
Sub-attribute of X_FIELD.
Bellow there’s list of the types supported by xeus-sqlite. If you want to learn more about types please refer to vega lite type official documentation.
QUANTITATIVE
NOMINAL
ORDINAL
TEMPORAL
BIN¶
- %BIN type_of_field
Sub-attribute of X_FIELD.
Binning discretizes numeric values into a set of bins. If bin is true, default binning parameters are used.
To customize binning parameters, you can set bin to a bin definition object, which can have the following properties:
If you want to learn more about bin please refer to vega lite bin official documentation.
ANCHOR¶
- %ANCHOR bin_position
Sub-attribute of BIN.
A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.
BASE¶
- %BASE number
Sub-attribute of BIN.
The number base to use for automatic bin determination (default is base 10).
BINNED¶
- %BASE boolean
Sub-attribute of BIN.
MAXBINS¶
- %MAXBINS number
Sub-attribute of BIN.
Maximum number of bins.
MINSTEP¶
- %MINSTEP number
Sub-attribute of BIN.
A minimum allowable step size (particularly useful for integer values).
NICE¶
- %NICE bool
Sub-attribute of BIN.
If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.
STEP¶
- %STEP number
Sub-attribute of BIN.
An exact step size to use between bins.
AGGREGATE¶
- %AGGREGATE type_of_aggregation
Sub-attribute of X_FIELD.
The aggregate property of a field definition can be used to compute aggregate summary statistics (e.g., median, min, max) over groups of data.
Bellow there’s list of the aggregations supported by xeus-sqlite. If you want to learn more about aggregations please refer to vega lite aggregate official documentation.
COUNT
VALID
MISSING
DISTINCT
SUM
PRODUCT
MEAN
AVERAGE
VARIANCE
VARIANCEP
STDEV
STEDEVP
STEDERR
MEDIAN
Q1
Q3
CI0
CI1
MIN
MAX
ARGMIN
ARGMAX
TIME_UNIT¶
- %TIME_UNIT time
Sub-attribute of X_FIELD.
Time unit is used to discretize time.
Bellow there’s list of the time units supported by xeus-sqlite. If you want to learn more about time units please refer to vega lite time unit official documentation.
YEAR
QUARTER
MONTH
DAY
DATE
HOURS
MINUTES
SECONDS
MILISECONDS
Y_FIELD¶
- %Y_FIELD name_of_column
Represents the Y axis of the graph. The name of the axis should be the same as the name of the SQLite column (or result of SQLite query).
TYPE¶
- %TYPE type_of_field
Sub-attribute of Y_FIELD.
Bellow there’s list of the types supported by xeus-sqlite. If you want to learn more about types please refer to vega lite type official documentation.
QUANTITATIVE
NOMINAL
ORDINAL
TEMPORAL
BIN¶
- %BIN type_of_field
Sub-attribute of Y_FIELD.
Binning discretizes numeric values into a set of bins. If bin is true, default binning parameters are used.
To customize binning parameters, you can set bin to a bin definition object, which can have the following properties:
If you want to learn more about bin please refer to vega lite bin official documentation.
ANCHOR¶
- %ANCHOR bin_position
Sub-attribute of BIN.
A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.
BASE¶
- %BASE number
Sub-attribute of BIN.
The number base to use for automatic bin determination (default is base 10).
BINNED¶
- %BASE boolean
Sub-attribute of BIN.
MAXBINS¶
- %MAXBINS number
Sub-attribute of BIN.
Maximum number of bins.
MINSTEP¶
- %MINSTEP number
Sub-attribute of BIN.
A minimum allowable step size (particularly useful for integer values).
NICE¶
- %NICE bool
Sub-attribute of BIN.
If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.
STEP¶
- %STEP number
Sub-attribute of BIN.
An exact step size to use between bins.
AGGREGATE¶
- %AGGREGATE type_of_aggregation
Sub-attribute of Y_FIELD.
The aggregate property of a field definition can be used to compute aggregate summary statistics (e.g., median, min, max) over groups of data.
Bellow there’s list of the aggregations supported by xeus-sqlite. If you want to learn more about aggregations please refer to vega lite aggregate official documentation.
COUNT
VALID
MISSING
DISTINCT
SUM
PRODUCT
MEAN
AVERAGE
VARIANCE
VARIANCEP
STDEV
STEDEVP
STEDERR
MEDIAN
Q1
Q3
CI0
CI1
MIN
MAX
ARGMIN
ARGMAX
TIME_UNIT¶
- %TIME_UNIT time
Sub-attribute of Y_FIELD.
Time unit is used to discretize time.
Bellow there’s list of the time units supported by xeus-sqlite. If you want to learn more about time units please refer to vega lite time unit official documentation.
YEAR
QUARTER
MONTH
DAY
DATE
HOURS
MINUTES
SECONDS
MILISECONDS
WIDTH¶
- %WIDTH number
Width of the graph in pixels.
HEIGHT¶
- %HEIGHT number
Height of the graph in pixels.
MARK¶
- %MARK mark
Marcs can be one of the following:
ARC
AREA
BAR
CIRCLE
LINE
POINT
RECT
RULE
SQUARE
TICK
TRAIL
COLOR¶
- %COLOR color
Sub-attribute of MARK.
Sets the color of a mark. The color can be one of the valid CSS color string.
GRID¶
- %HEIGHT boolean
Enable or disable grid view on graph.