InseeFrLab / pynsee

pynsee package contains tools to easily search and download french data from INSEE and IGN APIs
https://pynsee.readthedocs.io/en/latest/
MIT License
67 stars 8 forks source link

Add an `exact_location` field for SIRENE DataFrames with `get_location` #168

Closed tfardet closed 1 year ago

tfardet commented 1 year ago

Right now, there is no obvious way to check whether the location returned by get_location is exact or not.

I'd propose to add a column with a title like "exact_location" that would be a boolean with True if the first call to get_location_openstreetmap succeeds and False otherwise.

hadrilec commented 1 year ago

170 has been merged, the issue should be fixed

tfardet commented 1 year ago

I was looking at it, so will propose an additional PR to add some documentation and caching. Is there a reason why the function is declared in a separate file and not directly as a SireneDataFrame method? Should I move it there?

hadrilec commented 1 year ago

indeed, I forgot to improve the related doc, thanks as far as I understand, the get_location function is imported inside the class, and hence becomes a method of the class, isn't it?

tfardet commented 1 year ago

@hadrilec sure, but why make an extra file instead of having it directly in SireneDataFrame? Also it is a bit strange to have a lonely method with a self argument. It's not technically a problem, just feels a little weird so I would propose to move it into the same file unless there is a good reason not to do so...

hadrilec commented 1 year ago

as you like