vega / vl-convert

Utilities for converting Vega-Lite specs from the command line and Python
BSD 3-Clause "New" or "Revised" License
89 stars 9 forks source link

WIP: Attempt to support arrow serialization #119

Closed jonmmease closed 9 months ago

jonmmease commented 9 months ago

This PR is an experiment towards supporting base64-encoded arrow IPC data. The idea is to support data URLs of the form:

data:application/vnd.apache.arrow.file;base64,//////gAA...

Then convert the base64 data to binary and parse using the arrow JavaScript library. Then pass the arrow Table as the values property of the dataset. Arrow Tables support the array-of-objects format that Vega uses, so this mostly just works. But I've run into a few issues:

test test_png_no_theme::test::case_02 ... ERROR TypeError: 'set' on proxy: trap returned falsish for property 'bin_maxbins_10_IMDB_Rating'
    at https://cdn.skypack.dev/-/vega-transforms@v4.10.2-ZwuxbjLubhdUwIKHKtlL/dist=es2020,mode=imports,min/optimized/vega-transforms.js:1:11242
    at Array.forEach (<anonymous>)

Given these issues, I'm not sure it makes sense to move forward with this right now. But wanted to document my findings.