Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geolocation to Country transformer #154

Open
tovbinm opened this issue Oct 8, 2018 · 8 comments
Open

Geolocation to Country transformer #154

tovbinm opened this issue Oct 8, 2018 · 8 comments

Comments

@tovbinm
Copy link
Collaborator

@tovbinm tovbinm commented Oct 8, 2018

Problem
We would like to be able to treat GeoLocation values as categorical features.

Solution
Add unary transformer to convert Geolocation values into Country.

Alternatives
N/A

@tovbinm tovbinm changed the title Geolocation to location transformer Geolocation to Country transformer Oct 8, 2018
@sachitdabas
Copy link

@sachitdabas sachitdabas commented Oct 20, 2018

Working on this.

@ybh6336
Copy link

@ybh6336 ybh6336 commented Dec 4, 2018

@tovbinm
Copy link
Collaborator Author

@tovbinm tovbinm commented Dec 4, 2018

@ybh6336 the idea is to use some kind of a binary file containing the information of geolocation -> country code (@ybh6336 do you know of any good one?). But we would provide an interface for users to replace is with a remote service if needed.

@ybh6336
Copy link

@ybh6336 ybh6336 commented Dec 5, 2018

@tovbinm I stumbled across the following projects which do offline reverse geocoding. Do these look in line with what you were thinking?

https://github.com/AReallyGoodName/OfflineReverseGeocode (java)
https://github.com/thampiman/reverse-geocoder (python)

@tovbinm
Copy link
Collaborator Author

@tovbinm tovbinm commented Dec 5, 2018

Yes, but if possible simpler ;) For a start we would like to have a transformer to return a country code from a pair of coordinates.

@devansh2001
Copy link

@devansh2001 devansh2001 commented Apr 30, 2020

Hello! I'm just getting started with TransmogrifAI and I'd love to work on this issue. I see a couple of attempts marked 'Closed,' but this issue is still marked 'open.' Is this issue still accepting solutions?

@tovbinm
Copy link
Collaborator Author

@tovbinm tovbinm commented May 1, 2020

We closed those cause there were no use-case for us to support exploration of this direction further.

You can have a look of what I did #227. It was based on the idea of mapping each (lat,lon) coordinate to the nearest city, and then assuming the country of that city as the result. This approach would operate correctly on majority of coordinates, but still have some edge cases.

An alternative approach was to locate a encoded country borders map, convert it to convex polygons, then query which polygon contains each location. Unfortunately no good source of publicly accessible country borders was found.

@devansh2001
Copy link

@devansh2001 devansh2001 commented May 1, 2020

Got it, thanks so much! I'll get back to this if I find a reliable public service, and I'll look into other issues to fix or features to implement. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants