Matthew Kay's Avatar

Matthew Kay

@mjskay.com

Assoc Prof Computer Science and Communication Studies at Northwestern. Infovis, HCI. Author of tidybayes & ggdist R pkgs. he/him. ๐Ÿณ๏ธโ€๐ŸŒˆ https://mjskay.com/ Co-director https://mucollective.northwestern.edu Co-founder https://journalovi.org

11,677
Followers
1,062
Following
1,718
Posts
07.05.2023
Joined
Posts Following

Latest posts by Matthew Kay @mjskay.com

lol I forgot about splatterpie

maybe I should write a brunch-themed vis book

06.03.2026 20:53 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

had to look it up but yeah that tracks

06.03.2026 19:23 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

if you look closely, these snake bars are also waffle charts, which raises the question, what food item are they really?

funnel cake chart?

06.03.2026 18:59 ๐Ÿ‘ 19 ๐Ÿ” 5 ๐Ÿ’ฌ 4 ๐Ÿ“Œ 0

i'm not an economist but if 900 people can afford to fund $3,000 checks to damn near everyone else in america and still be insanely fuckin rich afterwards maybe they have too much fuckin money

05.03.2026 13:03 ๐Ÿ‘ 2367 ๐Ÿ” 639 ๐Ÿ’ฌ 24 ๐Ÿ“Œ 3

shocking you'd rather say "95% chance" instead of "while this 95% CI does not carry a 95% (aleatory) probability of containing the value, satisfied as I am with its assumptions and lacking other prior knowledge, it induces in me a 95% subjective probability it contains the value" every fucking time

04.03.2026 06:48 ๐Ÿ‘ 12 ๐Ÿ” 1 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Yeah some version of a ramp... Particulars vary, I often get PhD students with research experience in undergrad/masters so they're further along

I also try to ask "what are YOU interested in?" when we hit a crossroads, because if previous advisors haven't done that they may hesitate to say

03.03.2026 17:48 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
Academics Need to Wake Up on AI Ten theses for folks who haven't noticed the ground shifting under their feet

I'm not gonna touch most of this but two things:
1. The apprenticeship model of science was never supposed to be about the PI's workflow. The point isn't to have research assistants to help to publish stuff faster. Training the next generation researcher *is* the point. Because we care. Allegedly.

03.03.2026 15:14 ๐Ÿ‘ 176 ๐Ÿ” 30 ๐Ÿ’ฌ 5 ๐Ÿ“Œ 9

This is a good point... I was shocked to discover when I became a professor that there are faculty who just want to hire students to do their (the professor's) projects instead of to help students develop into colleagues as they do their (the student's) projects.

03.03.2026 16:16 ๐Ÿ‘ 12 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1

e.g. in the example above the density estimator is not bounded while the data clearly is, so the ridgelines and violins are misleading. Meanwhile the jittered point cloud is hard to precisely read density from

A (good) dotplot would reflect boundedness and show density as bin heights

28.02.2026 00:51 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
28.02.2026 00:47 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

How big is the "no for loops" crowd? Some folks do adopt more extreme positions, but I find the experienced people doing a lot of the writing and training tend to understand that for loops are useful and higher-level operations are useful (especially if they unlock new reasoning tools)

26.02.2026 19:49 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

hello, it is 4am and I am awake because I am in pain and I need a lot of distraction so who wants some HALF BAKED THOUGHTS about psychology in the AI era and what we're missing out on in the common narratives right now

25.02.2026 11:55 ๐Ÿ‘ 107 ๐Ÿ” 7 ๐Ÿ’ฌ 5 ๐Ÿ“Œ 5

In parliamentary democracies with strong whips, members *do not* vote against party. I thought this was bad until living in the US for awhile: here buying a bill is cheap (just a few members) and elections don't have clear consequences if you have to explain blue dogs, the filibuster, etc to voters

25.02.2026 04:29 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Loyal opposition - Wikipedia

