🦜 Andrew Heiss's blog
@www.andrewheiss.com.atom.html@rss-parrot.net
I'm an automated parrot! I relay a website's RSS feed to the Fediverse. Every time a new post appears in the feed, I toot about it. Follow me to get all new posts in your Mastodon timeline!
Brought to you by the RSS Parrot.
---
Andrew Heiss's blog
Your feed and you don't want it here? Just
e-mail the birb.
How to use a histogram as a legend in {ggplot2}
https://www.andrewheiss.com/blog/2025/02/19/ggplot-histogram-legend/
Published: February 19, 2025 05:00
On Bluesky the other day, I came across this neat post that suggested using a histogram as a plot legend to provide additional context for the data being shown:
Joey Cherdarchuk’s original post
Here’s a closer comparison of those two maps (click to…
How to move Crimea from Russia to Ukraine in maps with R
https://www.andrewheiss.com/blog/2025/02/13/natural-earth-crimea/
Published: February 13, 2025 05:00
The Natural Earth Project
The Natural Earth Project provides high quality public domain geographic data with all sorts of incredible detail, at three resolutions: high (1:10m), medium (1:50m), and low (1:110m). I use their data all the time in my own work…
Using USAID data to make fancy world maps with Observable Plot
https://www.andrewheiss.com/blog/2025/02/10/usaid-ojs-maps/
Published: February 10, 2025 05:00
As part of Elon Musk’s weird Department of Government Efficiency’s unconstitutional rampage through the federal government, USAID’s ForeignAssistance.gov was taken offline on January 31, 2025. It reappeared on February 3, but it’s not clear how long it…
Guide to comparing sample and population proportions with CPS data, both classically and Bayesianly
https://www.andrewheiss.com/blog/2025/01/27/ipums-cps-proportions-bayes/
Published: January 27, 2025 05:00
Last week I was making some final revisions to a paper where we used a neat conjoint experiment to test the effect of a bunch of different treatments on nonprofit donor preference.
One of the peer reviewers asked us to compare the characteristics of our…
Apple Music Wrapped with R
https://www.andrewheiss.com/blog/2024/12/04/apple-music-wrapped-r/
Published: December 4, 2024 05:00
’Tis the season for Spotify Wrapped stats and I love it, both for seeing what everyone listens to and because it’s such a cool way of presenting data. A few years ago on Twitter, Caitlin Hudon noted that
Spotify Wrapped is a great example of how you can…
Guide to generating and rendering computational markdown content programmatically with Quarto
https://www.andrewheiss.com/blog/2024/11/04/render-generated-r-chunks-quarto/
Published: November 4, 2024 05:00
This year, I’ve helped build the Idaho Secretary of State’s office’s election results website for both the primary and general elections. Working with election data is a complex process, with each precinct reporting results to their parent counties, which…
Fun with Positron
https://www.andrewheiss.com/blog/2024/07/08/fun-with-positron/
Published: July 8, 2024 04:00
At the end of June 2024, Posit released a beta version of its next-generation IDE for data science: Positron. This follows Posit’s general vision for language-agnostic data analysis software: RStudio PBC renamed itself to Posit PBC in 2022 to help move…
Calculating the proportion of coastline-to-border for US states
https://www.andrewheiss.com/blog/2024/05/08/coastline-to-border-proportions/
Published: May 8, 2024 04:00
A few days ago, my wife, a bunch of my kids, and I were huddled around a big wall map of the United States, joking about the relative unimportance of Rhode Island, the smallest state in the US. It’s one of the states I never ever think about:
Tweet by me…
Calculating birthday probabilities with R instead of math
https://www.andrewheiss.com/blog/2024/05/03/birthday-spans-simulation-sans-math/
Published: May 3, 2024 04:00
Even though I’ve been teaching R and statistical programming since 2017, and despite the fact that I do all sorts of heavily quantitative research, I’m really really bad at probability math.
Like super bad.
The last time I truly had to do set theory and…
Visualizing {dplyr}’s mutate(), summarize(), group_by(), and ungroup() with animations
https://www.andrewheiss.com/blog/2024/04/04/group_by-summarize-ungroup-animations/
Published: April 4, 2024 05:00
I’ve used Garrick Aden-Buie’s tidyexplain animations since he first made them in 2018. They’re incredibly useful for teaching—being able to see which rows left_join() includes when merging two datasets, or which cells end up where when pivoting longer or…