sarah
@sarahjohnson.io
85 followers 59 following 17 posts
Research Specialist at Princeton University's Eviction Lab R programmer & housing analyst
Posts Media Videos Starter Packs
Pinned
sarahjohnson.io
I was loving Claude Code... until I tried it with #rstats. Constant errors, wouldn't use the tidyverse even when asked, "optimized" functions were slower.

Frustrated, I started a session just to teach R to Claude and summarize what it learned into a CLAUDE.md file gist.github.com/sj-io/3828d6...
Claude R Tidyverse Expert
Claude R Tidyverse Expert. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
Reposted by sarah
harvard-jchs.bsky.social
Rising rents are leaving households with less income to pay for other needs, and inflation has also pushed up the cost of other necessities.

Our new paper finds that, after paying for rent, 2/3 of working-age renters cannot afford their basic needs.

www.jchs.harvard.edu/blog/two-thi...
Two-Thirds of Working-Age Renters Struggle to Afford Basic Needs
Rising rents are squeezing renter households, leaving them with less residual income to pay for other needs. But inflation has also pushed up the cost
www.jchs.harvard.edu
Reposted by sarah
thomasp85.com
I am super hyped to finally share the first release of plumber2 with all of you. This has been the center of my attention for a big part of 2025 and I hope you'll find it a worthy update to the venerable plumber package.

The blog post will tell you more

#rstats
plumber2 0.1.0
plumber2, a complete rewrite of plumber, has landed on CRAN, providing a modern, future proof solution for creating web servers in R. Read all about the new features here.
www.tidyverse.org
sarahjohnson.io
Thank you for @ ing me! I appreciate it!
sarahjohnson.io
Thank you for your response and apologies for the delay in getting back to you. I was hoping to put in a PR but I've been swamped recently. Here is what I have so far: gist.github.com/sj-io/f1f3b2... made by combining the _variables.scss under scss:defaults and _bootswatch.scss under scss:rules
Brite theme for Quarto
Brite theme for Quarto. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
sarahjohnson.io
(also informally requesting Quarto add Bootswatch's Brite theme. It looks so sick, I had to manually add it and test it out)
sarahjohnson.io
Do you ever make a really nice table and then spend like 30+ minutes just clicking around?

reactable has gotta be my fav R table package. This table has just shy of 50K rows with grouping, conditional formatting, filtering and sorting. Renders and runs super fast. #rstats
sarahjohnson.io
Good suggestion on the blog post! I've started to put one together. Quick answer: I downloaded md (or rmd/qmd) files from github, saved them in a folder, then opened Claude and basically said "we're having too many R errors, esp w/ the tidyverse, please summarize these in a way you can remember"
sarahjohnson.io
Late to the party but I'm constantly working with lookup tables and this would be huge for me. I've been using a homemade solution but I would love these functions, esp w/ the error handling. Can't wait to use these and thank y'all for adding them! bsky.app/profile/sara...
sarahjohnson.io
I also wrapped this into a function for one of my packages, so I can just pass on two vectors of the same length to str_replace_all without creating a named vector manually beforehand
sarahjohnson.io
I saw others suggesting this idea but I hadn't seen anyone share a CLAUDE.md or similar file. This might also be fixed if you use the API and MCP, but I'm already paying for Claude Code.

also there's no ggplot, lubridate in the file but you can always ask Claude to update the file with new docs.
sarahjohnson.io
The file is long, but large chunks can probably be removed depending on your use. I needed help with package development, so I fed it a bunch of rlang pages. Also added things I'm less familiar with, like vctrs and s7, so maybe it can help me improve in the future. (& lmk if you see something wrong)
sarahjohnson.io
I placed this into a project I was trying to debug and the results were 1000x better, truly night and day. I'm no longer having to teach it R while trying to work. It can make modern functions in one attempt, benchmark code, add parallelization.
sarahjohnson.io
I gave it only pages from official tidyverse docs, vingettes, blog posts, style guide, and excerpts from R for Data Science and Advanced R. I asked it to not only summarize the files but also make sure it knew *when* to use tidyverse over base R.
sarahjohnson.io
I was loving Claude Code... until I tried it with #rstats. Constant errors, wouldn't use the tidyverse even when asked, "optimized" functions were slower.

Frustrated, I started a session just to teach R to Claude and summarize what it learned into a CLAUDE.md file gist.github.com/sj-io/3828d6...
Claude R Tidyverse Expert
Claude R Tidyverse Expert. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
sarahjohnson.io
I also wrapped this into a function for one of my packages, so I can just pass on two vectors of the same length to str_replace_all without creating a named vector manually beforehand
sarahjohnson.io
I don't know if it fits your use case, but str_replace_all can replace with a named vector. You might need to add "\\b" around the input to make sure it doesn't match partials, or wrap it with "^" and "$" for an exact match.
Reposted by sarah
cvallejo.bsky.social
Hot off the press! Annual eviction report here:
evictionlab.bsky.social
In 2024, landlords filed more than a million evictions in the 30+ cities and 10 states we monitor.

While some jurisdictions showed progress, others revealed concerning trends. We’re sounding the alarm in several cities. Learn more in our 2024 report: evictionlab.org/ets-report-2...
Preliminary Analysis: Eviction Filing Patterns in 2024
The days of emergency rental assistance and eviction protections are long gone. Now, our data show that landlords are filing evictions at nearly the same levels as before 2020.
evictionlab.org
sarahjohnson.io
haha switching it around to "r gt" works for me
Reposted by sarah
crampell.bsky.social
Median age of homebuyers just hit a new record high of 56
(Via Torsten Slok)
sarahjohnson.io
Haven't tried duckplyr, but with duckdb you can use tbl_function(con, "read_csv('data_*.csv')") |> collect() for the same effect.
sarahjohnson.io
i dislocated my shoulder yesterday because I tried to put on a jacket
Reposted by sarah
xjbar.bsky.social
me as a kid: (falls 20 feet off monkey bars) im good!

me now: i tried to scoop ice cream that was just a little too frozen and i dislocated my shoulder
Reposted by sarah
emilyriederer.bsky.social
#rstats is actually fighting about Base versus Tidyverse again on this platform. We are so back