from Hacker News

Why R is the best coding language for data journalism

by countrymile on 12/18/24, 9:07 PM with 12 comments

  • by Jimmc414 on 12/19/24, 4:19 AM

  • by nickm12 on 12/19/24, 7:31 AM

    Maybe things have changed since I last programmed seriously in R nearly 10 years ago, but back then the language had serious design flaws that made it way too easy to write incorrect programs. Conflating scalar and vector types, weak typing, and various other design choices led to hard to fix bugs, even you even realized the answers were incorrect. Proponents of strong static typing might say the same sorts of things about Python, but Python is much better than R in this regard.

    I would hope that data journalism, like any other kind of journalism, would care about correctness.

  • by aplzr on 12/19/24, 12:54 PM

    The article lists a few things that you can do with R, but fails to make good on its headline promise: explaining why R is the best language for data journalism.

    To me, and I think to many other people as well, the language most suited for anything data-related is Python, not R. I might be wrong, but If I am I won't know it after reading this article, because it doesn't compare R to other options on the table. R is only the best at something if it offers advantages over the other options, and to be honest I very much doubt that this is the case when comparing against Python.

    Anecdotally, a number of years ago at university I took a class titled "Statistical programming with R" because I had heard good things about it and was looking forward to a chance to learn a new tool. Unfortunately I learned pretty quickly that I had to fight R every step of the way to get it to do what I wanted. Everything seemed arcane, convoluted, and complicated. Went back to Python and never looked back. I don't doubt that one can do great things with R, but the effort needed to get there simply doesn't seem worth it to me when Python seems so much more accessible.

    Having said all that, I would be quite interested in a comparison of typical data science (or data journalism) tasks in both R and Python by someone who is good at both. After having read the article headline I had hoped it went into that direction. I was disappointed to see that it's essentially just a statement of opinion that isn't backed up in any meaningful way.