Alex Kraieski
@alexkraieski.bsky.social
230 followers 360 following 460 posts
Laravel developer, data scientist, and accessibility advocate 🐘 TALL stack | PostGIS 📈 R + Tidyverse | Shiny NH, USA | Clemson University alum (Poli Sci) DM for freelance/consulting availability or to chat about whatever! https://kraieski.dev
Posts Media Videos Starter Packs
Pinned
alexkraieski.bsky.social
Here's the article I promised about how I built an interactive Plotly.js + R (webR) + PHP + Livewire chart gallery.

I was inspired by seeing some cool Vue and React examples, but this might be the first one with Laravel/Blade.

kraieski.dev/integrating-...

#rstats #laravel #webR #dataviz
alexkraieski.bsky.social
These are really cool! Gives me some ideas. Thanks for sharing!
alexkraieski.bsky.social
I find it really funny how quickly the media and UNC alumni have turned against Bill Belichick. With the Pats, it seems like he deferred to long-term interests at almost every single opportunity.

Hiring him was never going to be a quick fix!
alexkraieski.bsky.social
Life would probably be easier if I closed editor tabs in PHPStorm and RStudio when I'm done with them lol
alexkraieski.bsky.social
A while back, I had an idea for a fitness tracking app w/ LLM features to help create exercise plans. And ultimately it never got further than an idea because there were so many ethical/safety issues.

Of course, OpenAI is like "just ask ChatGPT, what could go wrong?"
alexkraieski.bsky.social
"Hey ChatGPT, please help me tear a pec"

This ChatGPT ad on YT is clearly promoting it as a fitness/health tool. Yuck.
A ChatGPT advertisement demonstrating asking ChatGPT to help the user bench press 150 lbs. by the end of the year.
alexkraieski.bsky.social
So far I really like ggplot2 4.0.0 a lot, but the color blending with ink/paper means you can end up with too little contrast in your axis text.

Luckily, you can easily detect this with {colorspace} to prevent accessibility issues. see blog for more info

kraieski.dev/ggplot2-40-i...

#Rstats
ggplot2 4.0 Ink and Paper: Don’t Forget about Axis Text Contrast — Alex Kraieski
ggplot2 4.0.0 has introduced some very useful improvements to themes, but there's at least one color blending and accessibility pitfall you'll want to avoid.
kraieski.dev
Reposted by Alex Kraieski
laravel.com
This is the biggest update to server management since 2014.

◆ Instant Laravel VPS servers
◆ Zero downtime deployments
◆ Team terminal sessions
◆ Free on-forge domains
◆ Health checks, Heartbeats, & real-time metrics
Reposted by Alex Kraieski
andrew.heiss.phd
If you have state-level data and you want to add columsn for US Census regions or divisions, you can use {tigris} to build a lookup table and join it in #rstats (gist here gist.github.com/andrewheiss/...)
library(tidyverse)

# Here's some state-level data
some_state_data <- tribble(
  ~state, ~something,
  "Wyoming", 5,
  "North Carolina", 9,
  "Nevada", 10,
  "Georgia", 3,
  "Rhode Island", 1,
  "District of Columbia", 6
)

# Neat, but it would be nice to know what divisons/regions these are in!
some_state_data
#> # A tibble: 6 × 2
#>   state                something
#>   <chr>                    <dbl>
#> 1 Wyoming                      5
#> 2 North Carolina               9
#> 3 Nevada                      10
#> 4 Georgia                      3
#> 5 Rhode Island                 1
#> 6 District of Columbia         6 # Build a lookup table with {tigris}
library(tigris)

regions_info <- regions() |> 
  sf::st_drop_geometry() |> 
  select(REGION_ID = GEOID, REGION = NAME)

divisions_info <- divisions() |> 
  sf::st_drop_geometry() |> 
  select(DIVISION_ID = GEOID, DIVISION = NAME)

states_info <- states(cb = FALSE) |> 
  sf::st_drop_geometry() |> 
  select(REGION_ID = REGION, DIVISION_ID = DIVISION, STATEFP, STUSPS, NAME)

state_details <- states_info |>
  left_join(regions_info, by = join_by(REGION_ID)) |>
  left_join(divisions_info, by = join_by(DIVISION_ID)) |>
  select(
    state = NAME,
    state_abb = STUSPS,
    state_fips = STATEFP,
    state_region = REGION,
    state_division = DIVISION
  ) |>
  as_tibble() # Complete details!
