I hereby claim:
- I am kiernann on github.
- I am kiernxn (https://keybase.io/kiernxn) on keybase.
- I have a public key ASAhsMx6AGPlWh7FmSynjb9T_NKv5-yxuk6gI0pjad8vHwo
To claim this, I am signing this object:
| library(patchwork) | |
| library(tidyverse) | |
| library(lubridate) | |
| library(jsonlite) | |
| library(predictr) | |
| library(scales) | |
| library(rvest) | |
| # get vap estimate -------------------------------------------------------- |
| library(tidyverse) | |
| library(rvest) | |
| # scrape state votes from wikipedia table | |
| prez_wiki <- read_html("https://w.wiki/Zqi") | |
| vote_table <- prez_wiki %>% | |
| html_node(xpath = '//*[@id="mw-content-text"]/div[1]/div[40]/table') %>% | |
| html_table(fill = TRUE) %>% | |
| as_tibble(.name_repair = "unique") |
| # kiernan Nicholls @kiernxn | |
| # Tue Jun 16 10:17:55 2020 ------------------------------ | |
| # remotes::install_github("kiernann/predictr") | |
| library(predictr) | |
| library(tidyverse) | |
| x <- market_price(6653, FALSE) | |
| x$contract <- x$contract %>% | |
| str_replace("Dems by", "D") %>% | |
| str_replace("GOP by", "R") %>% |
| z <- read_html("https://en.wikipedia.org/wiki/List_of_zombie_films") %>% | |
| html_node(".wikitable") %>% | |
| html_table() %>% | |
| as_tibble() %>% | |
| na_if("") %>% | |
| clean_names("snake") %>% | |
| count(year) %>% | |
| ggplot(aes(year, n)) + | |
| geom_col() + | |
| scale_x_continuous(breaks = seq(1930, 2020, by = 5)) + |
| # terminal padding | |
| # see: https://git.io/JfmQU | |
| sudo gedit ~/.config/gtk-3.0/gtk.css | |
| # install R 4.0 | |
| sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' | |
| sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 | |
| sudo apt update | |
| sudo apt install r-base r-base-core r-recommended r-base-dev |
| VteTerminal, | |
| TerminalScreen, | |
| vte-terminal { | |
| padding: 10px 10px 10px 10px; | |
| -VteTerminal-inner-border: 10px 10px 10px 10px; | |
| } |
| library(tidyverse) | |
| # read all top level domains | |
| tlds <- str_to_lower(read_lines( | |
| file = "http://data.iana.org/TLD/tlds-alpha-by-domain.txt", | |
| skip = 1 | |
| )) | |
| # obtain 10000 most common eng words | |
| words <- read_lines("https://raw.githubusercontent.com/first20hours/google-10000-english/master/google-10000-english-usa.txt") |
| library(tidyverse) | |
| rank <- c(2:9, "T", "J", "Q", "K", "A") | |
| rank <- factor(rank, rank, ordered = TRUE) | |
| suit <- factor(c("s", "h", "d", "c")) | |
| deck <- expand.grid(rank = rank, suit = suit) | |
| shuffle <- function(d) { | |
| sample_frac(x) | |
| } |
| library(tidyverse) | |
| library(glue) | |
| library(httr) | |
| library(jsonlite) | |
| library(magrittr) | |
| library(patchwork) | |
| gop_data <- content(GET("https://www.predictit.org/api/marketdata/markets/6304")) | |
| gop_contracts <- gop_data %>% | |
| use_series(contracts) %>% | |
| map_df(as_tibble) %>% |
I hereby claim:
To claim this, I am signing this object: