Skip to content

Instantly share code, notes, and snippets.

View loreabad6's full-sized avatar
💭

Lorena Abad Crespo loreabad6

💭
View GitHub Profile

Checklist

From Wickham, H. R Packages & Saskia O. blog

  • Run devtools::test() for unit-testing
  • Run devtools::document() for doumenting
  • Run devtools::check() for local check
  • Run devtools::check(manual = TRUE, remote = TRUE, incoming = TRUE) to include URL checks
  • Run devtools::spell_check() for typos
  • Run rhub::check_for_cran() for CRAN checks
@loreabad6
loreabad6 / resultados_cantones.R
Last active March 1, 2021 21:05
Mapa cantonal de los ganadores por provincia de las elecciones 2021 en Ecuador
library(sf)
library(tidyverse)
library(stringi)
# Leer resultados recopilados por Gabo Gaona de https://actascne.andresarauz.ec/
res_url = "https://gitlab.com/gavg712/elecciones-ecuador-2021/-/raw/master/data/csv/cne_ec_2021_presidencia.zip"
res_file = "data/cne_ec_2021_presidencia.zip"
download.file(res_url, destfile = res_file)
unzip(res_file)
@loreabad6
loreabad6 / conteo_top4.R
Last active September 11, 2021 13:41
Transition animation of changes in votes for top 4 candidates to the Ecuadorian presidency
library(rtweet)
library(tidyverse)
library(lubridate)
library(gganimate)
# Extraer tweets de Carlos Oporto
resultados = search_tweets(
q = "Resultados AND Oficiales AND CNE AND carlosoporto",
include_rts = F
)
@loreabad6
loreabad6 / conteo_votos.R
Last active February 12, 2021 17:01
Diferencia entre @yakuperezg y @LassoGuillermo, tweets de @angiegomeza de los resultados del CNE.
library(rtweet)
library(tidyverse)
library(lubridate)
library(gganimate)
# Extraer tweets de Andrea Gomez
reconteo = search_tweets(
q = "angiegomeza AND Actualización AND Diferencia",
include_rts = F
)