File: lat_lng.Rd

package info (click to toggle)
r-cran-rtweet 2.0.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,068 kB
  • sloc: sh: 13; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,718 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lat_lng.R
\name{lat_lng}
\alias{lat_lng}
\title{Adds single-point latitude and longitude variables to tweets data.}
\usage{
lat_lng(
  x,
  coords = c("coords_coords", "bbox_coords", "geo_coords"),
  prefs = "bbox_coords"
)
}
\arguments{
\item{x}{Parsed Twitter data as returned by various rtweet
functions. This should be a data frame with variables such as
"bbox_coords", "coords_coords", and "geo_coords" (among
other non-geolocation Twitter variables).}

\item{coords}{Names of variables containing latitude and longitude
coordinates.  Priority is given to bounding box coordinates (each
obs consists of eight entries) followed by the supplied order of
variable names. Defaults to "bbox_coords",
"coords_coords", and "geo_coords") (which are the default column
names of data returned by most status-oriented rtweet functions).}

\item{prefs}{Preference of coordinates to use as default, must be in \code{coords}.}
}
\value{
Returns updated data object with full information latitude
and longitude vars.
}
\description{
Appends parsed Twitter data with latitude and longitude variables
using all available geolocation information.
}
\details{
On occasion values may appear to be outliers given a
previously used query filter (e.g., when searching for tweets
sent from the continental US).  This is typically because those
tweets returned a large bounding box that overlapped with the
area of interest. This function converts boxes into their
geographical midpoints, which works well in the vast majority of
cases, but sometimes includes an otherwise puzzling result.
}
\seealso{
Other geo: 
\code{\link{lookup_coords}()}
}
\concept{geo}