Sign in

Leonardo Hansa

@leonardohansa.com
1.1K followers 561 following 115 posts

Some companies prefer making decisions based on data rather than opinions. I can help deciding which data to use.

PostsRepliesMedia
Leonardo Hansa @leonardohansa.com · 06/05/2026
Yesterday I asked #Claude why a #python environment didn't work. It told me to remove it and create it again from scratch. It worked -Claude has learned from the best.
030
Reposted by Leonardo Hansa
Jumping Rivers @jumpingrivers.com · 21/04/2026
R 4.6.0 "Because it was There" is set for release on 24 April. @russhyde.bsky.social writes up the more interesting changes — %notin% in base R, neater character column summaries, and more. Full breakdown with code: www.jumpingrivers.com/blog/whats-n... #rstats #datascience #rprogramming
03011
Reposted by Leonardo Hansa
ESA Exploration @exploration.esa.int · 06/04/2026
👨‍🚀 The #Artemis II crew are now further from home than any humans ever, and European engines brought them there 🚀. 🌍 The record of 400 171 km was previously held by the Apollo 13 mission 🌕.
(April 6, 2026) In this fully illuminated view of the Moon, the near side (the hemisphere we see from Earth), is visible on the right. It is identifiable by the dark splotches that cover its surface. These are ancient lava flows from a time early in the Moon’s history when it was volcanically active. The large crater west of the lava flows is Orientale basin, a nearly 600-mile-wide crater that straddles the Moon’s near and far sides. Orientale's left half is not visible from Earth, but in this image we have a full view of the crater. Everything to the left of the crater is the far side, the hemisphere we don’t get to see from Earth because the Moon rotates on its axis at the same rate that it orbits round us.

