Skip to content

Instantly share code, notes, and snippets.

View juliasilge's full-sized avatar
🐛

Julia Silge juliasilge

🐛
View GitHub Profile
@juliasilge
juliasilge / bob-ross.md
Created February 22, 2023 00:13
#TidyTuesday Bob Ross paintings
library(tidyverse)
library(corrr)

bob_ross <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2023/2023-02-21/bob_ross.csv')
#> Rows: 403 Columns: 27
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr  (5): img_src, painting_title, youtube_src, colors, color_hex
#> dbl  (4): painting_index, season, episode, num_colors
@juliasilge
juliasilge / radio.md
Created November 9, 2022 01:35
#TidyTuesday radio stations
library(tidyverse)
theme_set(silgelib::theme_plex())
radio_stations <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-11-08/state_stations.csv')
#> Rows: 17186 Columns: 6
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (6): call_sign, frequency, city, licensee, format, state
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
@juliasilge
juliasilge / horror.md
Created November 3, 2022 20:41
#TidyTuesday horror movie 😱 descriptions
library(tidyverse)
library(tidytext)
library(ggraph)
library(igraph)
#> 
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:dplyr':
#> 
#>     as_data_frame, groups, union
@juliasilge
juliasilge / make_dockerfile.md
Created September 21, 2022 20:59
Create a vetiver Dockerfile that mounts the pin inside

First in R:

library(tidymodels)
data(Sacramento, package = "modeldata")

rf_spec <- rand_forest(mode = "regression")
rf_form <- price ~ type + sqft + beds + baths

rf_fit <-
@juliasilge
juliasilge / stm-frex.md
Created August 9, 2022 19:05
Top FREX words from stm in tidy format
library(tidyverse)
library(tidytext)
library(stm)
#> stm v1.3.6 successfully loaded. See ?stm for help. 
#>  Papers, resources, and other materials at structuraltopicmodel.com

austen_sparse <- janeaustenr::austen_books() %>%
  unnest_tokens(word, text) %>%
  anti_join(stop_words) %>%
@juliasilge
juliasilge / eurovision.md
Last active June 17, 2022 10:10
Eurovision voting from #TidyTuesday
library(tidyverse)
library(widyr)
library(maps)
#> 
#> Attaching package: 'maps'
#> The following object is masked from 'package:purrr':
#> 
#>     map
eurovision_votes <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-05-17/eurovision-votes.csv')
@juliasilge
juliasilge / baby_name_props.md
Last active March 23, 2022 23:34
Area chart for #TidyTuesday baby name proportions
library(tidyverse)
library(silgelib)
theme_set(theme_plex())

babynames <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-03-22/babynames.csv')
#> Rows: 1924665 Columns: 5
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (2): sex, name
@juliasilge
juliasilge / student_mobility.md
Created March 10, 2022 00:09
Network graph for #TidyTuesday ERASMUS student mobility
library(tidyverse)
library(igraph)
#> 
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:dplyr':
#> 
#>     as_data_frame, groups, union
#> The following objects are masked from 'package:purrr':
#> 
@juliasilge
juliasilge / installation.md
Last active April 22, 2024 21:04
Installing R + Tensorflow on M1
@juliasilge
juliasilge / nyc_xgboost.R
Created October 1, 2021 00:38
NYC Airbnb prices with xgboost and racing for R-Ladies Miami
library(tidyverse)
library(tidymodels)
library(textrecipes)
library(finetune)
library(vip)
## data from here: https://www.kaggle.com/c/sliced-s01e05-WXx7h8/data
train_raw <- read_csv("train.csv")