knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  warning = FALSE,
  message = FALSE
)
library(dplyr)

marini

Lifecycle: experimental

Installation

remotes::install_github("tomasbarcellos/marini)

Example

Para conhecer os textos com o termo "subimperislimo" no título podemos usar:

library(marini)
library(dplyr)
"subimperialismo" %>% 
  busca_marini() %>% 
  nuvem()

Por exemplo as fontes mais comuns são:

library(stringr)
textos_marini %>% 
  mutate(fonte = str_remove(fonte, "[,\\.].+")) %>% 
  count(fonte, sort = TRUE)

A evolução da produção anual de Marini:

library(ggplot2)
textos_marini %>% 
  count(ano, sort = TRUE) %>% 
  ggplot(aes(ano, n)) + 
  geom_col(fill = "darkred") + 
  theme_minimal() + 
  theme(panel.grid.minor = element_blank(),
        panel.grid.major.y = element_line(linetype = 2, color = "gray50"),
        panel.grid.major.x = element_line(linetype = 4)) +
  scale_x_continuous(breaks = seq(1965, 1996, 5))

Se quisermos conhecer o conteúdo dos artigos do Sol do México:

textos_marini %>% 
  mutate(fonte = str_remove(fonte, "[,\\.].+")) %>% 
  filter(fonte == "El Sol de México") %>% 
  nuvem()

O exemplo abaixo apresenta os textos que contém o termo rascismo e uma núvem de palavras de seus conteúdos.

racismo <- textos_marini %>% 
  filter(str_detect(texto, "racismo")) 

racismo
nuvem(racismo)


tomasbarcellos/marini documentation built on June 17, 2020, 7 a.m.