gl_geocode: Geolocation via Google Translate

Description Usage Arguments Value Examples

View source: R/gl_geocode.R

Description

Slick function to geolocate via the Google Maps API

Usage

1
gl_geocode(str, region, key)

Arguments

str

vector of strings

region

bias results towards a region

key

API key

Value

A list of tibbles with list columns.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(tidyverse)

gl_geocode(c("Konstanz", "Mannheim", "Köln"), key=your_api_key, region='DE')

# tidyr 
tibble(str=c("Konstanz", "Mannheim", "Köln")) %>% 
	mutate(geo=gl_geocode(str,
	 region='DE', key=api_key)) %>% 
 unnest(col='geo')
 

sumtxt/gcloud documentation built on Jan. 3, 2021, 12:39 a.m.