lookup_coords: Get coordinates of specified location.

Description Usage Arguments Value See Also Examples

Description

Convenience function for looking up latitude/longitude coordinate information for a given location. Returns data as a special "coords" object, which is specifically designed to interact smoothly with other relevant package functions.

Usage

1
lookup_coords(address, components = NULL, ...)

Arguments

address

Desired location typically in the form of place name, subregion, e.g., address = "lawrence, KS". Also accepts the name of countries, e.g., address = "usa", address = "brazil" or states, e.g., address = "missouri" or cities, e.g., address = "chicago". In most cases using only address should be sufficient.

components

Unit of analysis for address e.g., components = "country:US". Potential components include postal_code, country, administrative_area, locality, route.

...

Additional arguments passed as parameters in the HTTP request

Value

Object of class coords.

See Also

Other geo: lat_lng

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

## get coordinates associated with the following addresses/components
sf <- lookup_coords("san francisco, CA", "country:US")
usa <- lookup_coords("usa")
lnd <- lookup_coords("london")
bz <- lookup_coords("brazil")

## pass a returned coords object to search_tweets
bztw <- search_tweets(geocode = bz)

## or stream tweets
ustw <- stream_tweets(usa, timeout = 10)


## End(Not run)

ashoksiri/rtweet documentation built on May 8, 2019, 5:55 p.m.