get_places: Label each cluster's place type using Google Places API

Description Usage Arguments Value Dataframe Requirements See Also Examples

View source: R/gps_placeTypes.R

Description

Use get_places() to return the closest place type identified by Google Places API.

Usage

1
get_places(df, key = NULL, radius = 50)

Arguments

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.

Value

A dataframe with clusters labelled with specific place types (defined by Google) and general categories (defined by package creator)

Dataframe Requirements

The dataframe needs to have the following named columns:

See Also

get_clusters to cluster GPS coordinates into places.

get_home to predict which cluster is an individual's home

Examples

 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)

places documentation built on April 8, 2021, 9:06 a.m.

Related to get_places in places...