library(tidyverse)
library(here)
source(here::here("crawler/parlamentares/redes-sociais/twitter/analyzer_twitter.R"))
if(!require(optparse)){
install.packages("optparse")
suppressWarnings(suppressMessages(library(optparse)))
}
args = commandArgs(trailingOnly=TRUE)
message("LEIA O README deste diretório")
option_list = list(
make_option(c("-o", "--out"), type="character", default=here::here("crawler/raw_data/parlamentares_tweets.csv"),
help="nome do arquivo de saída [default= %default]", metavar="character")
)
opt_parser = OptionParser(option_list=option_list)
opt = parse_args(opt_parser)
saida <- opt$out
message("Iniciando processamento...")
message("Recuperando tweets...")
tweets <- process_tweets_deputados()
message(paste0("Salvando o resultado em ", saida))
readr::write_csv(tweets, saida)
message("Concluído!")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.