Posts by rstats on Bryan Shalloway's Blog
Author: rstats on Bryan Shalloway's Blog
Pulling Twitter Engagements Using the v2 API as Well as rtweet
Feed: R-bloggers. Author: rstats on Bryan Shalloway's Blog. This is a follow-up to a short post I wrote on R Access to Twitter’s v2 API. In this post I’ll walk through a few more examples of pulling data from twitter using a mix of Twitter’s v2 API as well as the {rtweet} package.I’ll pull all Twitter users that I ([@brshallo](https://twitter.com/brshallo)) have recently been engaged by or engaged with. I’ll use a mix of {rtweet} and {httr} to collect recent engagements. For each type of engagement I’ll lean towards using {rtweet}. I’ll use {httr} in cases where it’s more convenient to ... Read More
Network Visualizations of Code Collections (funspotr part 3)
Feed: R-bloggers. Author: rstats on Bryan Shalloway's Blog. Network Visualizations of Code Collections (funspotr part 3) | R-bloggers % # not including base R or any custom functions or packages I don't have installed filter(!is.na(pkgs), !(pkgs %in% c("base", "(unknown)"))) %>% network_plot(to = pkgs) tidymodels and tidyverse packages are both central to Julia’s posts. The cluster of tidymodels packages show-up (for the most part) just to the right of the cluster of core tidyverse packages. David Robinson Tidy Tuesday readr::read_csv("https://raw.githubusercontent.com/brshallo/funspotr-examples/main/data/funs/drob-tidy-tuesdays-funs-20220114.csv") %>% filter(!is.na(pkgs), !(pkgs %in% c("base", "(unknown)"))) %>% network_plot(to = pkgs) Similar to Julia’s posts, tidyverse packages are central to David’s Tidy ... Read More
Identifying R Functions & Packages in Github Gists
Feed: R-bloggers. Author: rstats on Bryan Shalloway's Blog. This post is a follow-up to my previous post Identifying R Functions & Packages Used in GitHub Repos that introduced funspotr. funspotr can also be applied to gists: By functions or packages used…?https://t.co/kbSLOpQZLF — Bryan Shalloway (@brshallo) January 22, 2022 A problem I bumped into was that most of Chelsea’s gists don’t actually have .R or .Rmd extensions so my approach skipped most of her snippets. I wanted to parse my own gists but ran into a related problem that most of my github gist code snippets are saved as .md files ... Read More
Identifying R Functions & Packages Used in GitHub Repos
Feed: R-bloggers. Author: rstats on Bryan Shalloway's Blog. Identifying R Functions & Packages Used in GitHub Repos | R-bloggers % distinct() %>% DT::datatable(rownames = FALSE, class = 'cell-border stripe', filter = 'top', escape = FALSE, options = list(pageLength = 10)) David Robinson Tidy Tuesday Also posted table to google drive here. The following package dependencies were not installed locally during parsing. Any function from these packages (along with any custom functions) will most likely be assigned pkgs = "(unknown)": ggflags; ebbr; rKenyaCensus; tidymetrics; shinymetrics; drlib; shinybones; treesnip; StatsBombR readr::read_csv("https://raw.githubusercontent.com/brshallo/funspotr-examples/main/data/funs/drob-tidy-tuesdays-funs-20220114.csv") %>% distinct() %>% DT::datatable(rownames = FALSE, class = 'cell-border stripe', filter ... Read More
Predicting NBA Playoff Berths: FiveThirtyEight vs Betting Markets
Feed: R-bloggers. Author: rstats on Bryan Shalloway's Blog. TLDR: FiveThirtyEight’s forecasts of NBA playoff berths seem to hold-up OK against betting markets. If you trust them, you should consider betting against the Lakers right now. In The Virtues and Vices of Election Prediction Markets Nate Silver explains why FiveThirtyEight generally should not beat the market: “The general question of whether FiveThirtyEight ought to be better than prediction and betting markets is an interesting one. I am far from an efficient-market hypothesis purist, but markets are tough to beat in most circumstances. Furthermore, the FiveThirtyEight forecasts are public information, and bettors ... Read More
Macros in the Shell: Integrating That Spreadsheet From Finance Into a Data Pipeline
Feed: R-bloggers. Author: rstats on Bryan Shalloway's Blog. There is many a data science meme degrading excel: (Google Sheets seems to have escaped most of the memes here.) While I no longer use it regularly for the purposes of analysis, I will always have a soft spot in my heart for excel. Furthermore, using a “correct” set of data science tools often requires a bridge. Integrating a rigorous component into a messy spreadsheet based pipeline can be an initial step towards the pipeline or team or organization starting on a path of continuous improvement in their processes. Also, spreadsheets are ... Read More
Recent Comments