cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dnison Frequent Visitor
Frequent Visitor

Possible to get address returned from Lat Long in maps?

Is it possible to hook a dataset with lat long in it to something within Power BI that will bring back an approximate address that I could display on a map?  If yes, how accurate is that address?  Am I better off seeking an outside service to hook into the dataset before bringing it into Power BI?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Possible to get address returned from Lat Long in maps?

Hey,

 

what you are looking for is called "reverse geocoding".

 

Here is a little example, how to "reverse geocode" using the google maps api:

https://www.codexworld.com/get-address-from-latitude-longitude-using-google-maps-api-php/

 

This excellenct video shows how you can use the google maps api from Power Query

https://www.youtube.com/watch?v=87UsaOYD-ZM

This video also a link to how to obtain an api key.

 

Spoiler
Please consider the following, reverse geocoding may conflict  with data privacy!

 

Also consider, due to the lack of incremental data loads in Power Query, you send each row of the ever growing dataset to the api whenever you refresh the dataset. This then may also conflict with api limitations that just answers a certain amount of requests per time unit. For this reason I would recommend to use SQL Server and the integration of R (available since SQL Server 2016). And then use R script to get the address, this is described here:

https://datavisualizationineconomics.blogspot.de/2015/11/reverse-geocode-using-google-api-and.html

Please be aware that this solution calls into the world wide web from inside the SQL Server, and you may need some good arguments to convince your DBAs to allow this. One Argument is always "the value of location based information", at least I often use this argument 😉

 

Hopefully this provides some ideas.

 

Regards

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
I accept Kudos :-), If you find my post helpful.

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Possible to get address returned from Lat Long in maps?

Hey,

 

what you are looking for is called "reverse geocoding".

 

Here is a little example, how to "reverse geocode" using the google maps api:

https://www.codexworld.com/get-address-from-latitude-longitude-using-google-maps-api-php/

 

This excellenct video shows how you can use the google maps api from Power Query

https://www.youtube.com/watch?v=87UsaOYD-ZM

This video also a link to how to obtain an api key.

 

Spoiler
Please consider the following, reverse geocoding may conflict  with data privacy!

 

Also consider, due to the lack of incremental data loads in Power Query, you send each row of the ever growing dataset to the api whenever you refresh the dataset. This then may also conflict with api limitations that just answers a certain amount of requests per time unit. For this reason I would recommend to use SQL Server and the integration of R (available since SQL Server 2016). And then use R script to get the address, this is described here:

https://datavisualizationineconomics.blogspot.de/2015/11/reverse-geocode-using-google-api-and.html

Please be aware that this solution calls into the world wide web from inside the SQL Server, and you may need some good arguments to convince your DBAs to allow this. One Argument is always "the value of location based information", at least I often use this argument 😉

 

Hopefully this provides some ideas.

 

Regards

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
I accept Kudos :-), If you find my post helpful.

Proud to be a Datanaut!

View solution in original post

pistonss Frequent Visitor
Frequent Visitor

Re: Possible to get address returned from Lat Long in maps?

Hello Tom,

 

This seems like to be the answer to what I am looking for. However, I am completely new to coding and do not even know what to do with the PHP code given in the link you provided. Can you give me an idea of what I should be doing with it?

 

I have csv file with million rows of lat long and I need to be able to identify the district, subdistrict, zipcode of each coordinate

 

 

My data could possibly be too large for excel. Would it be possible to do it in MS Access or Power BI too? If not I can stick with Excel.

 

Bests

Suthipat

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors