Sign in

sarah

@sarahjohnson.io
152 followers 89 following 26 posts

Research Specialist at Princeton University's Eviction Lab R programmer & housing analyst

PostsRepliesMedia
sarah @sarahjohnson.io · 25/03/2026
Yayyy!!! I’m so glad it worked for you as well!! That’s so exciting.
080
sarah @sarahjohnson.io · 07/03/2026
Added more features, could tell there was a lot of overlap in functions, used the prompt again and Claude made a detailed refactoring plan that fully restructured the codebase, created general functions, and standardized the components that use them, instead of just surface level refactoring.
0100
sarah @sarahjohnson.io · 07/03/2026
I like to use Ivan Sutherland & Scratchpad as an example, but YMMV. Trying to make a Rust tool, ran /simplify until Claude ran out of suggestions. Then started a new session with the aforementioned framing and he fixed bugs & cleaned logic while cutting ~100 lines overall.
120
sarah @sarahjohnson.io · 07/03/2026
I'm having insane success rates when I ask Claude to pretend to be a god-tier programmer from the 1960s with limited computer power.
160
sarah @sarahjohnson.io · 09/02/2026
I hope to help clean up & flesh out the R skills Jeremy put together, just been a bit busy recently and haven't set aside the time.
010
sarah @sarahjohnson.io · 09/02/2026
I also found a Skill for optimizing performance to be extremely useful. It outlines how to use profvis and benchmark to compare code, so Claude knows for sure that a recommended change improves speed. Also, a skill for rlang is also very helpful for clean tidyverse functions.
110
sarah @sarahjohnson.io · 09/02/2026
That being said, I found skills to be extremely useful in making sure Claude is up-to-date with R. For instance, I had some functions break with the most recent stringr update, so I provided the updated docs to Claude, asked it to update its Skill, then it fixed the problem in one shot.
110
sarah @sarahjohnson.io · 09/02/2026
Sorry for taking so long getting back. Ngl, I rarely use Claude for R. For my work, I often code in R as quickly as I can type out the prompt and correct any issues (and I just find R a pleasure to write). I also found Opus 4.5 much better about using the tidyverse (haven't tested R with 4.6 yet).
110
sarah @sarahjohnson.io · 12/01/2026
I also experienced this and made a CLAUDE.md file last year to help with some of the basics, and @jeremy-data.bsky.social just turned it into Claude Skills! They're in his repo for now but plans to add them to Posit's public skills repo! github.com/jeremy-allen...
github.com
GitHub - jeremy-allen/claude-skills
Contribute to jeremy-allen/claude-skills development by creating an account on GitHub.
130
Reposted by sarah
Jeremy Allen @jeremy-data.bsky.social · 10/01/2026
If you don't want Claude to load all this great #RStats content for each session, try asking Claude Code to deconstruct this content into distinct skills. On first pass it did not add required YAML headers, so needed second pass with those instructions. Here are the skills I ended up with.
A terminal output showing a directory tree structure. The heading reads "Done. New structure:" followed by the path .claude/skills/ containing six subdirectories, each with a SKILL.md file inside: writing-r-classes/, writing-r-packages/, writing-r-performance/, writing-r-style/, writing-r-tidyeval/, and writing-r-tidyverse/. The tree uses standard ASCII box-drawing characters to show the hierarchy.
3346
Reposted by sarah
Harvard Joint Center for Housing Studies @harvard-jchs.bsky.social · 29/09/2025
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...
jchs.harvard.edu
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
075
Reposted by sarah
Thomas Lin Pedersen @thomasp85.com · 24/09/2025
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
tidyverse.org
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.
29227
sarah @sarahjohnson.io · 18/09/2025
Thank you for @ ing me! I appreciate it!
110
sarah @sarahjohnson.io · 13/09/2025
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
gist.github.com
Brite theme for Quarto
Brite theme for Quarto. GitHub Gist: instantly share code, notes, and snippets.
110
sarah @sarahjohnson.io · 27/08/2025
(also informally requesting Quarto add Bootswatch's Brite theme. It looks so sick, I had to manually add it and test it out)
220
sarah @sarahjohnson.io · 27/08/2025
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
1111
sarah @sarahjohnson.io · 22/08/2025
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"
010
sarah @sarahjohnson.io · 21/08/2025
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...
010
sarah @sarahjohnson.io · 21/08/2025
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.
060
sarah @sarahjohnson.io · 21/08/2025
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)
130
sarah @sarahjohnson.io · 21/08/2025
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.
130
sarah @sarahjohnson.io · 21/08/2025
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.
120
sarah @sarahjohnson.io · 21/08/2025
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...
gist.github.com
Claude R Tidyverse Expert
Claude R Tidyverse Expert. GitHub Gist: instantly share code, notes, and snippets.
1115329
sarah @sarahjohnson.io · 23/06/2025
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
010
sarah @sarahjohnson.io · 23/06/2025
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.
110
Reposted by sarah
Camila Vallejo @cvallejo.bsky.social · 24/04/2025
Hot off the press! Annual eviction report here:
021
sarah @sarahjohnson.io · 03/03/2025
haha switching it around to "r gt" works for me
110
Reposted by sarah
Catherine Rampell @crampell.bsky.social · 21/02/2025
Median age of homebuyers just hit a new record high of 56 (Via Torsten Slok)
881179302
Reposted by sarah
Harvard Joint Center for Housing Studies @harvard-jchs.bsky.social · 14/02/2025
The department will cut employees in the offices that enforce civil rights laws, compile data about the housing market, and pay to rebuild communities after disasters. news.bloomberglaw.com/daily-labor-...
news.bloomberglaw.com
US Housing Department to Shed Half its Workers, Union Chief Says
The US Department of Housing and Urban Development plans to discharge 50% of its workforce, the agency’s union president told Bloomberg Law.
087
sarah @sarahjohnson.io · 12/02/2025
It's not free but I've been using Easy CSV Editor for years and I love it. apps.apple.com/us/app/easy-...
apps.apple.com
‎Easy CSV Editor
‎Easy CSV Editor is one of the best editors for CSV and TSV files you'll find on the market. In a clean and user-friendly interface it offers simplicity and flexibility to edit both small and large do...
000
sarah @sarahjohnson.io · 04/02/2025
Haven't tried duckplyr, but with duckdb you can use tbl_function(con, "read_csv('data_*.csv')") |> collect() for the same effect.
010
sarah @sarahjohnson.io · 15/11/2024
i dislocated my shoulder yesterday because I tried to put on a jacket
000
Reposted by sarah
Emily Riederer @emilyriederer.bsky.social · 14/11/2024
#rstats is actually fighting about Base versus Tidyverse again on this platform. We are so back
1220721