Doubt on retryonratelimit

Hi,
I am trying to put the followers of 45 accounts in a data fame using the following code:
followers <- map_df(account_name, ~ get_followers(.x, n = 50000, retryonratelimit = TRUE) %>% mutate(account = .x))
Can someone please tell me how long it takes for R to collect the results?
Thank you!

Hi, welcome,

This function is not part of base R, you must be using some package but we can't know for sure which one. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

Hi,
Thank you for your reply.

Here is the coding
nodes <- read.csv("ussenators_nodes.csv", header = TRUE, as.is = TRUE)
links <- read.csv("ussenators_edges.csv", header = TRUE, as.is = TRUE)
head(nodes)
head(links)
fulldata <- merge(nodes, links)
install.packages("igraph")
require(igraph)
library(rtweet)
library(tidyverse)
library(UpSetR)
install.packages("UpSetR")
nodes$Twitter_handle
account_name <- nodes$Twitter_handle
followers <- map_df(account_name, ~ get_followers(.x, n = 1000, retryonratelimit = TRUE) %>% mutate(account = .x))
head(followers)

nodes contains the twitter account names of the 45 US senators, Republican or Democrat and gender.

Thank you again

Well, you are asking for 50,000 folowers for each one of the 45 accounts, this would end up on 2,250,000 folowers and, accordingly to the documentation of rtweet, you only can get 75,000 every 15 minutes,so, if my calculations are correct, this would take like around 7.5 hours, although I can't be sure because I don't know what is the behaviour of the API when querying different accounts.

https://rtweet.info/reference/get_followers.html

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.