Description
Answering the question how and which interactive package to integrate or not to integrate into splot
Idea and Experiment collection in order to decide on:
- how different alternative, interactive packages can be integrated into
splot
and - what
PySAL
functionality could/ should be supported interactively in future
To get a clear idea on what is possible and how a future integration could look like, I suggest to undertake experiments designing API's and assessing what is possible with alternative packages.
I will therefore test different packages generating the
-
esda.moran.Moran_Local
(scatterplot, LISA map, Choropleth map) and - (if there is time the
giddy.directional
(heatmap, LISA maps, rose plot))
visualisation.
I am aiming for an API design that is as close as possible to thematplotlib
API. This will help to provide an insight into whether or not it is viable to use aset_backend('package')
option, to quickly change backend packages or not.
I am testing under the assumption that interactive backends are used for the exploration of data and statistical results, not necessarily for publishing in a paper (we have the matplotlib
interface for this). Therefore I will limit the options to customise visualisations to a minimum. I would suggest to ideally make the interactive backend a default or if not possible provide an additional method for PySAL objects .plot_interactive()
, since interactive plotting could provide an attractive alternative to interfaces commonly used in the geographic sphere (software packages like GRASS, ArcMaps...).
Interactive visualisation packages:
- Bokeh (GeoViews)
- Altair
- Folium (Potential limit to underlying base maps only--> Functionality limited)
- Plotly (hard to use and not well documented for offline use without a subscription)
- D3 (Lower priority since
JavaScript
based and I am not familiar withJavaScript
)
Testing criteria:
- maturity of package (active community, examples, ...)
- ease of use
- is it possible to design an API similar or exactely like the
matplotlib
API (without too much effort)? - How much additional functionality do packages offer?
- e.g. dataframes,
- geo-shapes,
- plot on top of map base layers, etc.
Possible outcomes:
- no use of interactive packages, instead continuing with interactive
matplotlib
functionality (widgets, masking options, ...) - use of interactive package as
set_backend('bk')
option - use of interactive package for additional functionality (plotting on map base layers)
Results