The triple lock is in the news again: the UK’s cost of living tsar, appointed by Sir Keir Starmer, recently said that it was “mathematically unsustainable and”profoundly unfair.” The OBR estimates that it will cost £15.5bn more a year by the end of this parliament than it would have under average earnings alone; a not insignificant amount (0.5 per cent of GDP) for government spending. OBR expects…
Back in 2020, I wrote a post about ten lesser known Python packages . Coding and data science have changed a lot in those six years: large language models are the most obvious example! But there have been plenty of other developments too. So I wanted to run down ten command line tools that are useful for coding and data science in 2026. 1. uv Project and dependency management Astral’s uv has…
Local models—that is, large language models you can run on your own computer—have been okay for chat for a while even if they’re typically some way behind the frontier. I can’t now remember when or how I first got a small large language model running locally, but it was probably via Simon Willison’s llm with Mistral-Small-24B-Instruct-2501-4bit , which was released in January 2025.…
I have a chapter in a new volume of the Sante Fe Institute ’s series on The Economy As A Complex Evolving System . Alongside my chapter, which is about what data science and AI can do for understanding increasingly complex economies, there are contributions on: economic complexity analysis (sophistication of product mix) disciplining economic agent-based models with data ( highly recommended if…
Today, I’m excited to feature a guest post from Dr Katie Russell , another No10 Innovation Fellow. You can find more information about Katie and her work over at her LinkedIn page . OCR has been possible since the 1910s. Generative AI brings that capability - and much more - to a chat-like interface to any users with an internet connection, which is inspiring further innovation. Using this…
What can be done to stop the ticket resellers? 1 Artists don’t want to charge the maximum they can, perhaps because they want all of their fans to have a chance to attend their gigs, or perhaps because they want to establish a long-term relationship with the fans and feel eye-watering prices would turn some away. But as a consequence, when concert tickets go on sale, resellers—using sophisticated…
How we spend our time is one of the most important questions facing any mortal creature. 1 While you can, with effort, earn more money, you cannot—at least in the course of normal life 2 —create more time for yourself. As an extensive recent review of the economics of attention points out (Loewenstein and Wojtowicz 2025) , the time we have is limited and rivalrous : if you spend it on one thing,…
I got the following email: I was wondering if it is possible to get your excellent book “coding for economists” as a single PDF? I’m trying to improve my coding skills, and move away from just working in Stata, but I would very much prefer to read the book on my ReMarkable reader rather than on Github? Many thanks for putting in the effort to make such a great text available for the public. Well…
How much economic growth can you generate from making a private dataset open? Let’s create a simple model. Assume firms have total factor productivity , with baseline . When a firm has access to new data relevant to its production, it moves to TFP with is the proportional TFP boost from using the data, . A fraction of firms can use ( for any given data release). The other firms do not directly use…
You hear a lot of people claiming that Nigel Farage gets an undue amount of coverage given the number of MPs in his Reform UK party. I wondered if that was true, so I ran a query against GDELT (Global Database of Events, Language and Tone). GDELT monitors mentions of specific people across broadcast, print, and web news. And…. it is! You often hear this criticism levelled specifically at the BBC,…
National statistics matter: they have a direct bearing on everything from government targets, to funding formulae, to the focus of the media, to the UK’s debt. But there have been many high-profile errors in the nation’s numbers recently, and that’s a cause for concern. Furthermore, the recent Devereux and Public Administration and Constitutional Affairs Committee (PACAC) reviews have found deep,…
smartrappy logo If you’ve ever inherited responsibility for a messy Python codebase, or returned to your own code after a few months, and wondered “what on earth is going on here?”, you’re not alone. Understanding complex code dependencies, data flows, and how different parts of a project interact is a common challenge, especially with analytical pipelines that have gathered a bit of dust or…
I’ve been thinking a lot about efficiency in the public sector recently. This post looks at ideas for increasing the efficiency of analysis and operations through automation, good coding practices, artificial intelligence, and, well, (meta-?) analysis. This is the second post in this series; see the previous post for ideas on efficiency related to communication and co-ordination. What is meant by…
I’ve been thinking a lot about efficiency in the public sector recently, particularly how we can improve it. In this post, I’ll focus on some ideas for improving communication and co-ordination between public sector workers. Quick disclaimer: efficiency, in time or money, is not the only important factor. People’s well-being and satisfaction matter too. (It matters in itself but it’s also true…
What’s going on in the world of data validation? For those of you who don’t know, data validation is the process of checking data quality in an automated or semi-automated way—for example, checking datatypes, checking the number of missing values, and detecting whether there are anomalous numbers. It doesn’t have to be rows in a dataframe though, it could be for validating API input or form…
In January 2020, Claudio Jolowicz published an extremely influential post on Hypermodern Python . It was extremely influential on me, anyway, because it introduced me to a number of tools that I now consider essential to creating solid, high-quality and low-maintenance Python packages. As part of the article, a cookiecutter template was released to help people create new packages with all of these…
Today I learned how to resume sessions on virtual machines while using Visual Studio Code remote. Visual Studio Code remote is incredible for SSH-ing into remote virtual machines. But sometimes you start off a long-running process in a shell on the remote machine and your connection is interrupted before it can finish; then, when you resume the connection, you’ve lost the progress you made through…
It would be nice to have digital copies of all of those old handwritten lecture notes that I so lovingly put together. Some of them might even still be useful, though I have to admit I don’t have tons of opportunities to use quantum field theory these days. Recent Large Language Models (LLMs) have stunning vision capabilities and so it occurred to me that they might be able to convert even old…
Many of us will have experienced bad hardware or software at work. Applications that freeze when you try and do something. A lag when typing. Some programmes ceasing to work before crashing completely. Maybe it’s another kind of performance that makes you want to throw your laptop out of the window: the battery dies after you’ve only been to a couple of meetings, or the text on the screen screen…
In this TIL, I find out how to create a new MySQL database on Microsoft Azure. This is a place to store structured, tabular data. Note that the instructions below assume you are using a bash-like terminal, for example zsh , rather than Powershell . Prerequisites You’ll need to sign up for a Microsoft Azure account for this, and create a “resource group”. You’ll also need the Azure Command Line…