The term seems to originate in parliamentary democracies, so maybe "controlled opposition" is more what's meant here.

en.wikipedia.org/wiki/Loyal_o...

en.wikipedia.org/wiki/Control...

(as someone not from the US I've always found the obsession with bipartisanship here to be baffling)

25.02.2026 04:12 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Oddly, in parliamentary democracies "loyal opposition" means practically the opposite: parties that oppose the government but are loyal to the state and to democracy. In a way, the opposite of many Democrats, who strive for "bipartisanship" instead of opposing the gov't / offering an alternative.

25.02.2026 04:05 ๐Ÿ‘ 9 ๐Ÿ” 1 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1
> x = c("a","b","c","d",NA,"e")
> outer(is.na(x), x, ifelse, yes = "na")
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,] "a"  "b"  "c"  "d"  NA   "e" 
[2,] "a"  "b"  "c"  "d"  NA   "e" 
[3,] "a"  "b"  "c"  "d"  NA   "e" 
[4,] "a"  "b"  "c"  "d"  NA   "e" 
[5,] "na" "na" "na" "na" "na" "na"
[6,] "a"  "b"  "c"  "d"  NA   "e" 
> diag(outer(is.na(x), x, ifelse, yes = "na"))
[1] "a"  "b"  "c"  "d"  "na" "e"

> x = c("a","b","c","d",NA,"e") > outer(is.na(x), x, ifelse, yes = "na") [,1] [,2] [,3] [,4] [,5] [,6] [1,] "a" "b" "c" "d" NA "e" [2,] "a" "b" "c" "d" NA "e" [3,] "a" "b" "c" "d" NA "e" [4,] "a" "b" "c" "d" NA "e" [5,] "na" "na" "na" "na" "na" "na" [6,] "a" "b" "c" "d" NA "e" > diag(outer(is.na(x), x, ifelse, yes = "na")) [1] "a" "b" "c" "d" "na" "e"

lol oh no

my first thought is, yours is worst-case quadratic if x is all NA, but linear if there are no NAs

so just throw outer() at it so it's always quadratic:

24.02.2026 06:52 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

thanks I hate it

worse than linear runtime is a nice touch

24.02.2026 06:14 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

I'm a weighted average of neutral good and chaotic evil

24.02.2026 03:11 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

you ain't lived till you've piped into a subset assign

24.02.2026 03:09 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Oh that's a new one for me! Looks neat

24.02.2026 01:18 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

bottom right, probably

23.02.2026 22:13 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

`=` is neutral in a broader context that considers many other languages, hence its place in the center column

23.02.2026 22:12 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
R coding style alignment chart:

LAWFUL GOOD
y <- x 
y[is.na(x)] <- "na"

NEUTRAL GOOD
y = x 
y[is.na(x)] = "na"

CHAOTIC GOOD
y = x |>
  is.na() |> 
  ifelse("na", x)


LAWFUL NEUTRAL
y <- ifelse(is.na(x), "na", x)

TRUE NEUTRAL
y = ifelse(is.na(x), "na", x)

CHAOTIC NEUTRAL
y = x %>%
  ifelse(is.na(.), "na", .)


LAWFUL EVIL
`<-`(y, x)
`[<-`(y, is.na(x), "na")

NEUTRAL EVIL
y = x
for (i in seq_along(x)) {
  if (is.na(x[[i]])) {
    x[[i]] = "na"
  }
} 

CHAOTIC EVIL
x %>%
  `[<-`(is.na(.), "na") %>%
  ``<<-``(y, .)

R coding style alignment chart: LAWFUL GOOD y <- x y[is.na(x)] <- "na" NEUTRAL GOOD y = x y[is.na(x)] = "na" CHAOTIC GOOD y = x |> is.na() |> ifelse("na", x) LAWFUL NEUTRAL y <- ifelse(is.na(x), "na", x) TRUE NEUTRAL y = ifelse(is.na(x), "na", x) CHAOTIC NEUTRAL y = x %>% ifelse(is.na(.), "na", .) LAWFUL EVIL `<-`(y, x) `[<-`(y, is.na(x), "na") NEUTRAL EVIL y = x for (i in seq_along(x)) { if (is.na(x[[i]])) { x[[i]] = "na" } } CHAOTIC EVIL x %>% `[<-`(is.na(.), "na") %>% ``<<-``(y, .)

