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

adapting existing `esda` functionality to `splot.esda` namespace and allow `.plot()` method #13

merged 16 commits into from Jun 25, 2018


2 participants
Copy link

slumnitz commented Jun 18, 2018

adapt existing code from to be used as esda .plot() method and be called though splot.esda.

  • renamed to
  • created namespace
  • changed moran_scatterplot() to moran_loc_scatterplot()
  • integrated **kwargs as function parameter where possible
  • renamed and debugged to test new functionality
  • implement relative and absolute imports


  • remove Guerry example from splot (found in libpysal in future)

slumnitz added some commits Jun 13, 2018

start integrating current `mpl` functionality into `splot.esda`
change df to gdf,
add **kwargs to functionality
create `splot.esda` namespace
change `moran_scatterplot()` to `moran_loc_scatterplot()`
functionality returns `ax`
debug tests according to new changes
removed `- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then 2to3 -nw splot…
…/ > /dev/null; fi`

is changing correct imports into relative imports

@slumnitz slumnitz requested review from sjsrey and ljwolf Jun 19, 2018


This comment has been minimized.

Copy link
Member Author

slumnitz commented Jun 19, 2018

all cleaned up and working :)

@slumnitz slumnitz requested a review from darribas Jun 19, 2018


This comment has been minimized.

Copy link
Member Author

slumnitz commented Jun 20, 2018

I will leave the documentation build by sphinx out of this pull request for now, because I am starting to encounter some not so easy to solve issues. I will open another pull request concerning documentation later.

Copy link

sjsrey left a comment

Looks good to me. I just have one comment.

def moran_scatterplot(moran_loc, p=None, figsize=(7,7), xlabel='Attribute',
ylabel='Spatial Lag', title='Moran Scatterplot',
ax=None, alpha=0.6):
def moran_loc_scatterplot(moran_loc, p=None,

This comment has been minimized.


sjsrey Jun 25, 2018


Not sure about the renaming of this function (I could be forgetting - or I missed - the discussion). moran_scatterplot seems cleaner (and matches the docstring).

This comment has been minimized.


slumnitz Jun 25, 2018

Author Member

I renamed it because I started creating visualizations for other esda spatial autocorrelation objects like "Global" Moran, discussed before in #10.

In order to distinguish visualizations for Moran, Moran_Local, Moran_BV, ... I renamed this one Ito moran_loc_scatterplot.

Here is a first draft of how the "Global" Moran visualization could look like:

This comment has been minimized.


sjsrey Jun 25, 2018


Thanks for clarifying. Looks good to me now.

@sjsrey sjsrey merged commit e1a3513 into pysal:master Jun 25, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

GSoC 2018 automation moved this from In progress to Done Jun 25, 2018

@slumnitz slumnitz deleted the slumnitz:esda branch Jun 26, 2018

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