pysal / esda

statistics and classes for exploratory spatial data analysis
https://pysal.org/esda
BSD 3-Clause "New" or "Revised" License
206 stars 53 forks source link

shape_index is the same as radii_ratio #248

Open martinfleis opened 1 year ago

martinfleis commented 1 year ago

We have a duplication in shape indices. shape_index is the same as radii_ratio.

https://github.com/pysal/esda/blob/17c5f0076f1d8edecfc3d715038f7d2e8e2a6526/esda/shape.py#L356

and

https://github.com/pysal/esda/blob/17c5f0076f1d8edecfc3d715038f7d2e8e2a6526/esda/shape.py#L193-L195

are the same formulas.

We should probably deprecate one in favour of the other.

ljwolf commented 1 year ago

I like the “radii_ratio” name, since it expresses its structure as the ratio of two ideal shape radii. The two implementations are basically the same, though I find the one with more lines to be easier to understand.

We can always alias one as the other?

martinfleis commented 1 year ago

Yeah, I also like the radii ratio better as shape index is too generic. All of them are shape indices. Agree that the multiline version is a bit more readable.

We can always alias one as the other?

Yeah but I don't think there's a ton of downstream usage of this so I would simply deprecate shape_index and add a note to radii_ratio docstring saying that it is also known as Schumm's shape index.

ljwolf commented 1 year ago

I will never pass up an opportunity to deprecate!