Political ScienceQuarto

Andrew Heiss's blog

Andrew Heiss's blog
Home PageRSS FeedMastodon
language
RTidyverseGgplotGisMapsPolitical Science
Published

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: Here’s a closer comparison of those two maps (click to zoom): This histogram legend is especially useful for choropleth maps where units like counties are sized differently, which can create an illusion of a different distribution.

RTidyverseGgplotOjsObservable PlotPolitical Science
Published

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 and research, and the {rnaturalearth} package makes it really easy to get their data into R for immediate mapping. I mean, look at this!

RTidyverseUs CensusGgplotBayesPolitical Science
Published

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 experimental sample with the general population so that we could speak a little to the experiment’s generalizability.

RQuartoMarkdownPolitical Science
Published

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 all use different systems and software and candidate identifiers.

RPythonPositronData SciencePolitical Science
Published

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 away from a pure R focus, and Quarto is pan-lingual successor to R Markdown.

RTidyverseGgplotGisMapsPolitical Science
Published

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: …and it’s just so small . Amid the joking, my wife came to Rhode Island’s defense by declaring that even though it’s so small, it has one of the highest proportions of coastline to land borders.

RTidyverseSimulationsProbabilityPolitical Science
Published

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 probability math was in my first PhD-level stats class in 2012.

RTidyverseDplyrAnimationsPolitical Science
Published

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 pivoting wider is so valuable.