pysal / pointpats

Planar Point Pattern Analysis in PySAL
https://pysal.org/pointpats/
BSD 3-Clause "New" or "Revised" License
80 stars 26 forks source link

Knox enhancements #111

Closed sjsrey closed 10 months ago

sjsrey commented 1 year ago

Features

Todo

codecov[bot] commented 1 year ago

Codecov Report

Merging #111 (8ebd6a9) into main (416bca9) will increase coverage by 6.70%. Report is 6 commits behind head on main. The diff coverage is 78.40%.

@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
+ Coverage   59.57%   66.28%   +6.70%     
==========================================
  Files          10       12       +2     
  Lines        1405     1732     +327     
  Branches      246        0     -246     
==========================================
+ Hits          837     1148     +311     
- Misses        518      584      +66     
+ Partials       50        0      -50     
Files Changed Coverage Δ
pointpats/spacetime.py 83.10% <78.40%> (-6.27%) :arrow_down:

... and 9 files with indirect coverage changes

sjsrey commented 11 months ago

This is nice! Could we try to get this and #105 in and cut a release with sklearn 1.3.0 compatibility fixes we did here?

Yes. Perhaps during the sprint on 8-24?

knaaptime commented 10 months ago

@martinfleis not to distract you from working on lib at the moment, but a quick thing in case you have an idea..

we cooked up a little explore method on the localknox class that works pretty nicely. One killer thing would be to have an onclick or mouseover function that highlights neighbors when you interact with focal. I think the current method has all the info necessary to get there, but not sure how to go about rigging that up with folium. Curious if you know how

martinfleis commented 10 months ago

Not possible afaik. The styling function sees only a single item of the json and I didn't figure out a way of highlighting from B based on an interaction with a geom A.

knaaptime commented 10 months ago

bummer. pretty sure that's dead simple in vanilla leaflet. I was trying to send back IDs of neighbors as an attribute of focal to highlight those vals in a different color or something

thanks for the insight

martinfleis commented 10 months ago

I am not so sure, folium is pretty close in API to leaflet. But I suppose it would need a bit of custom JS which is easy when you have a leaflet map, not so much with folium.

Maybe bokeh or geoviews may offer solutions.