Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current weight plot method is time consuming for a large data set #123

Closed
weikang9009 opened this issue Oct 31, 2018 · 7 comments
Closed

Comments

@weikang9009
Copy link
Member

The current plot method for W is quite time consuming for a large data set. An example is given in the notebook.

@ljwolf
Copy link
Member

ljwolf commented Oct 31, 2018 via email

@darribas
Copy link
Member

darribas commented Sep 9, 2019

An alternative example with datashader can be found here:

https://gist.github.com/darribas/8d8f931a4414a52d82480db4f37c183e

IIRC their method is pretty quick, as it relies on numba, but it's an extra dependency. Maybe we could offer this as a first option and, if not present (or the user wants), fall back to the current one?

@weikang9009
Copy link
Member Author

A quicker plotting method is given in splot, but not integrated into libpysal yet.

I think it is a great idea to offer the datashader functionality as the default option and falls back to the current splot function. In addition, I am thinking maybe we should move this (datashader function) to splot and deal with the logic/order over there?

@slumnitz
Copy link
Member

The data shader visualisation looks awesome! Since it is static, we could definitely integrate it into splot.libpysal as is. I would suggest to try and keep the current plot_spatial_weights() API if possible. @weikang9009 in which cases would you suggest the current plot function should be used, compared to the data shader function? Maybe it would be best to completely replace it?

@weikang9009
Copy link
Member Author

I think providing the fast plotting of spatial weights is great! But note that the function requires extra dependencies: datashader and numba - I think neither of them is a dependency for splot or libpysal at the moment? It might be more reasonable to treating these two packages as soft dependencies - if they are not installed, the current plot function will be used. This is also the strategy suggested by @darribas?

@slumnitz
Copy link
Member

ok, I am happy to give it a go and play with both functions on the weekend. Would you prefer an automatic switch with a warning as soon as numba is not present to the current splot functionality? Or should we include an argument in the API to choose between the two options?

@github-actions
Copy link

github-actions bot commented Mar 1, 2020

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants