CartoDB/cartoframes

Export a vector-based image from a notebook

Closed this issue · 4 comments

I'm using cartoframes in a Google Colab notebook to plot geodata. What I would like to be doing with these maps is exporting them as static, high-quality images (preferably .eps or .svg) to be used in design software like Adobe Illustrator. Is there a way to make this happen?

Ideally, I'm looking for in-line export functionality, like Plotly's "fig.write_image(file_name)" that I can use to send a .svg image directly to a Google Drive folder.

I read through this thread, which seemed similar (but not exactly the same):
#499

If I understand correctly, carto-print seems to need a Carto API key. It also doesn't seem to allow you to specify the type of image. Similarly, the map.publish() functionality requires an API key, and I don't know what the export options are once it's been published.

Do either of those options (or any other options I've not considered) allow for what I'm trying to do? If so, do any of them allow for it without requiring an API key and/or going through Carto published maps?

Hi @connerpate, thanks for using CARTOframes.

You can export a static image thanks to the browser. Let me show you how:

download_image

Does it work for you?

Hi @cmongut,
Your image is cut off on the top and is in Spanish, so I'm not sure what I'm seeing, but I'm guessing you're using the option that in English would be "Save Image As...".
This does not work for me. The only image type option in this workflow is "PNG image", and I specifically need either a) a very high resolution image, or b) ideally a vector-based image to work with. A .PNG is neither of those things - that's why I was exploring solutions like map.publish() native to Cartoframes, in the hope that Carto had developed a means of exporting a vector-based image.
Thank you,
Conner

Hi @connerpate,

I have updated the image so it appears in english, sorry about that.

Unfortunately, we don't have an option to export it in a high resolution format right now and it's not planned to be added it soon. We will take your comment into consideration though :)

Thank you

This is not possible with the current implementation (using VL). But we will save the proposal for a possible future implementation using WebSDK. cc @VictorVelarde