Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
🤖 R package for detecting Twitter bots via machine learning
| Date | Stars |
|---|---|
| 2026-08-03 | 389 |
| 2026-08-06 | 389 |
| 2026-08-12 | 389 |
| 2026-08-13 | 389 |
| 2026-08-18 | 389 |
| 2026-11-04 | 389 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# tweetbotornot <img width="160px" src="man/figures/logo.png" align="right" />
[](https://www.tidyverse.org/lifecycle/#experimental)
[](https://travis-ci.org/mkearney/tweetbotornot)
[](https://codecov.io/github/mkearney/tweetbotornot?branch=master)
An R package for classifying Twitter accounts as `bot or not`.
## Features
Uses machine learning to classify Twitter accounts as bots or not bots.
The **default model** is 93.53% accurate when classifying bots and
95.32% accurate when classifying non-bots. The **fast model** is 91.78%
accurate when classifying bots and 92.61% accurate when classifying
non-bots.
Overall, the **default model** is correct 93.8% of the time.
Overall, the **fast model** is correct 91.9% of the time.
## Install
Install from CRAN:
``` r
## install from CRAN
install.packages("tweetbotornot")
```
Install the development version from Github:
``` r
## install remotes if not already
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
## install tweetbotornot from github
devtools::install_github("mkearney/tweetbotornot")
```
## API authorization
Users must be authorized in order to interact with Twitter’s API. To
setup your machine to make authorized requests, you’ll either need to be
signed into Twitter and working in an interactive session of R–the
browser will open asking you to authorize the rtweet client
(rstats2twitter)–or you’ll need to create an app (and have a developer
account) and your own API token. The latter has the benefit of (a)
having sufficient permissions for write-acess and DM (direct messages)
read-access levels and (b) more stability if Twitter decides to shut
down \[@kearneymw\](<https://twitter.com/kearneymw>)’s access to Twitter
(I try to be very responsible these days, but Twitter isn’t always
friendly to academic use cases). To create an app and your own Twitter
token, [see these instructions provided in the rtweet
package](http://rtweet.info/articles/auth.html).
## Usage
There’s one function `tweetbotornot()` (technically there’s also
`botornot()`, but it does the same exact thing). Give it a vector of
screen names or user IDs and let it go to work.
``` r
## load package
library(tweetbotornot)
## select users
users <- c("realdonaldtrump", "netflix_bot",
"kearneymw", "dataandme", "hadleywickham",
"ma_salmon", "juliasilge", "tidyversetweets",
"American__Voter", "mothgenerator", "hrbrmstr")
## get botornot estimates
data <- tweetbotornot(users)
## arrange by prob ests
data[order(data$prob_bot), ]
#> # A tibble: 11 x 3
#> screen_name user_id prob_bot
#> <chr> <chr> <dbl>
#> 1 hadleywickham 69133574 0.00754
#> 2 realDonaldTrump 25073877 0.00995
#> 3 kearneymw 2973406683 0.0607
#> 4 ma_salmon 2865404679 0.150
#> 5 juliasilge 13074042 0.162
#> 6 dataandme 3230388598 0.227
#> 7 hrbrmstr 5685812 0.320
#> 8 netflix_bot 1203840834 0.978
#> 9 tidyversetweets 935569091678691328 0.997
#> 10 mothgenerator 3277928935 0.998
#> 11 American__Voter 829792389925597184 1.000
```
### Integration with rtweet
The `botornot()` function also accepts data returned by
[rtweet](http://rtweet.info) functions.
``` r
## get most recent 100 tweets from each user
tmls <- get_timelines(users, n = 100)
## pass the returned data to botornot()
data <- botornot(tmls)
## arrange by prob ests
data[order(data$prob_bot), ]
#> # A tibble: 11 x 3
#> screen_name user_id prob_bot
#> <chr> <chr> <dbl>
#> 1 hadleywickham 69133574 0.00754
#> 2 realDonaldTrump Excerpt of 6,249 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:e4de606eb731fb3b, llm:Repository description and README: 'R package for detecting Twitter bots via machine learning'; topics include 'machine-learning', 'twitter', 'twitter-bots', 'r-package', 'rtweet'.
matched fp:e4de606eb731fb3b, llm:Repository description and README: 'R package for detecting Twitter bots via machine learning'; topics include 'machine-learning', 'twitter', 'twitter-bots', 'r-package', 'rtweet'.