Closed afonit closed 5 years ago
After looking through this some more - it looks like it is overriding the data transformer: https://github.com/altair-viz/altair/blob/master/altair/vegalite/v2/api.py#L512
So it may be undoing the work of:
alt.data_transformers.register(
'gpd_to_values',
lambda data: alt.pipe(data, gpd_to_values)
)
alt.data_transformers.enable('gpd_to_values')
at the top of of the reproducible plot.
I am going to close this as I see the solution and I will handle it on the altair side - after some testing I will create a pull request in that project.
@afonit Sorry for delay in responding. I love issues that resolves by itself. I hope you have found solution that works for you.
I have to admit that limit on row count in Altair preserve it from many difficulties in moving huge data between processes using protocols that wasn't designed for it. In other hand I'm not sure that you can display such amount of data without aggregation. As you are already using GeoPandas try to aggregate data with it, it could be match more effectively than doing it on javascript side of vega.
If you can provide a sample of data and desired chart I will try to help you. If you can donate that data sample it would be great to make an example.
using
Gives the below error:
What does work:
When you to .to_json() there is not an error and it produces it fine.
In jupyterlab at the top right of plots you have the (...) menu where you can tell it to save to a png - and that does work fine.
What does not work:
Here is a reproducible example:
To get the error - now run:
Looking for ideas as it seems to serialize to json fine with .to_json() but runs into trouble with saving to a png.
Also of note - is in jupyterlab at the top right of plots you have the (...) menu where you can tell it to save to a png - and that does work fine.
Here is the full error: