When I started the R4PI project to deliver up-to-date versions of R and a number of popular packages for the Raspberry Pi family of computers four and half years ago, it was just a collection of R and BASH scripts. Over the years, it’s evolved and grown and whilst the individual software components do a decent enough job of documenting themselves for me, it’s not easy for anyone else to peak behind the curtain and see how it all fits together, so this is my attempt at “documenting” the pipeline in the hopes that it might be interesting or useful to someone.
…
This post originally appeared on the NHS-R blog.
Being the author of a package with tens of thousands of users must be incredibly rewarding. All those people getting value from your work and using it to do incredible things. Few of us will ever write a package that has that kind of reach though.
Most of us must be content to give back to our communities in smaller ways.
In 2019 I was working for a company building software for Genomics England and the NHS.
…
Optimisation, choice and the art of data science We data folk are always optimising for something. Our code, the return on an investment, warehouse stock levels, drug dosages, whatever. In many cases though, optimisation isn’t just a singular thing that can be easily arrived at.
Take Google Maps for instance. Maps will provide me with directions to a specific destination using the most optimal [fastest] route. But is that what we always want, the fastest route?
…
It’s no secret that I’m a big fan of the pins package for R (and now there’s Python pins too!).
In this post, we’ll take a look at my top 5 best practice tips for using pins effectively. Finally, we have a bonus tip on dubugging problems using pins with RStudio Connect.
1. Use a good title A good title is an essential part of discovery for your pins. It should be short, but informative.
…
TL;DR logging is an extremely useful tool for understanding a running (and potentially failing!) application and an essential element of running any code in production. Adding logging to your long running script, shiny app or plumber API is simple and can pay off enormously when things go wrong or when you want someone else to look after your code for you.
Log…. Rolls down stairs, Alone or in pairs, Rolls over your neighbours dog.
…
I recently went looking for a tutorial on hosting a shiny app inside a docker container for a friend. There are a loads of tutorials available, but this one from Juan Orduz is my favourite. It’s short, to the point, and covers exactly what you need to get started at the perfect level of detail.
It’s a couple of years old now though and there are a few ways we can tweak it to make it a little more robust.
…
The three key facets of any career are hopefully pretty self explanatory:
Things you’re good at Things you like doing Things you can get paid for If you can find a career that exists at the intersection of all three I think you’ll be pretty happy.
Life’s rarely that simple though, so let’s take a look at the two-set intersections to see where a career can get more nuanced.
…
I’ve been thinking a lot lately about product maturity and how it applies to open-source projects. The product maturity curve shown above is often used in commercial product discussions to help people think about the product lifecycle.
To be honest, I have some pretty strong misgivings about it, but it can be helpful sometimes and I was thinking about recreating it in R (as is my way) and so here’s the code to create the plot above.
…
(AKA “Installating minicom on a Mac”)
If you’ve read the official documentation for the Pico Python SDK, you’ll have seen that in order to connect your Mac to the python REPL running on the Pico you need a serial interface program. The docs suggest the aptly named “Serial” which looks great, but is not cheap.
Being a frugal hacker, you might prefer to use an open source tool instead.
Well, help is at hand!
…
The plumber package is great for creating APIs in R, but it has a coupe of lesser known tricks up it’s sleeve and I wanted to talk about one of those today.
In the modern web-based world, you sometimes just need a simple web server to serve HTML pages or other content across the network.
Fortunately, plumber can help. The goal here is to take a directory of content, such as HTML, CSS and javascript and create a web server that will serve that directory of content to users on the same network.
…