Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple source datasets like vega #1271

Closed
rufuspollock opened this issue Mar 29, 2016 · 12 comments
Closed

Support multiple source datasets like vega #1271

rufuspollock opened this issue Mar 29, 2016 · 12 comments

Comments

@rufuspollock
Copy link

At the moment vega-lite's data property is a little different from vega's in that it only allows one data source (and does not name it).

Will it be possible in future to have vega-lite support multiple datasets similar to vega?

Aside: whatever you do it might be worth documenting the difference here and what happens in the transformation to vega data as technical users (like me) would be interested. It took me a while to grok what was happening e.g. that the data from vega-lite always ends up in a dataset called source -- and I'm still unsure whether i can do late data binding (does the layout dataset get transformed ...)?

@domoritz
Copy link
Member

We do not plan to support multiple data sources in a single view. With multiple data sources the compiler wouldn't be able to resolve some ambiguities and so far we couldn't think of any use cases. We might add support for an initial union or join to combine multiple data sources into one, though. Is that what you were thinking about?

Having said that, we do plan to support different data sources in different layers and when views are concatenated. We already have a few prototypes working (see #1241 for example) but it's not production ready yet.

Aside: whatever you do it might be worth documenting the difference here and what happens in the transformation to vega data as technical users (like me) would be interested.

Yes. We should add more developer documentation. Probably in the form of readmes in the source code directories.

It would be great if you could document what you found unclear so we know what to focus on.

that the data from vega-lite always ends up in a dataset called source

Actually we create a source and also a s summary if the visualizations uses aggregation.

@rufuspollock
Copy link
Author

@domoritz here's a summary of where i found "sharp edges": https://github.com/okfn/datapackage-render-js#research - a result of my working getting a rudimentary data package + vega-lite integration working 😄 )

BTW if you have time for a call at some point with me and e.g. @pwalsh think that could be super productive ...

@pwalsh
Copy link

pwalsh commented Mar 31, 2016

@rgrp @domoritz would love to jump on a call for this.

@domoritz
Copy link
Member

domoritz commented Apr 1, 2016

@rgrp Sure. Let's organize a call. I sent you a message.

@kanitw
Copy link
Member

kanitw commented Jun 19, 2017

We now support lookup transform which allow a form of joining multiple data sources

@kanitw kanitw closed this as completed Jun 19, 2017
@kanitw
Copy link
Member

kanitw commented Jun 19, 2017

I'm closing this since I'm not sure what are the actionable items left.

@tcar06
Copy link

tcar06 commented Mar 29, 2018

Does vega support multiple datasets now? Hope someone can show me an example or point me in the right direction.

@domoritz
Copy link
Member

Vega or Vega-Lite?

@tcar06
Copy link

tcar06 commented Mar 30, 2018

Vega-Lite

@domoritz
Copy link
Member

In Vega-Lite, data can be defined per view. For example, two hconcated charts may have different data.

@anandsunderraman
Copy link

what happens if there are multiple records matching an entityId ?

@ratnanil
Copy link

ratnanil commented Feb 1, 2023

I would like to aggregate two datasets from two different API calls with identical structure (see below). I'm using vconcat now, but I was wondering is there a way to aggregate the data on a JavaScript level before using the data in Vega-Lite?

image

Data from

  1. https://api.stackexchange.com/2.3/users/4139249/top-tags?site=stackoverflow and
  2. https://api.stackexchange.com/2.3/users/40929/top-tags?site=gis.stackexchange.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants