Description Usage Arguments Value Dataframe Requirements See Also Examples
View source: R/gps_placeTypes.R
Use get_places() to return the closest place type identified by Google Places API.
1 | get_places(df, key = NULL, radius = 50)
|
df |
A dataframe of GPS coordinates as described below |
key |
A character vector with a Google API key. The default is NULL and must be set by the user. |
radius |
The maximum radius the Google API should search within for nearby locations. The default is 50m. |
A dataframe with clusters labelled with specific place types (defined by Google) and general categories (defined by package creator)
The dataframe needs to have the following named columns:
lat.centroid.final = latitude coordinates
lon.centroid.final = longitude coordinates
get_clusters
to cluster GPS coordinates into places.
get_home
to predict which cluster is an individual's home
1 2 3 4 5 6 7 8 9 10 | ## Assume you have run get_clusters() and get_home() on the dataset "places_gps"
## Not run:
## Please add your API key from Google - please be aware that this service may cost money.
key <- SET_KEY
labelled <- get_places(home[[2]], key)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.