Skip to content

Compatibility between spatialpandas.dask.DaskGeoDataFrame and HoloViews, GeoViews and hvplot? #53

Open
@julioasotodv

Description

@julioasotodv

Hi,

Apparently, there is no support for spatialpandas.dask.DaskGeoDataFrames in HoloViz plotting libraries other than datashader.

A simple example:

import holoviews as hv
hv.extension("bokeh")

# I have a single-row Parquet file I created using spatialpandas. 
# It only contains one row and one column, called geometry, which contains a MultiLine object. 
# I can easily read in as a spatialpandas.dask.DaskGeoDataFrame:
from spatialpandas.io import read_parquet_dask

df = read_parquet_dask("sample_spatialpandas_row.parquet")

# I now want to plot the multiline. For instance, with hvplot:
import hvplot.dask

df.hvplot()

# This raises an exception: Supplied data type DaskGeoDataFrame not understood

# And the same goes for instance for GeoViews:
import geoviews as gv

gv.Path(df)

# It does not recognizes it as a geodataframe-like element, raising: 
# ValueError: kdims: list length must be between 2 and 2 (inclusive)

The above is just an example, obviously. You can find the sample parquet file I used here (needs to be unzipped).

Having this working would allow datashading dinamically and directly from Holo/GeoViews/HvPlot using holoviews.operation.datashader on larger than memory datasets, backed by spatialpandas.dask.DaskGeoDataFrame, which would be amazing.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions