Chris Kenny, PhD's Avatar

Chris Kenny, PhD

@chriskenny.bsky.social

Postdoc, Princeton DDSS. PhD '25 Government @harvard.edu. Studies redistricting with #rstats. https://christophertkenny.com/

654 Followers  |  314 Following  |  165 Posts  |  Joined: 19.09.2023  |  2.6

Latest posts by chriskenny.bsky.social on Bluesky

Thanks. mapgl makes it much faster and removes some of the hacky components that were needed to get leaflet to avoid redrawing shapes. Appreciate your package!

03.10.2025 15:19 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Interactive Redistricting A point and click editor for districts built on shiny and mapgl. Users can draw districts and calculate standard redistricting metrics, like compactness or the number of administrative splits. Maps ca...

The code to make the demo is simple, especially if you already use ALARM data:

library(redistio)
nm <- alarmdata::alarm_50state_map('NM')
draw(nm, init_plan = nm$cd_2020, palette = wacolors::wacolors$rainier,
layers = list(County = 'county'))

More info: christophertkenny.com/redistio/

03.10.2025 12:46 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

redistio now uses @kylewalker.bsky.social's mapgl for interactive redistricting map editing!

redistio is an #rstats package that uses Shiny to draw redistricting maps locally.

Unlike other district editors, this provides access to our simulation algorithms, interactively!

Short demo:

03.10.2025 12:46 β€” πŸ‘ 13    πŸ” 6    πŸ’¬ 2    πŸ“Œ 1
Post image

#rstats packages tinytiger and baf may again be seeing intermittent issues (again), as the Census Bureau has placed this redirect on their FTP sites.

Empty list responses may also be possible, as the download is (sometimes) capturing the HTML page...

01.10.2025 19:50 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

A pdf version of the slides are here: christophertkenny.com/drafts/2025-...

01.10.2025 19:33 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Presenting today!

01.10.2025 13:13 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Search β€” Typst: Universe Explore packages and templates to take your documents to the next level.

There’s been a lot of development, especially with the growth in the user community over that time period. But it would depend on how obscure your math is, I think.

There’s a listing of community packages here: typst.app/universe/sea...

27.09.2025 18:37 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yeah, I have fair point. I do all of my journal writing in Quarto, so that I can swap between formats, which lets me write Quarto => Typst. If a journal requires LaTeX, you just swap the engine and Quarto produces the LaTeX file.

27.09.2025 13:39 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

LaTeX isn’t going anywhere. It has a ton of users. But more and more, I think the only reason you would prefer LaTeX is some form of Stockholm syndrome. β€œI was forced to learn LaTeX so it must be good.”

If you’re starting from scratch, just use Typst. It hurts less and most places just want a pdf.

26.09.2025 01:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I have a decade+ of LaTeX experience and ~2 years of lighter Typst experience. There’s no comparison: Typst is just better. It’s faster, cleaner, and easier to use. The core drawback has been including external PDFs and that is now supported in the newest Typst versions!

26.09.2025 01:20 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Typst threads this nicely by providing a syntax relying mostly on set and show rules, which are intuitive.

Crucially, this means journal submissions in Typst use: the same syntax you normally would use.

LaTeX journal templates instead introduce cls files with wacky syntax and new cases to handle.

26.09.2025 01:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Typst is much more compatible with the researcher workflow: researchers want to research, not fight with typesetting.

Word is too general for technical fields, while LaTeX wants to image you’re doing obscure math or crazy chemistry with weird notation.

26.09.2025 01:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

Including basic header or footer features in LaTeX requires packages whereas the core Typst code has maybe 100x the features before you start adding extensions.

It renders absurdly fast and when it breaks, it shows you where, instead of giving obscure errors.

26.09.2025 01:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
From the LaTeX community on Reddit Explore this post and more from the LaTeX community

This Reddit post (www.reddit.com/r/LaTeX/s/aq...) came across my feed.

I think the real question is: How can LaTeX compete with Typst going forward? LaTeX’s advantage now is size of the user base, not features. The next stable (0.14.0) version of Typst includes PDF embeds, the last missing piece.

26.09.2025 01:20 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

Congrats, you gave a great talk!

