-
-
Save sergiospagnuolo/48fc766edf9aa03f31c0c2a392964db7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
d <- read_csv("top_posts_instagram_12meses_abril2021.csv") | |
top_posts <- d %>% | |
arrange(desc(`Total Interactions`)) %>% | |
head(1000) | |
top_profiles <- d %>% | |
group_by(`User Name`) %>% | |
mutate(n_posts = n(), interacoes = sum(`Total Interactions`), comentarios = sum(Comments), likes = sum(Likes), media_overperforming = round(mean(`Overperforming Score`),2)) %>% | |
select(`User Name`, Account, n_posts, interacoes, comentarios, likes, media_overperforming) %>% | |
distinct(`User Name`, .keep_all = T) %>% | |
mutate(tx_engajamento = round(sum(interacoes / n_posts), 2)) %>% | |
arrange(desc(tx_engajamento)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment