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
merged 16 commits into from Jun 25, 2018

Conversation

Projects
2 participants
@slumnitz
Copy link
Member

slumnitz commented Jun 18, 2018

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

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

Also:

  • 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

@slumnitz

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

@slumnitz

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.

@sjsrey
Copy link
Member

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

sjsrey Jun 25, 2018

Member

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

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:
image

This comment has been minimized.

@sjsrey

sjsrey Jun 25, 2018

Member

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
Details

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