2  Introduction

2.1 What This Book Is For

If you’re coming from economics, statistics, engineering, science, or another quantitative field, you already have the analytical skills to make productive use of data. What you may not have is the layer underneath: the command line, environments, version control, deployment — the infrastructure that turns an analysis on your laptop into something reproducible, shareable, and durable.

That layer is rarely taught. Statistics degrees cover inference; econometrics courses cover identification; almost none of them cover what to do when a colleague says “it doesn’t run on my machine.” This book covers that.

This book is about setting up the tools that coding assumes you already have. What it assumes of you is the methods. You might understand logistic regression intimately and still have no way to run one, and if the tooling has never been in place you have probably never written the code either. Learning to code is a separate job with good resources of its own, several listed in the References chapter. This book covers what has to be true before any of that code can run.

2.2 Does This Still Matter When a Model Can Write the Code?

An AI assistant can draft your regression, explain an unfamiliar codebase, and suggest a fix for a stack trace. Give one access to your terminal and it will also install Python, repair your PATH, and resolve a conflict between two package versions. I handed an entire laptop migration to a coding agent — dozens of tools, hundreds of packages, the environment variables I always forget — and it sequenced the work better than I would have.

You still sign off on what it does. An agent that installs a package system-wide instead of into the project’s environment, or pins a version that quietly changes a number, has handed you something you’ll be debugging weeks later on a machine you didn’t build. Approving that plan means being able to read it, and reading it means knowing what the commands underneath are for. That’s what this book covers.

An assistant’s output is only as useful as your ability to run it, test it, and tell whether it’s right. If you can’t reproduce a result, you can’t check it. If you can’t check it, you’re taking a machine’s word for a number you’re about to put in front of someone who will act on it. The infrastructure in this book is what makes verification possible, and verification only grows more valuable as more of the drafting gets automated.

Use the assistants. They’re good at this work, including the parts of it this book covers. Treat them as a fast pair-programmer rather than an oracle, and know enough about what’s underneath to catch them when they’re confidently wrong.

2.3 How the Book Is Organised

The chapters run roughly in dependency order — earlier ones set up what later ones assume — but each is written to stand alone if you already have the earlier pieces working.

Foundations (chapters 3–7) cover the machine itself: the command line, Python and R, version control, where data lives, and how to make an environment reproducible.

Communicating results (8–9) covers turning analysis into output someone else can read: documents and reports, and the charts and diagrams that go inside them.

Shipping (10–14) covers getting work in front of people: cloud platforms for when your laptop isn’t enough, web applications, containers, deployment, and the workflow tooling that makes the second run cheaper than the first.

Two appendices follow: a catalogue of smaller utilities worth knowing about, and a troubleshooting reference for the errors you’re most likely to hit.

By the end you should have a working development environment for Python, R, and SQL; your projects under Git with a remote on GitHub; the ability to produce a report or dashboard and put it on the internet; and an environment file complete enough that someone else can reproduce your results.

2.4 What It Costs

Almost everything here is free. The command line, Python, R, Git, Docker, VS Code, and the entire reporting and visualisation stack cost nothing and have no usage limits.

The exceptions are the cloud platforms and hosting services in the later chapters. Most have a free tier adequate for learning, but they bill for usage beyond it, and their terms change often enough that this book doesn’t print them — you’ll find what each platform charges for, and a link to its pricing page for what that currently costs. The Cloud Platforms chapter covers how to set a budget alert before you need one.

TipIf you only read one chapter

Reproducible Environments. Environment problems waste more of an analyst’s time than anything else in this book, and the fix takes an afternoon to learn.