load_tweets_json {CooRTweet}R Documentation

load_tweets_json

Description

Very efficient and fast way to load tweets stored in JSON files. Wrapper of the function fload

Usage

load_tweets_json(data_dir, query = NULL, query_error_ok = TRUE)

Arguments

data_dir

string that leads to the directory containing JSON files

query

(string) JSON Pointer query passed on to fload (optional). Default: NULL

query_error_ok

(Boolean) stop if query causes an error. Passed on to fload (optional). Default: FALSE

Details

This function is optimized to load tweets that were collected using the academicTwittr Package (Twitter API V2). It uses RcppSimdJson to load the JSON files, which is extremely fast and efficient. It returns the twitter data as is. The only changes are that the function renames the id of tweets to tweet_id, and it also deduplicates the data (by tweet_id). The function expects that the individual JSON files start with data.

Value

a data.table with all tweets loaded


[Package CooRTweet version 2.0.2 Index]