full_archive_search_locations: This function allows you to collect tweets with the academic...

View source: R/search_full_archive_locations.R

full_archive_search_locationsR Documentation

This function allows you to collect tweets with the academic track with a query using the rules put in place by twitter (see: https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators)

Description

This function allows you to collect tweets with the academic track with a query using the rules put in place by twitter (see: https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators)

Usage

full_archive_search_locations(
  token = NA,
  search_query = NA,
  latitude = NA,
  longitude = NA,
  radius = NA,
  bounding_box = NA,
  since_id = NA,
  until_id = NA,
  start_time = NA,
  end_time = NA,
  api_wait = 12,
  country = NA,
  n = NA,
  JSON = FALSE,
  storage_path = "archive_searched_tweets.json",
  n_try = 10
)

Arguments

token

string of the bearer token from your personal twitter API access

search_query

string representing the query to search tweets with

latitude

latitude coordinate of point radius

longitude

longitude coordinate of point radius

radius

seize of search radius in kilometers (max: 40 km)

bounding_box

vector with the elements west_long, south_lat, east_long, north_lat in this order with a max height and width of 40 km

since_id

character containing the lower bound status id to start looking for tweets (default is NA)

until_id

character containing the upper bound status id to start looking for tweets (default is NA)

start_time

character containing the start time for the search (defaults to NA; style is "yyyy-mm-ddThh:mm:ssZ")

end_time

character containing the end time for the search (defaults to NA; style is "yyyy-mm-ddThh:mm:ssZ")

api_wait

integer specifying how long the function should wait for the API to answer (defaults to 12 seconds)

country

single ISO alpha-2 character code of one country

n

integer specifying the maximum number of tweets the function should return (defaults to NA)

JSON

boolean which defaults to FALSE

storage_path

character string specifying the path and file name to write the json file to

n_try

integer specifying number of retries in case of 503 error

Value

a data frame

Examples

## Not run: 
users <- full_archive_search_locations(token = Bearer_Token, n = 1000,
                                       n_try = 10, JSON = FALSE, api_wait = 15,
                                       bounding_box = c(8.500000, 47.36600, 8.590000, 47.36700)

## End(Not run)

MaelKubli/RTwitterV2 documentation built on May 26, 2023, 5:29 p.m.