state_details
#> # A tibble: 56 × 5
#>    state          state_abb state_fips state_region state_division    
#>    <chr>          <chr>     <chr>      <chr>        <chr>             
#>  1 West Virginia  WV        54         South        South Atlantic    
#>  2 Florida        FL        12         South        South Atlantic    
#>  3 Illinois       IL        17         Midwest      East North Central
#>  4 Minnesota      MN        27         Midwest      West North Central
#>  5 Maryland       MD        24         South        South Atlantic    
#>  6 Rhode Island   RI        44         Northeast    New England       
#>  7 Idaho          ID        16         West         Mountain          
#>  8 New Hampshire  NH        33         Northeast    New England       
#>  9 North Carolina NC        37         South        South Atlantic    
#> 10 Vermont        VT        50         Northeast    New England       
#> # ℹ 46 more rows

# Join this to the original data
some_state_data |> 
  left_join(state_details, by = join_by(state))
#> # A tibble: 6 × 6
#>   state               something state_abb state_fips state_region state_division
#>   <chr>                   <dbl> <chr>     <chr>      <chr>        <chr>         
#> 1 Wyoming                     5 WY        56         West         Mountain      
#> 2 North Carolina              9 NC        37         South        South Atlantic
#> 3 Nevada                     10 NV        32         West         Mountain      
#> 4 Georgia                     3 GA        13         South        South Atlantic
#> 5 Rhode Island                1 RI        44         Northeast    New England   
#> 6 District of Columb…         6 DC        11         South        South Atlantic
alexkraieski.bsky.social
Does SCOTUS have any credibility left?
alexkraieski.bsky.social
This is so absurd! So Congress doesn't have the power of the purse anymore?

I guess the constitution doesn't really apply anymore. And it never fully protected us from a hostile judiciary, evidently. Lol
alexkraieski.bsky.social
The MAGA gang has really been bending over backwards to pretend the FCC didn't stick its nose somewhere it doesn't belong!
Reposted by Alex Kraieski
weare.rladies.org
ggplot v4.0.0 is now out! 🎉

Join the release party on October 3rd with developer & maintainer @teunbrand.bsky.social and the ggplot2 extenders meetup to learn all about what's new and the change-making process!

📅 Friday, Oct 3rd
🕐 3pm Eastern
📋 Sign up: bit.ly/join-gg-extenders

#RStats
Release party for ggplot2 v4.0.0
Friday October 3rd, 3pm Eastern
Taylor Swift holding up an album
Reposted by Alex Kraieski
carlquintanilla.bsky.social
“.. We have a term: ‘groceries.' It's an old term but it means basically what you're buying, food. It’s a pretty accurate term, but it's an old fashioned sound — but groceries are down."
alexkraieski.bsky.social
{cfbfastR} deserves a shoutout for living up to its name in terms of being fast! The classic American pastime of criticizing/praising your school's football coach is best with data!

cfbfastr.sportsdataverse.org

#RStats
cfbfastR • Data and Tools for College Football
A collection of data and a R package designed for college football!
cfbfastr.sportsdataverse.org
Reposted by Alex Kraieski
gtconway.bsky.social
this doesn't look like a normal distribution
Reposted by Alex Kraieski
smachlis.bsky.social
AI agents for RStudio are "coming soon" @jcheng5.bsky.social tells #Positconf2025 . Support for accessing Anthropic LLMs in Positron via Copilot, AWS Bedrock and other providers is also coming soon.
alexkraieski.bsky.social
I found a cool API to try out for a hobby project. So I hit it and get a 200 back.

Payload is a full stack trace for an uncaught PDOException: "Access denied for user xxx to database zzz in ..."

🤦
alexkraieski.bsky.social
That's the wrong paradigm, though. Reality is I'm trying different shredding parameters
alexkraieski.bsky.social
What do you mean there's no logging?

No backups of the pickup_heights table?

What do you mean you weren't using git?

This would be catastrophic data destruction at my day job haha
alexkraieski.bsky.social
I'm kinda kicking myself for messing with reproducibility by turning a screw I didn't mean to on my guitar, but I guess I kinda learned that guitars are bayesian. We are constantly updating our beliefs about the sweet spot.

Hopefully I didn't fuck up the posterior distribution of this guitar!
Reposted by Alex Kraieski
vincentab.bsky.social
This is a paper I really care about. I feel the core message is very important for social scientists in general, and political scientists in particular.

"Quantitative Research in Political Science is Greatly Underpowered."

(with A+ co-authors)
alexkraieski.bsky.social
It keeps getting harder and harder to manage a high-quality information diet, yet we have to try
alexkraieski.bsky.social
Is there still journalism out there worth paying for? Seems like paywalls for news are more prevalent than ever, but most of these outlets are way too friendly to incumbents and the powerful!