Created
February 4, 2021 17:00
-
-
Save sergiospagnuolo/bb04821154646e78ccb097ea4fc3bb4a to your computer and use it in GitHub Desktop.
análise rápida sob blogs e pequenos veículos no Atlas da Notícia
This file contains hidden or 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) | |
library(newsatlasbr) | |
library(clipr) | |
atlas_signin(email = "[email protected]", password = "senhatokenaberto") | |
dados <- newsatlasbr::organizations_state(uf = "all") | |
desertos <- newsatlasbr::news_deserts() | |
desertos %>% filter(populacao < 10000) %>% count() | |
ativos <- dados %>% filter(ativo == 1) | |
# veículos por região | |
regioes <- ativos %>% | |
group_by(regiao) %>% | |
count() | |
# BLOGS por região | |
blogs <- ativos %>% | |
filter(eh_site_pago == 1 | num_funcionarios == '1 a 5 colaboradores' | num_funcionarios == 'Um colaborador (operação individual/blog)' | str_detect(nome_veiculo, "BLOG", negate = FALSE)) %>% | |
# group_by(regiao) %>% | |
count() | |
# combina as duas tabelas acima para comparar | |
write_clip(regioes %>% | |
inner_join(blogs, by = "regiao", suffix = c(" veiculos", " blogs") ) %>% | |
mutate(pct_blogs = round((`n blogs`/`n veiculos`)*100,1))) | |
s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment