Skip to content

Exploration of potential interfaces for alternative packages #22

Open
@slumnitz

Description

@slumnitz

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 the matplotlib API. This will help to provide an insight into whether or not it is viable to use a set_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 with JavaScript)

Testing criteria:

  1. maturity of package (active community, examples, ...)
  2. ease of use
  3. is it possible to design an API similar or exactely like the matplotlib API (without too much effort)?
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionspace for collecting ideas and discuss these

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions