API Google , .
.
encontrar, .
, Google . . , , .
, ,
coordenadas<-c(-34.605424, -58.458499)
encontrar<-function(lugar,radius,keyword){
coor<-paste(lugar[1],lugar[2],sep=",")
baseurl<-"https://maps.googleapis.com/maps/api/place/nearbysearch/json?"
google_key<-c(" YOUR KEY HERE")
q<-paste(baseurl,"location=",coor,"&radius=",radius,"&types=food|restaurant&keyword=",keyword,"&key=",google_key, sep="")
print(q)
data1<-fromJSON(q)
lat_long<-data.frame(lat=data1$results$geometry$location$lat,long=data1$results$geometry$location$lng)
sitios<-data1$results$name
df<-cbind(sitios,lat_long)
return(df)
}
encontrar(lugar = coordenadas,radius = 500,"pizzeria")
500
, "&types=food|restaurant" , "". .