Sharon Machlis
@smachlis.bsky.social
2.4K followers 290 following 1.1K posts
Author of Practical R for Mass Communication & Journalism ❤️ #RStats, writing & cities designed for walking/biking Having fun with #GenAI (Mostly) retired; former tech journalist Also #VibrantAging #Running #Photography #Crochet #ASL
Posts Media Videos Starter Packs
smachlis.bsky.social
I don't need free shipping since I'm getting the e-book, but I ordered today anyway.
smachlis.bsky.social
This is a professor at Rutgers who teaches a class on the history of anti-fascism. He also teaches about human rights. He has received multiple death threats and been doxed. He is relocating to Europe for his safety. This is where we are in the US now. www.theguardian.com/us-news/2025...
smachlis.bsky.social
Walk down to the river this afternoon
Narrow river with autumn foliage on one side reflecting in the river, green foliage on the other side
smachlis.bsky.social
Daboll shouldn't have this job.
#NFL
smachlis.bsky.social
Daniel Jones is up 35 points and about to go 4-1. Jaxson Dart is down 12 points to the 0-4 Saints. But tell me again how Jones was the Giants' problem. 🤡🤡
How does Brian Daboll still have a job?
#Giants #NYGiants #NYG #NFL
smachlis.bsky.social
Daily number of Bluesky posts with the #RStats hashtag (case insensitive) Sept. 1 - Oct 3, excluding the CRAN Package Updates bot.
Coded with the {bskyr} and {ggplot2} R packages.

[Posted via R script and weekly cron job. Tx for your patience if something went awry] #RStatsStats
Bar chart of daily #RStats posts. Amounts range from around 25 in September 2024 to peaking over 100 some days. Latest totals were 52 yesterday and 44 the day before.
Reposted by Sharon Machlis
chriskenny.bsky.social
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:
smachlis.bsky.social
As a former privacy and security reporter, I believe everyone should understand how a mobile phone can compromise their privacy (with advertisers as well as the government). US #privacy laws are completely inadequate. Meanwhile, there are a few things you can do ⬇️⬇️⬇️
smachlis.bsky.social
Thanks!! gtools::mixedsort() is new to me
#RStats
smachlis.bsky.social
Thanks so much! I look forward to trying it out this weekend!!
smachlis.bsky.social
I wish past me had known this when trying to sort election precincts! Instead of turning them all into ordered factors, which I don't like doing because the order doesn't "matter" except for human-readable display, it's not like precinct 1 is smaller than precinct 9.
smachlis.bsky.social
I was ready to split these with my own regex, sort the numeric and any letters (not all precincts have letters), and then rejoin them, which seemed possible but not what I wanted to spend time on. It's very handy to have a function that anticipates these types of real-world situations.
smachlis.bsky.social
x <- c("8", "10", "1", "40", "9A", "21A", "21B")
stringr::str_sort(x, numeric = TRUE)
[1] "1" "8" "9A" "10" "21A" "21B" "40"
smachlis.bsky.social
Not if you're doing election results where there are precincts like "21A", which is what I'm working on. Those throw NA for as.numeric().
smachlis.bsky.social
Just learned: It's so easy to sort strings that are numbers in proper numerical order with the {stringr} #Rstats 📦's `str_sort()` function and numeric = TRUE!!
x <- c("8", "10", "1", "40")
str_sort(x, numeric = TRUE)
[1] "1" "8" "10" "40"
smachlis.bsky.social
Thanks! I can always keep my other code for that if you don't have the time, meanwhile I'm going to use tinytable for my heatmap table.
smachlis.bsky.social
Heatmap table works great, so does filtering, but I've been working with Claude Sonnet 4.5 & Opus for awhile tonight, and together we haven't had much luck getting the colored bars the right size with the text overlay. I guess I should stick to DT for that one. Thank you so much for the work though!
smachlis.bsky.social
🤩 Wow!! THANKS!! I'll take a look tonight/tomorrow and let you know!!!
smachlis.bsky.social
And this is all the 2021 election visualizations I did for that race.
www.district2framingham.com/posts/2021-1...
I'm trying to make code more modular and scalable after attending @andrew.heiss.phd & @gosterhout.bsky.social 's Election Night Reporting Using R & Quarto #PositConf2025 presentation
Sisitsky Elected Framingham Mayor – Framingham District 2
News and events in and around District 2 in Framingham, MA, including Nobscot and Saxonville
www.district2framingham.com
smachlis.bsky.social
Wow, thanks!! Search probably isn't necessary for a table this small, I was thinking to take that out anyway, but the sorting would be important.
smachlis.bsky.social
Thanks!! 😍 I'm in the midst of updating a lot of code to re-do the way I display local election results on my little neighborhood blog, hopefully before our Nov. 4 election. This is a table I did 4 years ago - searchable, sortable, with the bar charts. Seems like I could try that in tinytable?
smachlis.bsky.social
I'm always on the lookout for interesting (and not too difficult) new ways to create tables in #RStats - especially adding visualizations to table columns.. I definitely need to give the {tinytable} 📦a try.
vincentab.bsky.social
{tinytable} 0.14.0 for #RStats makes it super easy to draw tables in html, tex, docx, typ, md & png.

There are only a few functions to learn, but don't be fooled! Small 📦s can still be powerful.

Check out the new gallery page for fun case studies.

vincentarelbundock.github.io/tinytable/vi...
a table about lemurs a table about students and schools a table about wines
Reposted by Sharon Machlis
jayrosen.bsky.social
If you wondered how many of the major newsrooms covering the Pentagon would give in to Pete Hegseth and sign a new agreement if they wanted to maintain access, it looks like the answer is... none. So far. Via @status.news
smachlis.bsky.social
@rladies.org FYI R-Ladies Boston has joined Bluesky, if you want to add them to your Starter Pack? @rladiesboston.bsky.social
[Also I'd love to be added if there's room!]