what's a "pipes" ?? #rstats

23.02.2026 21:27 ๐Ÿ‘ 91 ๐Ÿ” 18 ๐Ÿ’ฌ 9 ๐Ÿ“Œ 3

halve, sugar, cut, scoop, delicious

23.02.2026 15:13 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Could do:

data.frame(x = 1:10) |>
within({
y = x + 1
z = y + 2
})

20.02.2026 21:57 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Several fleurons from the Adobe Aldine typeface, including one snake

Several fleurons from the Adobe Aldine typeface, including one snake

I love a good fleuron as a dinkus

19.02.2026 06:40 ๐Ÿ‘ 22 ๐Ÿ” 3 ๐Ÿ’ฌ 3 ๐Ÿ“Œ 0
Wikipedia entry for dinkus

In typography, a dinkus is a typographic device or convention that typically consists of three spaced asterisks or bullet symbols in a horizontal row, e.g. โ€‰ โˆ— โˆ— โˆ— โ€‰ or โ€‰ โ€ข โ€ข โ€ข โ€‰. The device has a variety of uses, and it usually denotes an intentional omission or a logical "break" of varying degree in a written work. This latter use is similar to a subsection, and it indicates that the subsequent text should be re-contextualized. Such a dinkus typically appears centrally aligned on a line of its own with vertical spacing before and after the device. The dinkus has been in use in various forms since c.โ€‰1850.[1][2] Historically, the dinkus was often represented as an asterism, โ‚, though this has fallen out of favor and is now nearly obsolete.

Wikipedia entry for dinkus In typography, a dinkus is a typographic device or convention that typically consists of three spaced asterisks or bullet symbols in a horizontal row, e.g. โ€‰ โˆ— โˆ— โˆ— โ€‰ or โ€‰ โ€ข โ€ข โ€ข โ€‰. The device has a variety of uses, and it usually denotes an intentional omission or a logical "break" of varying degree in a written work. This latter use is similar to a subsection, and it indicates that the subsequent text should be re-contextualized. Such a dinkus typically appears centrally aligned on a line of its own with vertical spacing before and after the device. The dinkus has been in use in various forms since c.โ€‰1850.[1][2] Historically, the dinkus was often represented as an asterism, โ‚, though this has fallen out of favor and is now nearly obsolete.

perennial reminder that this typographic thing:

* * *

is called a "dinkus"

en.wikipedia.org/wiki/Dinkus

18.02.2026 23:42 ๐Ÿ‘ 269 ๐Ÿ” 94 ๐Ÿ’ฌ 14 ๐Ÿ“Œ 7
Sam Abbott (LSHTM): Composable probabilistic models can lower barriers to rigorous ID modelling
Sam Abbott (LSHTM): Composable probabilistic models can lower barriers to rigorous ID modelling YouTube video by Juniper Consortium Seminars

I had a great time talking at the Juniper seminar series last week about composable infectious disease models. Some very good discussion after the talk. The recording is now up!

youtu.be/FQYOqGnbJWA?...

16.02.2026 12:06 ๐Ÿ‘ 24 ๐Ÿ” 3 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 3
Post image Post image

If you are teaching any kind of statistics, probability or modeling classes, you'll love this website. Contains dozens of interactive simulations of random processes, with sliders, different visualizat options, and full numeric log ouput: www.randomservices.org/random/apps/...

16.02.2026 19:43 ๐Ÿ‘ 57 ๐Ÿ” 18 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

People are complicated and rarely universally good, so shared admiration is necessarily more tentative due to the possibility that the person is a twat. With shared dislike, you know that they are.

12.02.2026 23:15 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0