Today I've just faced one challenge...
I work on one project, and we need to decide which assets from this company will be visited initially.
As every project, we have limited budget, so we should find some variables to indicate a priority scale.
After some discussion, someone said: let's find the assets close to schools and hospitals. Those must be inspected firstly than others.
Everybody agreed with the voice, but how would be possible to map every school and hospital close to X,000 assets?
To answer that question, I would like to introduce the googleway's library for RStudio.

  1. To use it, you have to get a google's API key (Google API)

  2. After that, you have to install googleway library in your RStudio, call that library as you see in the picture bellow. The variable df_places will save the results for this search. I'm setting hospital as the key word, one lat and long to start as reference, radius in meters (max = 50,000m), and key is the key you got from google API.

  3. The best part is just to come. When you call the results, you will see the firsts 20 closest places from the location you insert, the name, address and lat/long of those places.

I hope this post help you. If anyone has any doubt, please contact me.

Views: 6100

Tags: Map, R, Rstudio, address, close, find, google, googleway, location, map, More…search


You need to be a member of Data Science Central to add comments!

Join Data Science Central

Comment by Thiago Buselato Maurício on February 1, 2018 at 1:08am

Hi Douglas,

I do have an ideia. The problem is with the key variable in the end google_places command.

I should declare key variable before this google_places command with the google API, which you can create going through this website: https://developers.google.com/maps/documentation/embed/get-api-key

If you have any further question, just ask to me.


Comment by Douglas Wiegand on January 31, 2018 at 5:33pm

I am getting:

Error in paste0(names(urlArgs)) :
object 'mykey' not found.

Any ideas?

Comment by Gilbert Queiroz dos Santos on January 31, 2018 at 2:58am


© 2021   TechTarget, Inc.   Powered by

Badges  |  Report an Issue  |  Privacy Policy  |  Terms of Service