Articles by R on kieranhealy.org

Clustering Pundits

February 15, 2022 | R on kieranhealy.org

For the past view years, Jason Snell at Six Colors has conducted a survey of people who write about Apple. He asks a series of questions about the company and its products and presents a report of people’s answers. This year’s report has al... [Read more...]

Comparing Distributions

December 19, 2021 | R on kieranhealy.org

When we want to see how something varies across categories, the trellis or small multiple plot is a good friend. We repeatedly draw the same graph once for each category, lining them up in a way that makes them comparable. Here’s an example from ... [Read more...]

The Polarization of Death

October 30, 2021 | R on kieranhealy.org

I’m continuing to update the covdata package in anticipation of a Data Visualization for Social Science course I’ll teach next semester. I revisited the Partisan Trajectories graph, as it seems there’s more that could be done with it.... [Read more...]

Excess Deaths in 2020

October 21, 2021 | R on kieranhealy.org

Prompted by a guest visit to Mine Çetinkaya-Rundel’s Advanced Data Visualization class here at Duke, I’ve updated my US and state excess death graphs. Earlier posts (like this one from February) will update as well. I am interested in all-cause mortality in the United States for 2020. I look ...
[Read more...]

Covid Trajectories

September 3, 2021 | R on kieranhealy.org

I updated the covdata package for the first time in a while, as I’ll be using it to teach in the near future. As a side-effect, I ended up taking a look at what the ongoing polarization or divergence of the COVID experience is like in different p... [Read more...]

Map, Walk, Pivot

May 4, 2021 | R on kieranhealy.org

Recently I came across a question where someone was looking to take a bunch of CSV files, each of which contained numerical columns, and (a) get them into R, (b) calculate the mean and standard deviation of every column in every CSV file, and (c) calculate some overall summary like ... [Read more...]

Excess Deaths February Update

February 24, 2021 | R on kieranhealy.org

The CDC continues to update its counts of deaths by cause for 2020 as data comes in from the jurisdictions that report to it. The data are by now fairly complete, though there are still significant gaps in several states due to delayed reporting. North Carolina, in particular, has yet to ...
[Read more...]

Income and Happiness

January 26, 2021 | R on kieranhealy.org

People have been talking about this PNAS paper by Matthew Killingsworth: “Experienced well-being rises with income, even above $75,000 per year”. Here’s the abstract: Past research has found that experienced well-being does not incre... [Read more...]

Cross National Death Rates

December 18, 2020 | R on kieranhealy.org

Data from the Short Term Morality Fluctuations dataset compiled by the Human Mortality Database continues to be very interesting. When thinking about how to interpret the 2020 data in a cross-national and longitudinal context, it’s clear that the... [Read more...]

Excess Deaths by Jurisdiction

October 8, 2020 | R on kieranhealy.org

Although yesterday’s excess deaths plots by cause graph was for the whole of the United States only, the table we made did the same calculations on the whole CDC dataset, so the resulting df_excess table has numbers for all U.S. states and several other jurisdictions, such as ... [Read more...]

Excess Deaths by Cause

October 6, 2020 | R on kieranhealy.org

As I was saying the other day, calculating excess deaths can be a tricky business, especially if your focus is on understanding counterfactuals like how many people died of some cause who would not have died due to some other competing risk over the period of interest. Moreover, even setting ... [Read more...]

Walk the Walk

October 1, 2020 | R on kieranhealy.org

The other day I was looking to make a bunch of graphs showing some recent data from the CDC about excess mortality due to COVID-19. The idea was to take weekly counts of deaths over the past few years, both overall and from various important causes, and then show how ... [Read more...]

National Weekly Death Rates

September 26, 2020 | R on kieranhealy.org

Following up on yesterday’s post on within-state variation in deaths in the United States, here’s a quick look at all-cause mortality rates across twenty countries, courtesy of the excellent work of the demographers who maintain the Human M... [Read more...]

US Excess Mortality

September 24, 2020 | R on kieranhealy.org

The CDC recently released some new data on mortality counts by state and cause of death in the U.S., allowing us to get a look at excess mortality patterns due to the COVID-19 pandemic. I’ve folded the data into the covdata package. As an illustr... [Read more...]

Dataviz Interview

September 14, 2020 | R on kieranhealy.org

I had a very nice chat recently about data visualization with Brian Fannin, a research actuary with the CAS. We covered a variety of topics from R and ggplot in particular, to how to think about data visualization in general, and what the dataviz commu... [Read more...]

Some Data Packages

August 25, 2020 | R on kieranhealy.org

If you’re teaching statistics, data analysis, or data visualization with R this semester, especially in the social sciences, I’ve pulled together various bits of data into packages that I use in my own teaching. You might find them useful o... [Read more...]

Get Apple’s Mobility Data

May 23, 2020 | R on kieranhealy.org

I’ve been maintaining covdata, an R package with a variety of COVID-related datasets in it. That means I’ve been pulling down updated files from various sources every couple of days. Most of these files are at static locations. While their internal structure may change occasionally, and maybe they’... [Read more...]

New Orleans and Normalization

April 28, 2020 | R on kieranhealy.org

My post about Apple’s mobility data from a few days ago has been doing the rounds. (People have been very kind.) Unsurprisingly, one of the most thoughtful responses came from Dr. Drang, who wrote up a great discussion about the importance of choosing the right baseline if you’re ... [Read more...]

Apple’s COVID Mobility Data

April 23, 2020 | R on kieranhealy.org

Apple recently released a batch of mobility data in connection with the COVID-19 pandemic. The data is aggregated from requests for directions in Apple Maps and is provided at the level of whole countries and also for a selection of large cities around the world. I folded the dataset into ... [Read more...]

Upset Plots

April 16, 2020 | R on kieranhealy.org

The other day Nature reported some preliminary results from a study of COVID-19 symptoms that’s being carried out via a phone app. The report noted that loss of sense of smell (or “Anosmia”) seemed to be a common symptom. The report was accompanied by this graphic, showing the co-occurrence ... [Read more...]
1 2 3

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)