Skip to content

Instantly share code, notes, and snippets.

View farach's full-sized avatar
🏠
Working from home

Alex Farach farach

🏠
Working from home
View GitHub Profile
@farach
farach / glassdoor_scrape_and_spacy.Rmd
Last active October 17, 2021 21:12
Web scraping glassdoor review, using spacy for NLP, plotting evolution of reviews
---
title: "Using SpacyR on scraped glassdoor reviews"
author: "Alex Farach"
date: "10/17/2021"
output: html_document
---
```{r setup, include=FALSE}
library(knitr)
knitr::opts_chunk$set(
@farach
farach / bruce_springsteen_music.R
Created September 13, 2021 00:19
Bruce Springsteen music analysis plot
library(spotifyr)
library(tidyverse)
library(lubridate)
library(glue)
library(geniusr)
library(rvest)
library(tidytext)
# Create a ggplot2 theme
theme_alex <- function() {
library(tidyverse)
library(tidytext)
library(vader)
library(glue)
theme_alex <- function() {
font <- "Arial"
theme_minimal()
theme(
strip.text = element_text(
@farach
farach / georgemsavva_20210626_ggplot.R
Created August 12, 2021 20:12
This is a tidyverse (ggplot) version of a George Savva plot
# ggplot version of https://mobile.twitter.com/georgemsavva/status/1419784944352702465
library(tidyverse)
gifski::save_gif(
lapply(seq(0, 1, l = 600), function(a) {
print(
data.frame(
b = 1 - a,
t = 3 * pi * (1:400) / 100
) %>%
library(tidyverse)
accenture <- data.frame(
accenture_x1 = c(10, 370, 270, 10),
accenture_y1 = c(10, 140, 180, 95),
accenture_x2 = c(10, 370, 370, 10),
accenture_y2 = c(370, 220, 140, 285)
)
data.frame(
library(palmerpenguins)
library(tidyverse)
library(magick)
library(grid)
library(BrailleR)
logo_pp <- image_read("../pp_logo.png")
g <- guide_legend("Species:", override.aes = list(size = 3, alpha = 1))
cbbPalette <- c("#E69F00", "#0072B2", "#CC79A7")
library(palmerpenguins)
library(tidyverse)
library(magick)
library(grid)
library(gghalves)
logo_pp <- image_read("../pp_logo.png")
logo_gg <- image_read("../gghalves.png")
p <-
@farach
farach / ggtext_example.R
Created May 18, 2021 20:51
Example of the ggtext package
library(palmerpenguins)
library(tidyverse)
library(magick)
library(grid)
library(ggtext)
logo_pp <- image_read("../pp_logo.png")
logo_gg <- image_read("../ggtext.png")
p <-
@farach
farach / ggtext_example.R
Created May 18, 2021 14:27
An example on how to use the ggtext package
library(palmerpenguins)
library(tidyverse)
library(ggtext)
library(magick)
library(grid)
logo_pp <- image_read("../pp_logo.png")
logo_gg <- image_read("../ggtext.png")
#imgurl <- system.file("../ggtext.png", package="hexSticker")
# sticker(logo_gg, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=.6,
library(palmerpenguins)
library(tidyverse)
library(ggside)
library(magick)
library(grid)
logo_pp <- image_read("../pp_logo.png")
logo_ggside <- image_read("../ggside_logo.png")
p <- penguins %>%