vega / vl-convert

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

Support remote images #60

Closed jonmmease closed 1 year ago

jonmmease commented 1 year ago

Closes https://github.com/vega/vl-convert/issues/59

Implements a custom usvg image string resolver that uses the reqwest crate to download remote image files to temporary files so that usvg will pick them up properly.

cc @binste

binste commented 1 year ago

As always, your speed is impressive! Great solution to the problem and glad to know that I can continue with implementing basemaps based on remote tile images knowing that vl-convert can now support this approach.

jonmmease commented 1 year ago

glad to know that I can continue with implementing basemaps based on remote tile images...

Interested to hear more about this at some point!

binste commented 1 year ago

Still early stages but I just published a first draft at https://github.com/binste/altair_basemap. The repo might be moved to the altair-viz org or the feature directly implemented in Vega-Lite, see https://github.com/vega/vega-lite/pull/8885, not sure yet. You can see some examples in this notebook.