Mickey Rafa
banner
mickeyrafa.bsky.social
Mickey Rafa
@mickeyrafa.bsky.social
Exploring insights across policy ⚖️, sports 🏈, and nature 🌳. Finding stories in public data sources, mostly with #rstats and #ggplot2.

Expanding my toolkit with #quarto and #observableplot. Let's connect!
Learning a bit of the {purrr} package has been a big level up. In this {cfbfastR} example, I'm creating one dataframe with many seasons' worth of stats. This approach ditches stringing together a long bind_rows() for a clean logic -- map this vector to this function and create a dataframe!

#Rstats
December 31, 2024 at 9:10 PM
Who are the most fined #NFL players in 2024? After Denzel Perryman's (LAC) huge fine, George Pickens (PIT) and CJ Gardner-Johnson round out the top 3.

Made using {rvest}, {gt}, and the {nflverse}. Creating {gt} tables is lots of fun. More to come in future posts!

#rstats

Source: Spotrac
December 17, 2024 at 3:31 PM
I love summarize() + across() in {dplyr} for quick multi-column summaries. Just calculated seasonal NFL stats from {nflverse} box scores, and used starts_with() to ID the columns to calc from. Makes this work a breeze!

Thanks to @albertrapp.bsky.social for the pro tip!

#rstats
December 16, 2024 at 3:19 PM
#MakeoverMonday | Week 47, 2024 | Modern Slavery

Exploring modern slavery estimates from Walk Free using advanced {gt} formatting for alternative table designs and @ginareynolds.bsky.social {ggcirclepack} for a country occurrence visualization.

Code: tinyurl.com/4jkfuu7y

#rstats #ggplot2
December 15, 2024 at 7:58 PM