feature_engine
feature_engine copied to clipboard
Geo distance transformer
Hei,
For a project, I created a transformer that given the coordinates of two points on the earth calculates the distance between them. It would be interesting to have in here.
If you are interested I could open a PR with a first draft to discuss it.
Let me know.
Hey @VascoSch92
Yes, I also created distances from coordinates in my work as well. This is a functionality I've been wanting to add to the library for a long time.
It'd be great if you could give it a go and and add that transformer.
How would the transformer work?
What I had in mind is that the transformer takes 2 lat and 2 lon variables, that is 4 input features, and returns the distance. That's how my data looked like in the past. Is this what you do as well? I am happy to hear of alternatives.
Thank you!
I have a first version of the distance transformer that I will like to share.
What it the etiquette for branch names?
Hey @solegalli , the distance transformer is ready :-) at least a sketch. Can you add me as contributor? Otherwise I can not create a PR
Thanks
Hey @VascoSch92
Thank you so much for the engagement, and super apologies for the delayed response.
Before taking new PRs I wanted to fix all tests that were failing due to the new releases of pandas, sklearn and scipy.
That is now done.
We work with PRs.
So if you fork this repo (make sure you have the latest version of main), and then create a branch where you add the functionaity, you could make a PR from there.
More info in how to contribute here: https://feature-engine.trainindata.com/en/latest/contribute/contribute_code.html