|
Hey folks! I’d love to have you join me in September for a new approach to teaching workshops that I will be rolling out. For five weeks I’ll be working with two cohorts of you all to improve our data visualization skills. Each week we’ll meet for a two-hour session. These sessions will include instruction on principles and concepts in data visualization and an opportunity to apply this information to visualizations we find in the wild or that you bring to the group. By not talking about coding, we’ll have an opportunity to focus on the big ideas that will allow us to design the most effective visualizations. If you have any questions, feel free to reply to this email.
Because it’s the only system I know and it seems weird to me, I can only assume that our system of assigning regions to legislative representatives is bizarre to everyone else in the world. Basically, state legislatures can modify the boundaries of a district so long as each district has the same number of people. Legislators can draw some pretty funky maps that have all sorts of twists and turns. The goal being to maximize the number of “safe” districts for their party and minimize the number of safe districts for the opposing party. The product is what’s called gerrymandering. This summer, attention has gone to Texas. Texas has 38 districts. Under the current regions, in 2024 Trump won 27 of the districts and 25 of those are held by Republicans. Under a proposed rewrite of the regions, he would have won 30 districts by at least 10 percentage points. The logic goes that those 30 districts would be held by Republicans in the 2026 midterm election. Keep in mind that Trump won Texas with 56% of the vote. Based on that proportion, you might expect 21 of the seats to go to Republicans. Of course, Republicans aren’t the only party that engages in this type of behavior. Democrats do it to and there are threats of other, Democrat leaning states following Texas’s lead. I am a fan of jitter plots and so a jitter plots in a NY Times article on the topic caught my eye: A jitter plot randomizes the x (or y in this case) axis position to prevent points from falling on top of each other. The other axis is on a continuous scale. In this case, the categorical variable (i.e. current or proposed districts) is on the y-axis and the results from the 2024 election for each set of districts. A jitter plot can be created using At first glance, I thought I might recreate this plot by making two separate plots that each have three facets. We could combine the plots with Something I’m not sure about is how to have the gridlines not go up through the labels. One option would be to make the background of each label wide enough that it covers the gridlines that would normally come up behind the text. By this approach the gridlines could be controlled with Let’s think about the use of color for the points. I notice two things. First, there are different shades of blue and red for the points above 20%, that fall between 10 and 20%, and those that fall between 0 and 10%. This could be implemented by creating a dummy variable for each of the ranges and then changing it with I think this should get us pretty close to a faithful representation of the original figure. Oh yeah, one small thing to consider is where to get the data! I noticed that the NY Times version isn’t interactive and doesn’t have data hiding in the source code. But I was able to track down an interactive map that does have the data hiding. Also, we can get the actual margins from the 2024 election with the current districts from wikipedia. We might need to use some tools from What do you think? See if you can give this figure your best effort and let me know how it goes!
|
Hey folks, Did you know that you can do statistics in R? HA! Of course it is. As the first sentence of its Wikipedia entry says, “R is a programming language for statistical computing and data visualization”. I rarely discuss using R for statistical analysis and focus far more attention on the data visualization power of R. This week, I’d like to share a set of panels from a figure in a paper recently published in Nature, “Lymph node environment drives FSP1 targetability in metastasizing...
Hey folks, I’ve really enjoyed the flow of combining these newsletters with a Monday critique video, a Wednesday recreation video, and occasionally a Friday remake video. A few weeks in, I feel pretty good about our ability to engage in constructive critiques. Of course, we have to train ourselves (myself included) to use those tools and not just resort to immediate and emotional responses - “I hate that plot”. We need to engage, get in the head of the original creator, and try to understand...
Hey folks! I’m appreciating the positive feedback on Monday critique videos. They’re a lot of fun to think through and make. I think I might start looking at figures that are drawn from the scientific literature since many of you found out about me from my science work. Let me know if there are plots or practices that you’d like to see me talk about. I’ll see if I can work them into the queue. Also, if you’re working on developing figures for a presentation, poster, or paper and would like to...