Skip to content

Commit

Permalink
Updated major version
Browse files Browse the repository at this point in the history
  • Loading branch information
bryn-g committed Aug 30, 2022
1 parent 2e685aa commit fc5cd2d
Show file tree
Hide file tree
Showing 20 changed files with 64 additions and 36 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: voson.tcn
Title: Twitter Conversation Networks and Analysis
Version: 0.4.4
Version: 0.5.0
Description: Collects tweets and metadata for threaded conversations and
generates networks.
Type: Package
Expand Down
6 changes: 4 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# voson.tcn 0.4.4
# voson.tcn 0.5.0

## Minor Changes
## Major Changes
- Previously each tweet provided to `tcn_threads` was retrieved individually as the initializing tweet, the `conversation_id` extracted 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 the `full-archive` search endpoint 300 request per 15 minute rate-limit (and imposing a ceiling of maximum 300 threads per 15 minutes).
- Tweets provided to `tcn_threads` are now collected at the start of an operation in batch and unique `conversation_id` extracted from the tweets to do batch thread collection. An `academic` or `full-archive` enabled project has a search query character limit of 1024 characters, and projects limited to the `recent` search endpoint a 512 character limit. A search query for multiple `conversation_id` can be created in the following format: `conversation_id:xxxxxxxxxxxxxxxxxxx OR conversation_id:xxxxxxxxxxxxxxxxxxx OR ...` within the character limit.
- The `tcn_threads` function now searches for as many `conversation_id` per request that will fit into the search query character limit, significantly improving the thread collection time. This is approximately 26 ID's per `full-archive` and 13 per `recent` search 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 than `max_results`. This translates to 7,800 threads per 15 minutes (300 * 26) for the `full-archive` endpoint if each request of 26 threads has less than 500 tweets.

## Minor Changes
- Set the default `max_results` to again be `500` tweets for `full-archive` searches. This was previously set to `100` tweets, the same as the `max_results` for a `recent` endpoint search because of an issue requesting the `context_annotations` tweet data field (Twitter impose a 100 tweet max for requests that include this field). The `context_annotations` is no longer collected by default but can be included by using the `annotations = TRUE` parameter.
- Added progress bars and option for verbose output.

Expand Down
4 changes: 3 additions & 1 deletion R/tcn_threads.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ tcn_threads <-

chunks <- build_chunks(cids, endpoint = endpoint)

msg(paste0("voson.tcn conversation threads: n=", length(cids), ", min-api-requests=", length(chunks), ", endpoint=", endpoint))
msg(paste0("voson.tcn conversation threads: n=", length(cids),
", min-api-requests=", length(chunks),
", endpoint=", endpoint))

if (verbose) {
pb <- prog_bar(length(chunks), "")
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ ggraph(g, layout = layout.auto(g)) +

Plots of an activity network and corresponding actor reply network graph generated from a small Twitter conversation thread.

<img src="https://vosonlab.github.io/voson.tcn/images/network_graphs_plot.png" alt="activity and actor network graphs"/>
<img src="https://vosonlab.github.io/voson.tcn/images/network_graphs_plot.png" alt="activity and actor network graphs" width="90%"/>

## Code of Conduct

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![CRAN_Monthly](https://cranlogs.r-pkg.org/badges/voson.tcn)](https://CRAN.R-project.org/package=voson.tcn)
[![CRAN_Total](https://cranlogs.r-pkg.org/badges/grand-total/voson.tcn)](https://CRAN.R-project.org/package=voson.tcn)
[![Github_Release](https://img.shields.io/github/release-pre/vosonlab/voson.tcn.svg?logo=github)](https://github.com/vosonlab/voson.tcn/releases)
[![Github_Dev](https://img.shields.io/static/v1?label=dev&message=v0.4.3&logo=github)](https://github.com/vosonlab/voson.tcn)
[![Github_Dev](https://img.shields.io/static/v1?label=dev&message=v0.5.0&logo=github)](https://github.com/vosonlab/voson.tcn)
[![Last_Commit](https://img.shields.io/github/last-commit/vosonlab/voson.tcn.svg?&logo=github)](https://github.com/vosonlab/voson.tcn/commits/main)
[![Build_Status](https://github.com/vosonlab/voson.tcn/workflows/R-CMD-check/badge.svg)](https://github.com/vosonlab/voson.tcn/actions)

Expand All @@ -32,7 +32,7 @@ Install the most recent release tag via GitHub:

``` r
install.packages(
"https://github.com/vosonlab/voson.tcn/releases/download/v0.4.1/voson.tcn-0.4.1.tar.gz",
"https://github.com/vosonlab/voson.tcn/releases/download/v0.5.0/voson.tcn-0.5.0.tar.gz",
repo = NULL, type = "source")
```

Expand Down Expand Up @@ -388,7 +388,7 @@ ggraph(g, layout = layout.auto(g)) +
Plots of an activity network and corresponding actor reply network graph
generated from a small Twitter conversation thread.

<img src="https://vosonlab.github.io/voson.tcn/images/network_graphs_plot.png" alt="activity and actor network graphs"/>
<img src="https://vosonlab.github.io/voson.tcn/images/network_graphs_plot.png" alt="activity and actor network graphs" width="90%"/>

## Code of Conduct

Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* local MacOS X, R 4.2.0
* local Windows 10, R 4.2.1
* Winbuilder (R-release, R-oldrelease)
* R-Devel r82676 Windows (Winbuilder)
* R-Devel r82766 Windows (Winbuilder)

## R CMD check results
0 errors | 0 warnings | 0 notes
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pandoc: '2.18'
pkgdown: 2.0.6
pkgdown_sha: ~
articles: {}
last_built: 2022-08-20T05:49Z
last_built: 2022-08-30T13:19Z
urls:
reference: https://vosonlab.github.io/voson.tcn/reference
article: https://vosonlab.github.io/voson.tcn/articles
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions docs/reference/tcn_counts.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/tcn_network.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions docs/reference/tcn_threads.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fc5cd2d

Please sign in to comment.