Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@knaaptime
Copy link
Member

@knaaptime knaaptime commented Oct 27, 2023

  • add function to get LISA labels at a given crit value
  • add interactive plot for local moran

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #274 (2f557f2) into main (f6a8732) will increase coverage by 0.2%.
The diff coverage is 97.4%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #274     +/-   ##
=======================================
+ Coverage   73.4%   73.6%   +0.2%     
=======================================
  Files         24      24             
  Lines       3285    3316     +31     
  Branches     518     520      +2     
=======================================
+ Hits        2411    2441     +30     
  Misses       708     708             
- Partials     166     167      +1     
Files Coverage Δ
esda/moran.py 76.0% <97.4%> (+1.5%) ⬆️

Copy link
Member

@jGaboardi jGaboardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice.

@knaaptime
Copy link
Member Author

actually, it might be nice to just expose a method that returns cluster labels at a given threshold

@martinfleis
Copy link
Member

How do you like to do the folium tests @martinfleis ?

Get html string and look for expected strings in that. Check geopandas explore tests, there are some helper functions to get that out of the m.

I'll have a look at the PR later. Ping me if you'll need some input sooner.

@knaaptime
Copy link
Member Author

appreciate it. It's coming back to me now as i'm remembering i already asked you for the local knox plots :P

@knaaptime
Copy link
Member Author

this is ready, though not sure why the non-numba tests are failing

@jGaboardi
Copy link
Member

Seem to be failing due to dtype mismatch:

E           Mismatched elements: 1 / 10 (10%)
E            x: array(['Insignificant', 'Insignificant', 'Insignificant', 'Insignificant',
E                  'Insignificant', 'Insignificant', 'Insignificant', 'Insignificant',
E                  'Insignificant', 'Insignificant'], dtype=object)
E            y: array(['Insignificant', 'Insignificant', 'Insignificant', 'Insignificant',
E                  'Insignificant', 'Insignificant', 'High-High', 'Insignificant',
E                  'Insignificant', 'Insignificant'], dtype='<U13')

@knaaptime
Copy link
Member Author

@jGaboardi yeah thats weird but the vals are different too. the y array has a high-high

@jGaboardi
Copy link
Member

@jGaboardi yeah thats weird but the vals are different too. the y array has a high-high

good point; missed that part.

@knaaptime
Copy link
Member Author

my guess would be something to do with the seeding

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a minor suggestion but feel free to skip that. Do you need a hand with tests?

@knaaptime
Copy link
Member Author

@martinfleis that would be great if you have a sec, but no sweat if not. I dunno why these are failing. Also if you think we should beef up the second map test a bit instead of just checking number of layers

@martinfleis
Copy link
Member

I meant the actual coverage of the results, to check the html string for colours. Haven't actually looked at failures. But won't happen sooner than tomorrow eve.

@knaaptime
Copy link
Member Author

yeah that would be great too. Though i think coverage should be decent once we're passing again

@martinfleis
Copy link
Member

I have added a small commit checking the correctness of the folium html.

@martinfleis
Copy link
Member

It seems that the result is stable on larger data. Maybe use Sacramento to test labels as well?

@knaaptime
Copy link
Member Author

yeah, i'll just do that. Upping the number of permutations might do the trick too. Though its a little curious that all the numba-based tests are passing but the non-numba arent. I'm not sure what that implies about the seeding

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last minor code suggestion to remove an if that will never be True. Otherwise looks great!

Co-authored-by: Martin Fleischmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants