[][src]Struct vega_lite_3::TransformBuilder

pub struct TransformBuilder { /* fields omitted */ }

Builder for Transform.

Methods

impl TransformBuilder[src]

pub fn aggregate<VALUE: Into<Vec<AggregatedFieldDef>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Array of objects that define fields to aggregate.

pub fn groupby<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self[src]

The data fields to group by. If not specified, a single group containing all data objects will be used.

An optional array of fields by which to group the values. Imputation will then be performed on a per-group basis.

The data fields for partitioning the data objects into separate groups. If unspecified, all data points will be in a single group.

The data fields to group by.

The data fields for partitioning the data objects into separate windows. If unspecified, all data points will be in a single window.

pub fn transform_as<VALUE: Into<Style>>(&mut self, value: VALUE) -> &mut Self[src]

The output fields at which to write the start and end bin values.

The field for storing the computed formula value.

The output field names for extracted array values.

Default value: The field name of the corresponding array field

The output field names for the key and value properties produced by the fold transform. Default value: ["key", "value"]

The field or fields for storing the computed formula value. If from.fields is specified, the transform will use the same names for as. If from.fields is not specified, as has to be a string and we put the whole object into the data under the specified name.

The output field to write the timeUnit value.

Output field names. This can be either a string or an array of strings with two elements denoting the name for the fields for stack start and stack end respectively. If a single string(eg."val") is provided, the end field will be "val_end".

pub fn bin<VALUE: Into<PurpleBin>>(&mut self, value: VALUE) -> &mut Self[src]

An object indicating bin properties, or simply true for using default bin parameters.

pub fn field<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

The data field to bin.

The data field to apply time unit.

pub fn calculate<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

A expression string. Use the variable datum to refer to the current data object.

pub fn filter<VALUE: Into<PurpleLogicalOperandPredicate>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The filter property must be one of the predicate definitions:

  1. an expression string, where datum can be used to refer to the current data object

  2. one of the field predicates: equal, lt, lte, gt, gte, range, oneOf, or valid,

  3. a selection predicate

  4. a logical operand that combines (1), (2), or (3).

pub fn flatten<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self[src]

An array of one or more data fields containing arrays to flatten. If multiple fields are specified, their array values should have a parallel structure, ideally with the same length. If the lengths of parallel arrays do not match, the longest array will be used with null values added for missing entries.

pub fn fold<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self[src]

An array of data fields indicating the properties to fold.

pub fn frame<VALUE: Into<Vec<Option<f64>>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value [-5, 5] indicates that the window should include five objects preceding and five objects following the current object.

Default value:: [null, null] indicating that the window includes all objects.

A frame specification as a two-element array indicating how the sliding window should proceed. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. The default value is [null, 0], indicating that the sliding window includes the current object and all preceding objects. The value [-5, 5] indicates that the window should include five objects preceding and five objects following the current object. Finally, [null, null] indicates that the window frame should always include all data objects. If you this frame and want to assign the same value to add objects, you can use the simpler join aggregate transform. The only operators affected are the aggregation operations and the first_value, last_value, and nth_value window operations. The other window operations are not affected by this.

Default value:: [null, 0] (includes the current object and all preceding objects)

pub fn impute<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

The data field for which the missing values should be imputed.

pub fn key<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

A key field that uniquely identifies data objects within a group. Missing key values (those occurring in the data but not in the current group) will be imputed.

pub fn keyvals<VALUE: Into<Keyvals>>(&mut self, value: VALUE) -> &mut Self[src]

Defines the key values that should be considered for imputation. An array of key values or an object defining a number sequence.

If provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the key field. For impute in encoding, the key field is the x-field if the y-field is imputed, or vice versa.

If there is no impute grouping, this property must be specified.

pub fn method<VALUE: Into<ImputeMethod>>(&mut self, value: VALUE) -> &mut Self[src]

The imputation method to use for the field value of imputed data objects. One of value, mean, median, max or min.

Default value: "value"

pub fn value<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self[src]

The field value to use when the imputation method is "value".

pub fn joinaggregate<VALUE: Into<Vec<JoinAggregateFieldDef>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The definition of the fields in the join aggregate, and what calculations to use.

pub fn transform_default<VALUE: Into<String>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The default value to use if lookup fails.

Default value: null

pub fn from<VALUE: Into<LookupData>>(&mut self, value: VALUE) -> &mut Self[src]

Secondary data reference.

pub fn lookup<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

Key in primary data source.

pub fn time_unit<VALUE: Into<TimeUnit>>(&mut self, value: VALUE) -> &mut Self[src]

The timeUnit.

pub fn sample<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The maximum number of data objects to include in the sample.

Default value: 1000

pub fn offset<VALUE: Into<StackOffset>>(&mut self, value: VALUE) -> &mut Self[src]

Mode for stacking marks. Default value: "zero"

pub fn sort<VALUE: Into<Vec<SortField>>>(&mut self, value: VALUE) -> &mut Self[src]

Field that determines the order of leaves in the stacked charts.

A sort field definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered “peer” values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to true).

pub fn stack<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

The field which is stacked.

pub fn ignore_peers<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Indicates if the sliding window frame should ignore peer values (data that are considered identical by the sort criteria). The default is false, causing the window frame to expand to include all peer values. If set to true, the window frame will be defined by offset values only. This setting only affects those operations that depend on the window frame, namely aggregation operations and the first_value, last_value, and nth_value window operations.

Default value: false

pub fn window<VALUE: Into<Vec<WindowFieldDef>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The definition of the fields in the window, and what calculations to use.

pub fn build(&self) -> Result<Transform, String>[src]

Builds a new Transform.

Errors

If a required field has not been initialized.

Trait Implementations

impl Clone for TransformBuilder[src]

impl Default for TransformBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.