segregation icon indicating copy to clipboard operation
segregation copied to clipboard

reimplementSpatialImplicit measures with Graph

Open knaaptime opened this issue 1 year ago • 11 comments

this will be a major improvement but a major change. Currently SpatialImplicit indices can accept either a W or a pandana.Network (which have different arguments). It's very easy to make a pandana-backed Graph, so these will now only accept Graphs. The first step is wrapping the network-->graph logic into a little utility function. That could live in lib, like the xarray builder, but also might make sense to move more of the network stuff into spopt. Any thoughts @jGaboardi @martinfleis

knaaptime avatar Jul 13 '24 22:07 knaaptime

I really need to decide what to do with spaghetti... It has been languishing for years now^1 , but I haven't had the time or mental space to figure out what to do with it. Ideally, all network-type stuff would happen in 1 package, but I'm not sure how feasible that would be without a major overhaul to several packages....


jGaboardi avatar Jul 14 '24 15:07 jGaboardi

re: moving stuff to spopt -- I don't think that's the right place.

jGaboardi avatar Jul 14 '24 15:07 jGaboardi

I would keep it among other builders in lib. I would consume it in momepy and I think that having all builders on the Graph would greatly improve their visibility.

If you want all network stuff in one package, keep in mind we also have access.

martinfleis avatar Jul 14 '24 15:07 martinfleis

agree a weights builder would make sense in lib. My thought was it would be useful to have some other network utilities like these somewhere in the pysal stack (especially for tests and such if a builder will live in lib). And anything backed by pandana feels fundamentally like routing; despite its description (regionalization, optimization, routing), spopt doesn't have any routing (I think?). (though now that I'm looking closer, I see 'routing' has been replaced by 'transportation-oriented solutions' :P)

knaaptime avatar Jul 15 '24 16:07 knaaptime

We also have (some) analogous functions interfacing networkx in momepy.

martinfleis avatar Jul 15 '24 19:07 martinfleis

i need to play with momepy again... those are cool!

i'd be happy to send those utils to momepy if that's best, though they don't feel particular morphometric. I hate to propose a new package, but would it make sense to think about a successor to spaghetti that consolidates some of this stuff (and maybe provides a path forward for you to pick and choose what you want to keep from before james?). Not sure that's an ideal path, just a thought

knaaptime avatar Jul 15 '24 19:07 knaaptime

i'd be happy to send those utils to momepy if that's best

I am not sure about that, just wanted to flag that the pandana stuff is not the only one to consider.

martinfleis avatar Jul 15 '24 20:07 martinfleis

this migration should also include a move to pandarm and deprecate pandana

knaaptime avatar Nov 26 '25 01:11 knaaptime

I didn't know you actually forked pandana. Cool!

martinfleis avatar Nov 26 '25 06:11 martinfleis

a couple days fighting infuriating and opaque c++ errors--a new adventure--but well worth it in the end, i think. AFAICT, have just about everything working properly, even the wheel builds for pypi. Just need to rewrite the old tests

knaaptime avatar Nov 26 '25 06:11 knaaptime

Just need to rewrite the old tests

I can try to carve out some time to assist with this in the coming weeks.

jGaboardi avatar Nov 26 '25 11:11 jGaboardi