get_drive_time_demographics: Get demographic data from ArcGIS

Description Usage Arguments Examples

View source: R/get_drive_time_demographics.R

Description

This function queries demographic and lifestyle information within a drive time polygon from the ArcGIS World GeoEnrichmentService. See the documentation here: https://developers.arcgis.com/rest/geoenrichment/api-reference/enrich.htm

Usage

1
2
3
4
5
6
7
8
get_drive_time_demographics(
  token,
  x,
  y,
  drive_time = 10,
  unit = "Minutes",
  demographics = c("KeyGlobalFacts", "KeyUSFacts")
)

Arguments

token

API access token for ArcGIS

x

Easting (longitude)

y

Northing (lattitude)

drive_time

Distance in driving time

unit

Drive time unit (Hours or Minutes)

demographics

What demographic information (see Description)

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
client_id <- "your client id"
client_secret <- "your client secret"

token <- generate_token(client_id, client_secret)

get_drive_time_demographics(token, -86.157963, 39.768454)

## End(Not run)

NateByers/arcgisapi documentation built on March 21, 2020, 4:49 a.m.