26.09.2025 00:17 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I love Quarto, but I think in this case it too comes with heavy dependencies that might not mix well with an ultra-lightweight solution

26.09.2025 00:13 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

If pdf is the only desired output, seems like a great case for writing the table into a Typst file and then rendering that.

25.09.2025 22:45 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

It looks like that’s a question about styler, but the answer is using Air, if I’m not mistaken.

23.09.2025 22:37 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Has anyone looked into building a Positron extension to enable styling #rstats code with styler? (It's feasible since styler support was removed from Positron when Air was added.)

This also seems like it would be cleaner with the new equivalent of background jobs.

23.09.2025 21:36 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
grid of hexagonal package logos

grid of hexagonal package logos

Prepping to talk about developing R packages next Wednesday with the Princeton R User Group!

Registration info:
ddss.princeton.edu/events/2025/...

23.09.2025 16:00 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1

Great talk today!

17.09.2025 21:43 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image

NEW

Cost of living, calls for change undergird Mamdani lead in NYC

Voters call city unaffordable and prioritize someone bringing "needed change" over "right experience"

Trump also a factor, with majorities wanting next mayor to oppose him on ICE and National Guard

www.cbsnews.com/news/cbs-new...

15.09.2025 21:00 β€” πŸ‘ 27    πŸ” 8    πŸ’¬ 1    πŸ“Œ 0

I’m at #positconf2025! Feel free to send me a message or come up to me to talk anything redistricting, R, or quarto related!

16.09.2025 22:36 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Update: As best as I can tell, this is caused by #rstats ggplot2 breaking binned scales in 4.0.0. ggredist errors because it uses palette::palette() which creates a vctrs vector.

If you use a character vector of colors, it doesn't error, but the plot appears to be wrong.

github.com/tidyverse/gg...

15.09.2025 13:33 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

But `backquote` looks better in GFM…

12.09.2025 13:31 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
An email saying:

Dear maintainer,

Please see the problems shown on
<https://cran.r-project.org/web/checks/check_results_ggredist.html>.

The new errors are from yesterday's update of {ggplot2}.

Please correct before 2025-10-03 to safely retain your package on CRAN.

Best wishes,
The CRAN Team

An email saying: Dear maintainer, Please see the problems shown on <https://cran.r-project.org/web/checks/check_results_ggredist.html>. The new errors are from yesterday's update of {ggplot2}. Please correct before 2025-10-03 to safely retain your package on CRAN. Best wishes, The CRAN Team

I've never seen a CRAN email mentioning the update of another #rstats package before:

> The new errors are from yesterday's update of {ggplot2}.

I guess it makes sense for the scale of revdep checks, as nearly 20% of other packages import ggplot2!

12.09.2025 12:43 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 2
Preview
ggplot2 4.0.0 A new major version of ggplot2 has been released on CRAN. Find out what is new here.

I am beyond excited to announce that ggplot2 4.0.0 has just landed on CRAN.

It's not every day we have a new major #ggplot2 release but it is a fitting 18 year birthday present for the package.

Get an overview of the release in this blog post and be on the lookout for more in-depth posts #rstats

11.09.2025 11:20 β€” πŸ‘ 847    πŸ” 282    πŸ’¬ 9    πŸ“Œ 51
Poor functionality on windows - clarify system dependencies Β· Issue #134 Β· r-lib/systemfonts Hi When I recently read the blog Fonts in R, I wanted to try something with a given example and found it not working. When I later played around a bit, I found other things not working as well as I...

systemfonts might be a strong alternative, but needs a development version to work completely on Windows (see github.com/r-lib/system...).

I've used showtext quite a bit and it works well, but requires more work to setup fonts. We use showtext in ThemePark: github.com/matthewbjane....

09.09.2025 15:12 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

With the end of #rstats extrafont, is showtext/sysfonts now the best way to use custom fonts with ggplot? Or maybe systemfonts?

09.09.2025 14:54 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 3    πŸ“Œ 0

For sure, but sometimes not having any difficulty is worth a tiny fee to me. I paid $5 over 5 years ago and use this whenever I run scripts that need manual checks or are running on a server.

I just toss it an API key and then it always works with a single line of code for the notification.

07.09.2025 03:06 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@chriskenny is following 20 prominent accounts