Image Credit: NASA
101040336
Reposted by Leonardo Hansa
Richard McElreath 🐈‍⬛ @rmcelreath.bsky.social · 22/03/2026
Statistical Rethinking 2026 is done: 20 new lectures emphasizing logical and critical statistical workflow, from basics of probability theory to causal inference to reliable computation to sensitivity. It's all free, made just for you. Lecture list and links: github.com/rmcelreath/s...
12678215
Leonardo Hansa @leonardohansa.com · 04/03/2026
"The unfortunate truth about data is that nothing much can be done with it, until we theorize about what caused it" (Richard McElreath)
000
Reposted by Leonardo Hansa
Jeremy Allen @jeremy-data.bsky.social · 21/02/2026
#RStats is up baby www.infoworld.com/article/4129...
infoworld.com
Python is slipping in popularity – Tiobe
The world’s most popular programming language is losing market share to more specialized languages such as R and Perl, Tiobe says.
4619
Leonardo Hansa @leonardohansa.com · 12/02/2026
Strange but efficient way of updating values on a list in R. Makes sense after you're explained how object copies work. kaizen-r.github.io/posts/2026-0... #rstats
050
Leonardo Hansa @leonardohansa.com · 14/01/2026
I guess a near next step on AI is allowing ads on chats. You pay chatgpt/gemini for being mentioned when conversations are about the subject you pay for. And the AI recommends you in a natural way, like "have you heard of Leonardo Hansa? He shares nice content on data on his newsletter..."
000
Leonardo Hansa @leonardohansa.com · 25/11/2025
forcats is my second favorite R library I never use. My favorite one is still purrr. forcats.tidyverse.org/articles/for... #rstats
forcats.tidyverse.org
Introduction to forcats
070
Reposted by Leonardo Hansa
Richard McElreath 🐈‍⬛ @rmcelreath.bsky.social · 17/11/2025
Contemplating format for my Statistical Rethinking course in January. In recent years, felt too many students can't keep up, fall behind in 2nd half. Maybe I should offer two sections: beginner, advanced. Beginner is first half of content, at half speed. Advanced is 2nd half, also half speed. ?
16742
Reposted by Leonardo Hansa
Thiago Ferrer Morini @tferrer.journa.host.ap.brid.gy · 18/11/2025
Se cae Cloudflare y páginas web de todo el mundo se caen. Españoles: elpais.com/tecnologia/2025-11-18/un…
Meme del señor a punto de ser ahorcado que mira a su compañero de patíbulo y le pregunta: "¿Es la primera vez?"
26141
Leonardo Hansa @leonardohansa.com · 11/11/2025
Every time I open PowerPoint I think: "So we're living in the era of Artificial Intelligence"
000
Leonardo Hansa @leonardohansa.com · 10/10/2025
The belief that numbers offer a single, objective description of reality overlooks a crucial truth: data does not speak for itself. Every dataset results from choices, which inevitably reflect implicit, and sometimes ideological, assumptions. arxiv.org/abs/2507.03628 @freakonometrics.bsky.social
arxiv.org
When Numbers Mislead Us
The belief that numbers offer a single, objective description of reality overlooks a crucial truth: data does not speak for itself. Every dataset results from choices-what to measure, how, when, and w...
010
Leonardo Hansa @leonardohansa.com · 31/08/2025
Lately the sentence I say the most is "I don't remember"
030
Leonardo Hansa @leonardohansa.com · 22/08/2025
What alternative to Google Calendar do you like? Notion, Proton...? #android #app #calendar #productivity
100
Reposted by Leonardo Hansa
Compute! Paris @computeparis.bsky.social · 15/08/2025
📢 Talk Announcement "From Jupyter Notebook to Publish-Ready Report: Effortless Sharing with Quarto", by @cderv.bsky.social from @posit.co. 📜 Talk info: pretalx.com/pydata-paris-2025/talk/K7CAAE 📅 Schedule: pydata.org/paris2025/schedule 🎟 Tickets: pydata.org/paris2025/tickets
023
Leonardo Hansa @leonardohansa.com · 01/08/2025
Have you read this by @anthropic.com ? Any explanation for dummies? Are they saying that not-so-random number sequences might hide info only readable by AI? alignment.anthropic.com/2025/sublimi... #llm
alignment.anthropic.com
Subliminal Learning: Language Models Transmit Behavioral Traits via Hidden Signals in Data
000
Leonardo Hansa @leonardohansa.com · 29/07/2025
Have you ever loved saving money so much that you've WALKED from an airport to the city center?
000
Leonardo Hansa @leonardohansa.com · 12/07/2025
On a ML Explainability course, the author compares one concept with coeffs on a linear regression. Then says: “if you don't know about linear regression forget about this comparison”. My question: how on earth someone who doesn't know about linear regression is studying ML? #ML #stats
030
Reposted by Leonardo Hansa
Pete Wung The Curious Polymath @curiouspolymath.bsky.social · 19/06/2025
#statistics #mathsky
1122
Reposted by Leonardo Hansa
Paola Tellaroli @tellarpao.bsky.social · 20/06/2025
Happy early summer weekend, #stats!
171
Leonardo Hansa @leonardohansa.com · 05/06/2025
«América se tragaba a Europa. »—Nos comen. Somos pobres, muy pobres. Unos miserables que solo entendemos de tomar el sol.» La Regenta, Leopoldo Alas, Clarín (1884)
000
Leonardo Hansa @leonardohansa.com · 03/06/2025
We should first define 'dead' for answering the question below. As examples: - Is Pascal dead? - Is Fortran dead? - Is SPSS dead? (alas this one isn't)
120
Leonardo Hansa @leonardohansa.com · 03/06/2025
I'm reading lately lots of posts by R users claiming R is not dead. Does it mean that R is almost dead? #rstats
100
Leonardo Hansa @leonardohansa.com · 31/05/2025
On bubble plots, what should the bubble size variable be associated to: the radius or the area? #dataviz
000
Reposted by Leonardo Hansa
Autumn Nash 🎃👻💀🖤 @withenoughcoffee.bsky.social · 31/05/2025
Help internet where can I buy this hoodie
1536
Leonardo Hansa @leonardohansa.com · 30/05/2025
Estimates are distributions, points are decisions (Richard McElreath)
020
Leonardo Hansa @leonardohansa.com · 29/05/2025
20 #pandas one-liners. No idea about some of them, and seem pretty elegant www.nb-data.com/p/20-pandas-... Via #TLDRData #python
nb-data.com
20 Pandas One-Liners That Can Save You Hours of Work
Simple code that you should not miss at all
000
Leonardo Hansa @leonardohansa.com · 19/05/2025
While attending online meetings, today I'm listening to Marin Marais by Brandon Acker and Craig Trompeter in the background. It's the only thing worth it in today's meetings.
010
Leonardo Hansa @leonardohansa.com · 08/05/2025
Some people say AI will take out my job... Looking forward to it! 🎉 The poor thing it's going to get so bored that it'll beg me to give it back.
000
Leonardo Hansa @leonardohansa.com · 07/05/2025
I'm starting to love Information Theory. I tried some weeks ago these lectures from Oxford Uni but were too much for me, as a beginner. I've read some texts about the subject and understand much better the intuition. Am I now ready for the lectures? Let's try www.youtube.com/watch?v=ScX2...
youtube.com
Information Theory, Lecture 1: Defining Entropy and Information - Oxford Mathematics 3rd Yr Lecture
YouTube video by Oxford Mathematics
030
Reposted by Leonardo Hansa
Simon Smart @simonsmart.bsky.social · 29/04/2025
Being able to cancel and restart slow-running jobs in shiny with {mirai} is a bit of a game-changer #rstats Full app in alt text / gist.github.com/simon-smart8... with a method for updating progress too
library(shiny)
library(bslib)
library(mirai)

daemons(1)
onStop(function() daemons(0))

ui <- page_fluid(
  p("The time is ", textOutput("current_time", inline = TRUE)),
  hr(),
  numericInput("n", "Sample size (n)", 100),
  numericInput("delay", "Seconds to take for plot", 5),
  actionButton("btn", "Go"),
  textOutput("progress_log"),
  plotOutput("plot"),
)

my_func <- function(x, y, file){
  writeLines(paste0("Starting..."), file)
  for (i in 1:y){
    Sys.sleep(1)
    writeLines(paste0("Step ", i, " complete"), file)
  }
  writeLines(paste0("Finished"), file)
  runif(x)
}

server <- function(input, output, session) {

  progress_file <- tempfile()

  output$current_time <- renderText({
    invalidateLater(1000)
    format(Sys.time(), "%H:%M:%S %p")
  })

  task_var <- NULL
  task <- ExtendedTask$new(
    function(...) task_var <<- mirai(run(...), environment(), .args = list(run = my_func))
  )

  observeEvent(input$btn, {
    if (task$status() == "running"){
      mirai::stop_mirai(task_var)
    }
    task$invoke(input$n, input$delay, progress_file)}
  )

  output$plot <- renderPlot({
    if (task$status() == "success"){
      hist(task$result())
    }
  })

  progress_reader <- reactiveFileReader(100, session, progress_file,
                                        readFunc = function(file) {
                                          if (file.exists(file)) {
                                            readLines(file)
                                          }
                                        }
  )

  output$progress_log <- renderPrint({
    cat(paste(progress_reader(), collapse = "\n"))
  })

}

shinyApp(ui = ui, server = server)
1114
Leonardo Hansa @leonardohansa.com · 27/04/2025
"As programmers use more AI-written code, debugging may end up being the only remaining programming skill. But for some reason, the vast majority of programming content is about writing code well, not about debugging. What’s different about debugging?" www.seangoedecke.com/debugging/ #coding
seangoedecke.com
Debugging, emotional resilience, and mental models
Being good at debugging is more useful than being good at writing code - you only write a piece of code once, but you may end up debugging it hundreds of times…
020
Reposted by Leonardo Hansa
Jörn Alexander Quent @jaquent.bsky.social · 21/04/2025
For #rstats people working on computing environments without GUI, you should check out the package `txtplot`. E.g. this density plot is pretty useful to get an idea what my data looks like:
16018
Leonardo Hansa @leonardohansa.com · 20/04/2025
Computer questions: 🧐 Do you have a laptop AND a desktop? 🤔 If so, what do you use your desktop for?
100
Reposted by Leonardo Hansa
Andrew Heiss @andrew.heiss.phd · 18/04/2025
Thing I just learned in #rstats: unz() lets you connect to a .zip and load files from inside it without actually unzipping it (great for a file I'm working with that's 30 MB zipped and 1+ GB unzipped, with multiple CSVs in it)
# unz() lets you connect to a .zip and treat it like a mini file system, 
# and you can load files from inside it
one_zipped_csv_among_others <- readr::read_csv(
  unz("lotsa_zipped_csvs.zip"), "one_csv.csv"
)

# readr::read_csv() can read a .zip with a single CSV in it
one_zipped_csv <- readr::read_csv("big_zipped_file.zip")
1023446
Reposted by Leonardo Hansa
Carlos Briones @brionesci.bsky.social · 18/04/2025
En menos de media hora empieza el directo en el canal de Instagram de Javier Santaolalla: hablaremos sobre vida (terrestre y extraterrestre), biomarcadores, dimetilsulfuro, exoplanetas, grandes preguntas y retos de la ciencia… y por qué ambos viajamos #ABordoDeTuCuriosidad 😊
1105
Leonardo Hansa @leonardohansa.com · 15/04/2025
For the last few weeks, the only thing that motivates me in my job is helping others when I can. The rest of my duties (internal products, some client work) are of no interest to me anymore. Is it time to look for something else? (I don't think anyone in my company reads Bluesky 😂)
110
Leonardo Hansa @leonardohansa.com · 15/04/2025
After so many years, this video is still so powerful. The introduction perhaps even more than the song itself. One of my favorite versions. #bobdylan #steviewonder youtu.be/WZnv6qLWPy4?...
youtu.be
Stevie Wonder - Blowin' in the Wind Bob Dylan - The 30th Anniversary
YouTube video by shmuel madhani
000
Leonardo Hansa @leonardohansa.com · 06/04/2025
«If you are slave to A/B tests, and that informs all your decisions… you will eventually end up selling porn.» (read somewhere)
020
Leonardo Hansa @leonardohansa.com · 01/04/2025
A company should allow their employees to use whichever tool they need. Restricting your developers to use an IDE, a OS or a GenAI supplier it's just a way of reducing productivity.
010
Leonardo Hansa @leonardohansa.com · 30/03/2025
On our next podcast episode, @joscani.muestrear-no-es-pecado.es and I talk about how to correct your model's optimism using bootstrap. You train your model on each sample and compare its fitness metric against the original sample. The average of differences is your correction. Soon on Spotify
001
Leonardo Hansa @leonardohansa.com · 30/03/2025
Have you ever done a bootstrap plot? I don't know if it's valid, or even useful, but I just have. Just for fun. Sepal Length bootstrap density #rstats #dataviz
281
Reposted by Leonardo Hansa
Jules @zjuul.net · 27/03/2025
In 1998, I chose to learn Perl, not Python - for administering Unix servers In 2013, I chose to learn R, not Python - for Data Analysis and modeling 💕 In 2025, I need to finally learn Python - for finding bugs in the code that AI spits out for me 🫠 #rstats #python
3244
Reposted by Leonardo Hansa
Libby Heeren @libbyheeren.bsky.social · 26/03/2025
Hey, who all is doing the #30DayChartChallenge this year?! 📣 Sound-off so I can follow you! #databs 📌 Pin this feed to follow along: bsky.app/profile/did:... I'm going to try to keep up using #TidyTuesday data and definitely challenging myself to do #PydyTuesday, so a mix of #python and #rstats 👏🏻
6237
Leonardo Hansa @leonardohansa.com · 18/03/2025
For quick tests these days I'm using R GUI. I've just realised one of the most accessible buttons is the `Print` button. Who on Earth (and when) could be interested on printing a script? #rstats #20thCentury
230
Leonardo Hansa @leonardohansa.com · 08/03/2025
'Comparing the posterior to the prior can help seeing how much information the model extracted from the data. When posterior and prior are similar, the calculations might be right -you got the right answer to what you asked. What you might need is a better question.' @rmcelreath.bsky.social
000
Leonardo Hansa @leonardohansa.com · 06/03/2025
Where should be the limits of cybersecurity measures? The most effective cybersecurity measure is avoiding your users doing anything at all. But it's not recommendable. We're going in that direction where I work... I had never before considered leaving a job because of IT.
030
Leonardo Hansa @leonardohansa.com · 04/03/2025
Past events that made programming easier didn't make programmers disappear. Instead, more people started working on programming. LLMs shouldn't be any different. www.oreilly.com/radar/the-en... via @oreilly.bsky.social
oreilly.com
The End of Programming as We Know It
011