count_all_tweets {academictwitteR} | R Documentation |
Count tweets from full archive search
Description
This function returns aggregate counts of tweets by query string or strings between specified date ranges.
Usage
count_all_tweets(
query = NULL,
start_tweets,
end_tweets,
bearer_token = get_bearer(),
n = 100,
file = NULL,
data_path = NULL,
export_query = TRUE,
bind_tweets = TRUE,
granularity = "day",
verbose = TRUE,
...
)
Arguments
query |
string or character vector, search query or queries |
start_tweets |
string, starting date |
end_tweets |
string, ending date |
bearer_token |
string, bearer token |
n |
integer, upper limit of tweet counts to be fetched (i.e., for 365 days n must be at least 365). Default is 100. |
file |
string, name of the resulting RDS file |
data_path |
string, if supplied, fetched data can be saved to the designated path as jsons |
export_query |
If |
bind_tweets |
If |
granularity |
string, the granularity for the search counts results. Options are "day"; "hour"; "minute". Default is day. |
verbose |
If |
... |
arguments will be passed to |
Value
a data.frame
Examples
## Not run:
count_all_tweets(query = "Hogmanay",
start_tweets = "2019-12-2700:00:00Z",
end_tweets = "2020-01-05T00:00:00Z",
bearer_token = get_bearer())
count_all_tweets(query = "Hogmanay",
start_tweets = "2019-12-27T00:00:00Z",
end_tweets = "2020-01-05T00:00:00Z",
bearer_token = get_bearer(),
granularity = "hour",
n = 500)
## End(Not run)