splot icon indicating copy to clipboard operation
splot copied to clipboard

update `plot_spatial_weights` for new libpysal api

Open knaaptime opened this issue 2 years ago • 8 comments

when the libpysal change goes live (libpysal.weights.W(...use_index=True) it will break the spatial weights plotting function

knaaptime avatar Jan 13 '23 21:01 knaaptime

We wanted to refactor that anyway and merge the plotting method we have here with the one over in lib anyway. So it may actually be a candidate for a quick-ish PR.

martinfleis avatar Jan 13 '23 21:01 martinfleis

while we're at it, one thing it would be nice to add is auto ability to scale linewidths by weight value for nonbinary weights

knaaptime avatar Jan 13 '23 21:01 knaaptime

also maybe an interactive analogue

knaaptime avatar Jan 14 '23 17:01 knaaptime

An easy way to do those would be to create a GeoSeries from the links and use geopandas plot and explore methods but it means one more copy of the data as an intermediate step.

martinfleis avatar Jan 14 '23 21:01 martinfleis

thats what i had in mind. And maybe @walkerke would be willing to contribute his interactive LISA code?

knaaptime avatar Jan 14 '23 21:01 knaaptime

I thought that's just explore over LISA labels, no?

martinfleis avatar Jan 14 '23 22:01 martinfleis

yeah pretty much. just a function to wrap the labels and hit explore

knaaptime avatar Jan 14 '23 22:01 knaaptime

Looking through splot I think an interactive analogue to the methods that wraps .explore() would be pretty useful. Happy to take a look at it.

walkerke avatar Jan 15 '23 20:01 walkerke