Giter Club home page Giter Club logo

Comments (1)

jheer avatar jheer commented on May 8, 2024

Transforms can indeed be applied to non-group mark types. However, the semantics of the transforms applied are critical. Clearly we need better documentation of input and output data for many of the transforms.

For example, given input data like this:

[{x:"a", y:1}, {x:"b", y:2}, {x:"c", y:3}]

The stats operator {type:"stats", value:"data.y"} will produce a data set with a single element, like so:

[{mean:2, min:1, max:3, ...}]

Note that no reference to the original data is maintained, hence no data.x property exists. In short, some transforms add new properties to data. Other transforms (such as stats) may produce completely new derived data elements.

Moving data from group marks to leaf-level marks also has major implications. Data at the group level is recursively divided among group instances. For example, the data [[1],[2],[3]] will result in 3 groups with "from" data of [1], [2] and [3], respectively. It is these sub-arrays (or values arrays, for faceted data) that are then passed to child marks. If you instead reference the input data at the level of (say) a rect mark, you will be attempting to visualize data that is still an array of arrays.

from vega.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.