voson.tcn 0.5.0
Major Changes
- Previously each tweet provided to tcn_threadswas
retrieved individually as the initializing tweet, theconversation_idextracted and then used as a search filter
to collect a single conversation thread. This was a very inefficient
process for large numbers of threads as it used one API request per
thread, soon reaching thefull-archivesearch endpoint 300
request per 15 minute rate-limit (and imposing a ceiling of maximum 300
threads per 15 minutes).
- Tweets provided to tcn_threadsare now collected at the
start of an operation in batch and uniqueconversation_idextracted from the tweets to do batch thread collection. Anacademicorfull-archiveenabled project has a
search query character limit of 1024 characters, and projects limited to
therecentsearch endpoint a 512 character limit. A search
query for multipleconversation_idcan be created in the
following format:conversation_id:xxxxxxxxxxxxxxxxxxx OR conversation_id:xxxxxxxxxxxxxxxxxxx OR ...within the character limit.
- The tcn_threadsfunction now searches for as manyconversation_idper request that will fit into the search
query character limit, significantly improving the thread collection
time. This is approximately 26 ID’s perfull-archiveand 13
perrecentsearch request. So for example, a maximum of 26
threads can be collected in a single request assuming the sum of tweets
from all threads is less thanmax_results. This translates
to 7,800 threads per 15 minutes (300 * 26) for thefull-archiveendpoint if each request of 26 threads has
less than 500 tweets.
Minor Changes
- Set the default max_resultsto again be500tweets forfull-archivesearches. This was
previously set to100tweets, the same as themax_resultsfor arecentendpoint search
because of an issue requesting thecontext_annotationstweet data field (Twitter impose a 100 tweet max for requests that
include this field). Thecontext_annotationsis no longer
collected by default but can be included by using theannotations = TRUEparameter.
- Added progress bars and option for verbose output.
Bug Fixes
- Fixed a bug in the function that builds search
conversation_idqueries.
voson.tcn 0.4.1
Major Changes
- Package now requires R version 4.1or greater.
Minor Changes
- Changed tcn_tweetsto be able to accept any number of
tweet ids or urls. Previously was set to a maximum of 100.
- Added referenced_tweetsparameter totcn_tweetsfunction so as to now have the option to specify
if referenced tweets should also be retrieved. The default value isFALSE.
- Added retry on rate limit retry_on_limitparameter totcn_tweetsandtcn_countsfunctions.
- Changed warningmessages to use themessagefunction instead.
- Removed magrittrimport and replaced pipes with native
R version.
- tcn_countswill now also accept tweet urls.
- Changed extraction of tweet ids from urls to use a more robust
regex.
Bug Fixes
- Added a 1 second delay to initial full-archive search requests as 15
min API rate-limit timeout was being triggered when multiple low number
results returned too quickly.
voson.tcn 0.3.3
Bug Fixes
- Fixed an error produced by arranging users by tweet count in
tcn_threads.
voson.tcn 0.3.2
Minor Changes
- Updated standard package documentation, added citation and
README.Rmd.
voson.tcn 0.3.1
Major Changes
- Added the tcn_countsfunction for retrieving tweet
counts over time for conversation ids. This uses the API v2tweets/countsendpoint and does not contribute to the
monthly tweet cap. It could be used prior to collecting conversation
threads to identify conversations to target or conversations to add to a
skip list.
Minor Changes
- Full-archive endpoint searches with the optional API v2
max_resultsquerystring parameter have started to return
response status code 400 for values over 100.
- The max_resultsparameter for functiontcn_threadshas been changed from the maximum total
results, and now refers to and allows the API parameter of the same name
above to be set. The default value has been set to 100. If left at
default academic projects using the full-archive search endpoint will
only collect 30,000 tweets per 15 minute rate-limit.
- Previous max_resultsparameter for the functiontcn_threadshas been renamed tomax_total.
- Added retry_on_limitparameter totcn_threadsto allow waiting for API rate-limit to reset
before continuing, rather than exiting upon reaching the limit.
- Updated standard package documentation.
voson.tcn 0.2.4
Major Changes
- Added tcn_tweetsfunction. This function accepts tweet
URL’s or ID’s and collects specific tweet data using the API v2tweetsendpoint. Currently supports only bearer access
tokens.
Minor Changes
- Changed httrrequest user-agent string via header field
rather than options.
- Added converstion_idas node and edge attribute to
networks.
- Thread collection now returns a list of four dataframes,
tweets,users,errorsandmeta. Theerrorsdataframe contains partial
errors such as those caused when trying to retrieve tweets that are not
publicly available. Themetadataframe contains search
results metadata such as tweet id range, number of results and
pagination token.
- Added unnesting of public_metricsduring the JSON to
dataframe process.
- Added unnesting of referenced tweets to network creation.
- Outputs a warning if rate-limit reached.
- Renamed end-pointparameter toendpointto
be consistent with twitter documentation.
- Added max_resultsparameter to coarsely limit how many
tweets are collected in atcn_threadsoperation. This is to
assist with managing the monthly tweet cap placed on projects using the
API search endpoints.
- Expanded tweet and user fields collected.
Bug Fixes
- Fixed an issue with partial errors preventing
get_tweetsfrom returning requested tweets.
voson.tcn 0.1.10
Bug Fixes
- Fixed object 'df_convo' not foundmessage when endpoint
related error occurs.
Minor Changes
- Added start_timeandend_timeparameters
for academic track historical search endpoint
(end_point = "all"). These are UTC datetime strings in ISO
8601 format. If unused the API uses a default UTC start time of 30 days
ago and a default end time of the current time minus 30 seconds.
voson.tcn 0.1.8
Bug Fixes
- Removed extraneous self-loop from conversation starter node in
activity networks.
- Added a warning for threads that return no tweets and fixed
anti_joinontweet_iderror.
Minor Changes
- Added public metrics, referenced tweet objects and user profile
fields to tweet expansion and object fields collected.
- The tcn_threadsfunction now produces a named list of
dataframes:tweetsandusersfor tweet data
and user metadata.
- Added bearerparameter to thetcn_tokenfunction to assign a bearer token directly rather than retrieving it
with app keys.
voson.tcn 0.1.3
Initial Version
- Retrieve a Twitter bearer token using app consumer keys with the
tcn_tokenfunction.
- Option to collect on multiple conversations by passing multiple
tweet URLs or IDs in a list to tcn_threadsusing thetweet_idsparameter.
- Option to use historical rather than a recent search API endpoint by
using tcn_threadswith theend_point = "all"parameter.
- Generate either an actororactivitynetwork using thetcn_networkfunction with thetype = "activity"parameter.
- Created a package, package documentation and pkgdown site.