Learn R Programming

Twitmo (version 0.1.2)

load_tweets: Converts Twitter stream data (JSON file) into parsed data frame

Description

Parse JSON files of collected Tweets

Usage

load_tweets(file_name)

Arguments

file_name

Character string. Name of JSON file with data collected by stream_tweets or get_tweets().

Value

A data frame of tweets data with additional meta data

Details

This function replaces parse_stream which has been deprecated in rtweet 0.7 but is included here to ensure backwards compatibility for data streamed with older versions of rtweet. Alternatively stream_in in conjunction with tweets_with_users and lat_lng can be used if data has been collected with rtweet 0.7 or newer.

See Also

parse_stream, stream_in, tweets_with_users

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
library(Twitmo)

# load tweets (included in package)
raw_path <- system.file("extdata", "tweets_20191027-141233.json", package = "Twitmo")
mytweets <- load_tweets(raw_path)
# }

Run the code above in your browser using DataLab