Sign in

John MacKintosh

@johnmackintosh.bsky.social
2.3K followers 327 following 46 posts

Data work in the NHS, Scotland. Here for #RStats and #dataviz only Formerly HighlandR , still at johnmackintosh.com/blog

PostsRepliesMedia
Reposted by John MacKintosh
Neil Pettinger @kurtstat.bsky.social · 07/10/2026
In which I'll be wondering out loud if #rstats can take a leaf out of the relative linguists' book and use the language conventions of R scripts to help analysts create more cross-silo data visualizations.
031
John MacKintosh @johnmackintosh.bsky.social · 07/10/2026
I've just submitted two more to their list 😄
010
John MacKintosh @johnmackintosh.bsky.social · 06/10/2026
data.table is the first package I load, and is often the only one I need for wrangling. I love its rock solid reliability. The introduction of `let` (instead of the walrus syntax) to create new columns really works for me. It's much simpler to read and write. My favourite R package by a long way.
120
John MacKintosh @johnmackintosh.bsky.social · 06/10/2026
johnmackintosh.com/blog/ If I was actually any good at tedious self promotion, I'd have included this link in the original post to tempt you. Anyway, important PSA: My old site domain is no longer mine or under my control. Id stay away from it. More details on the first post here:
johnmackintosh.com
Writing
Of around 100 posts since 2016, these are the ones readers liked most, or which remain most useful despite changes to R code and packages.
020
John MacKintosh @johnmackintosh.bsky.social · 05/10/2026
My website has undergone a much needed refresh. I maybe can't tempt you with any decent #rstats posts, but there are some nice pics of the Highlands instead, if you like that kind of thing.
150
John MacKintosh @johnmackintosh.bsky.social · 28/09/2026
Fantastic work. This looks extremely useful.
110
John MacKintosh @johnmackintosh.bsky.social · 26/09/2026
Any any blog with AI images is an automatic skip, I won't read it. Writing blogs for yourself is always a better idea. It's impossible to know who is reading your blog so how can you cater to them? That said, mine is completely broken at present and I have no real desire to bring it back
010
John MacKintosh @johnmackintosh.bsky.social · 23/09/2026
"The first step on the path to AI finally deciding to destroy humanity can be traced back to when an apparently benign bash script was run on behalf of some bloke called Keith" Nah, just kidding, sure it'll be fine. I would ask it to explain the bash stuff in case it's useful in the future.
000
John MacKintosh @johnmackintosh.bsky.social · 23/09/2026
If I'm stuck on some obscure RMarkdown or quarto workflow issue, or other tedious stuff that I did not learn R for, I'll hand that over. Not proud of it, but as you say, sometimes it unblocks what would be days of experimenting. If I can write the code, I write the code. I need that ownership
010
John MacKintosh @johnmackintosh.bsky.social · 22/09/2026
I use walk() way more than map() I've never found that "don't care about the output" description very intuitive, if I don't care, why am I doing it? I very much care about my plots. I mainly use walk() to create plots iteratively. To me, it's "do the thing but don't show it to me right now".
120
John MacKintosh @johnmackintosh.bsky.social · 22/09/2026
Altering legends, combining different scales and the subsequent legend related chaos. Axis limits topping out just below the maximum value in the data (I like about of headroom) and anything to do with labelling individual points and or the automating thereof
160
John MacKintosh @johnmackintosh.bsky.social · 23/06/2026
🏴󠁧󠁢󠁳󠁣󠁴󠁿 Loving the 3rd place tracker 🏴󠁧󠁢󠁳󠁣󠁴󠁿 Would love us to beat Brazil obviously but I think we will be looking to be in that top 4 of third places sides
111
John MacKintosh @johnmackintosh.bsky.social · 10/03/2026
Yeah pretty sure ease of access / updating and portability was behind this. If I remember correctly, the day I demoted this I had to make some changes (like, an hour beforehand) and being able to just tweak the yaml and run it was much easier that rooting through individual files. Would do it again
010
John MacKintosh @johnmackintosh.bsky.social · 10/03/2026
This kind of thing? github.com/johnmackinto... I stored server and table names in yaml config file, then used those to loop through the database tables, return data and populate shiny app. It's in the generate_app_data script (I think).
github.com
GitHub - johnmackintosh/scodas-dbexplorer: loop over database tables using dynamic SQL via R, and and display results in shiny app
loop over database tables using dynamic SQL via R, and and display results in shiny app - johnmackintosh/scodas-dbexplorer
120
John MacKintosh @johnmackintosh.bsky.social · 18/02/2026
Was your prompt "get this package to a state I'm happy with, in just a few lines of code"? Awesome, I was actually looking at this on GitHub a week or so ago and noticed some activity. Will be brilliant to have this on CRAN as I have absolutely had it with annotating plots via trial & error
240
John MacKintosh @johnmackintosh.bsky.social · 26/09/2025
I always understood it as not being safe in a script you might share with others, as running that code may remove objects that they require for their analysis. If you don't share code, then do what you want, and enjoy shouting at yourself if things go wrong 😁
050
John MacKintosh @johnmackintosh.bsky.social · 04/08/2025
Clubcard FTW
media.tenor.com
a man in a purple suit is laughing with the words points baby
ALT: a man in a purple suit is laughing with the words points baby
010
John MacKintosh @johnmackintosh.bsky.social · 04/08/2025
I've just accidentally scanned this in Tesco. Cost me £2.99
110
John MacKintosh @johnmackintosh.bsky.social · 29/05/2025
Wait - are these not there for you?
110
John MacKintosh @johnmackintosh.bsky.social · 17/05/2025
Really nice I've been working with population pyramids too. Waiting for some updated projections. The shape of the pyramids is wildly different. I've used a similar approach in the past - looping to create separate images then stitched together to make a gif. I used {gifski} which was pretty fast.
130
John MacKintosh @johnmackintosh.bsky.social · 26/04/2025
music.youtube.com/watch?v=7idy... One of the best live rock bands right now, this will have you tapping your foot and singing along (badly, in my case)
music.youtube.com
Consume
YouTube video by The Warning - Topic
160
John MacKintosh @johnmackintosh.bsky.social · 25/04/2025
It seems that it's very difficult to write about tidy evaluation without a bunch of extra, increasingly confusing theory, and has been the case since it was introduced. "Oh you're drowning in the meta programming waters..would you like some MORE SEA?" No, get me to land, with a towel and dry socks
160
John MacKintosh @johnmackintosh.bsky.social · 25/04/2025
Would you consider adding these 2 tweets or a summary of them to your blog post as a TL/DR? Would be immensely helpful for future reference
360
John MacKintosh @johnmackintosh.bsky.social · 12/04/2025
Haven't seen {reactablefmtr} mentioned, but you can create some beautiful reactive tables with it. Other than that, flextable is my day to day choice (due partly to its excellent MS Word support)
150
John MacKintosh @johnmackintosh.bsky.social · 03/04/2025
Glad to be of help @kurtstat.bsky.social and amazing to see that you will be discussing this at EdinbR later this month 👍
020
John MacKintosh @johnmackintosh.bsky.social · 02/04/2025
You can interact with this at johnmackintosh.github.io/small-area-shiny/ Yes, I should have thought of a better name #rstats
johnmackintosh.github.io
Shiny App
000
John MacKintosh @johnmackintosh.bsky.social · 02/04/2025
Thanks @brodriguesco.bsky.social I will share later I hope y"all spotted the reverse psychology: "Not going to win any awards.." and I fully expect to be nominated for everything, including, but not limited to, chart of the year, plot of the decade, and graphic of the century.
120
John MacKintosh @johnmackintosh.bsky.social · 01/04/2025
Not going to win any awards but I'm quite pleased with this. Firstly, it's my first dabble with shinylive. Secondly, apart from shiny itself, it's all base R, no other packages. I do need to brush up on my shiny layouts though.. #rstats
Screenshot of a shiny app with a population pyramid. The app allows selection of one of thirteen geographical boundaries.
There are dark blue bars on the left of the pyramid representing counts of males, in five year age bands from 0 to 90+
Light blue bars represent counts of females.
2253
John MacKintosh @johnmackintosh.bsky.social · 22/03/2025
Facets might prove useful also. I think I played around with transparency at the time but , as you discovered, it doesn't work..
110
John MacKintosh @johnmackintosh.bsky.social · 14/02/2025
Delighted to make it in among the highlights of the always excellent RWeekly and to hear my work being discussed on the podcast too. Thanks guys @rpodcast.bsky.social
091
John MacKintosh @johnmackintosh.bsky.social · 11/02/2025
At least you got rid of the unnecessary gridlines...(one of my pet peeves is when I see any form of process control chart with extraneous gridlines on it) grey / amber / blue ?
210
John MacKintosh @johnmackintosh.bsky.social · 20/01/2025
Brilliant, thanks.
010
John MacKintosh @johnmackintosh.bsky.social · 15/01/2025
www.manning.com/books/beyond... I really like this book, fills in a lot of gaps that aren't addressed elsewhere, including R4DS.
010
John MacKintosh @johnmackintosh.bsky.social · 08/01/2025
You might like to look at {capsule). renv was a headache for me on a Windows network share, although it is fine (relatively) on local drive. Depending on the scale of the project, capsule might be worth your time github.com/MilesMcBain/...
github.com
GitHub - MilesMcBain/capsule: An inversion of renv for low effort reproducible R package libraries
An inversion of renv for low effort reproducible R package libraries - MilesMcBain/capsule
020
John MacKintosh @johnmackintosh.bsky.social · 01/01/2025
Thanks Christian. I think / hope I've been usurped since then 😄
110
John MacKintosh @johnmackintosh.bsky.social · 24/12/2024
I've built pretty much every main chart type in PowerBI, including xmr-s, and Laney corrected U-charts, but not in a position to share any of that just yet. There are some good add-ins for PBI already though.
010
John MacKintosh @johnmackintosh.bsky.social · 24/12/2024
Just checked that link to xmrit, and find links to my work in Qlik (and my spccharter R package, which is still a bit of WIP) These things must come and go in cycles. When I learned about them, it was "nothing new" & healthcare was seen as lagging behind industry. Now many resources are from h/c
120
John MacKintosh @johnmackintosh.bsky.social · 06/12/2024
Imagine you have a lot of data that is related, and should be in a database / data warehouse, but isn't, and likely won't ever be (for whatever reason) Create your own database locally with duckdb. Bonus, write dplyr code for querying it (via duckplyr)
1130
John MacKintosh @johnmackintosh.bsky.social · 27/11/2024
I remember being OK with ggplot2, but struggling with data manipulation on a daily basis (I was still up to my neck in Excel and also learning SQL at the same time. When dplyr first came out, it was like someone finally turned the lights on.
040
John MacKintosh @johnmackintosh.bsky.social · 27/11/2024
group_by() behaviour in dplyr has changed a few times over the years. I wanted to piece together a history of what changed and when, and the feedback that got it to its current position (I remember "peeling off of layers" causing some angst). I never got round to it, but would be interesting..
020
John MacKintosh @johnmackintosh.bsky.social · 26/11/2024
Now I need to write one called "Move your (f)ac(ets) to argue that faceting should be done way earlier
110
John MacKintosh @johnmackintosh.bsky.social · 30/10/2024
I had issues with the R diagnostics somehow loading package namespaces. I couldn't update packages as was in an infinite loop of restarting. I turned off the diagnostics (not ideal) under global options and the issue resolved.
110
John MacKintosh @johnmackintosh.bsky.social · 27/10/2024
This is fantastic - the best data related blog post I've read in years. Thanks for taking the time to plan and write such an informative guide. It's given me a great guide to planning a transition towards a more structured data repository for our team.
110
Reposted by John MacKintosh
Jenna Jordan @jennajordan.me · 22/01/2024
Please check it out, and feel free to share and let me know what you think! jennajordan.me/blog/transfo...
jennajordan.me
The Transformation Flow, Part 1 - building intuition | Jenna Jordan
preparing to dive deeper into the flow of transformations in an analytical data warehouse
011
Reposted by John MacKintosh
Jenna Jordan @jennajordan.me · 16/08/2023
I promised myself that with my website relaunch I would start writing more (and in particular writing about my work), so here's the first blog post to keep that promise: an introduction to analytical data warehouses jennajordan.me/blog/analytical-data…
jennajordan.me
Analytical Data Warehouses - an introduction | Jenna Jordan
what? how? why? data warehousing for analytics, explained (mostly)
383
John MacKintosh @johnmackintosh.bsky.social · 26/10/2024
Good to see you too buddy 👍
010
John MacKintosh @johnmackintosh.bsky.social · 24/10/2024
#RStats Wondered why my notifications were going nuts over on Linkedin: Yan Holtz's data-to-viz site is fantastic and I'm always pleased to see the reaction this plot gets. www.linkedin.com/posts/yan-ho... Incidentally, a "hot-take" in the replies was that this could have been a line chart. How?
linkedin.com
Yan Holtz on LinkedIn: #dataviz | 18 comments
99% of time series data are represented with line charts 😳 Is it always the best choice? Not sure! ➡️ Other chart types can sometimes be more appropriate:… | 18 comments on LinkedIn
000
John MacKintosh @johnmackintosh.bsky.social · 22/10/2024
Thanks so much for this. Google drive is absolutely out of the question at my place of work, but it's good to see that someone else has the same roblem and has put a lot of thought into how to overcome it.
020
John MacKintosh @johnmackintosh.bsky.social · 22/10/2024
#RStats Has anyone got a good workflow for collaborating on a Word document produced via Rmd (via {officedown}) Caveats : only one R user Multiple SMEs No git / source control Many rounds of redrafts / changes as new requirements evolve Changes are marked up by SMEs in Word via track changes
123