Skip to content

Conversation

@Fil
Copy link
Contributor

@Fil Fil commented Mar 10, 2023

Another stab at columnar datasets; this adopts something similar to arquero’s .array method to read a column as a (possibly typed) array. Columnar datasets are transformed into a {length, array: (field, type) => Array, iterator} object.

see #1088 and #191

@Fil Fil mentioned this pull request Mar 23, 2023
@deleted
Copy link

deleted commented Dec 8, 2023

Hi @Fil .

Just a note to say I'm very interested in the feature. Is it still planned?

Context:
I'm writing a visualizer for large sets of timeseries data that I've gone to a great deal of trouble to transform into Apache-Arrow IPC on the backend, so it's a shame that Observable plot has to transpose it to rows for rendering (though I was very pleased to discover it will accept an arrow Table as a data object!)

@Fil
Copy link
Contributor Author

Fil commented Dec 8, 2023

To be clear what this PR is trying to do is autodetect (by duck-typing) a few columnar formats and transform them into iterators that generate objects with key:value pairs. I don't think we should go this way, and I'll close this PR.

Plot supports channels passed directly as columns, saving one copy of the values (a copy will have to be made as soon as you have a scale or a data transform, anyway). I think that is what you want?

For example with apache-arrow@14, if C is a column:

const C = Arrow.makeVector(Float64Array.from({ length: 100 }, d3.randomLcg(42)));
Plot.lineY({length: C.length}, {y: C}).plot()

@Fil Fil closed this Dec 8, 2023
@Fil Fil deleted the fil/columnar-data branch December 8, 2023 22:05
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

Successfully merging this pull request may close these issues.

3 participants