This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(httr2) | |
| library(tibble) | |
| library(jsonlite) | |
| # config ------------------------------------------------------------------ | |
| league_id <- 252353 | |
| season_id <- 2024 | |
| team_id <- 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(fflr) | |
| # Connect to the league | |
| ffl_id(252353) | |
| # Fetch league standings and live scoring data | |
| s <- league_standings() %>% | |
| select(abbrev, wins, pointsFor) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(janitor) | |
| library(httr) | |
| library(k5) | |
| # mens owgr --------------------------------------------------------------- | |
| a <- GET( | |
| url = "https://apiweb.owgr.com/api/owgr/rankings/getRankings", | |
| query = list( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(janitor) | |
| library(scales) | |
| library(rvest) | |
| x <- read_html("https://en.wikipedia.org/wiki/List_of_countries_by_level_of_military_equipment") | |
| clean_wiki <- function(x) { | |
| x %>% | |
| str_remove_all("\\[(.*)\\]") %>% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(jsonlite) | |
| library(scales) | |
| library(fs) | |
| library(k5) | |
| # functions --------------------------------------------------------------- | |
| most_common <- function (x, n = 6) { | |
| as.vector(na.omit(names(sort(table(x), decreasing = TRUE)[1:n]))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(tabulizer) | |
| library(janitor) | |
| library(scales) | |
| library(fs) | |
| ipsos_pdf <- file_temp(ext = "pdf") | |
| download.file( | |
| "https://www.ipsos.com/sites/default/files/ct/news/documents/2021-09/Understanding%20Society%20Wave%2018%20Topline_083121.pdf", | |
| destfile = ipsos_pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(lubridate) | |
| x <- seq(from = mdy("January 23, 1845"), to = today(), by = "1 day") | |
| x[year(x) %% 4 == 0 & month(x) == 11 & day(x) <= 7 & wday(x) == 2] + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Disables webcam audio. | |
| SUBSYSTEM=="usb", DRIVER=="snd-usb-audio", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0991", ATTR{authorized}="0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # install.packages("usa") | |
| library(tidyverse) | |
| x <- usa::counties %>% | |
| filter(state %in% state.abb) %>% | |
| group_by(state) %>% | |
| arrange(name, .by_group = TRUE) %>% | |
| mutate(first_letter = str_sub(name, end = 1)) %>% | |
| filter(first_letter == first_letter[length(first_letter)/2]) %>% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(lubridate) | |
| library(jsonlite) | |
| library(janitor) | |
| library(rvest) | |
| # state pop history ------------------------------------------------------- | |
| # look for zip export from stl fed | |
| # zip has 2016-2019, not on wikipedia |
NewerOlder