2 Introduction
2.1 What This Book Is For
If you’re coming from economics, statistics, engineering, 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. There are good resources for the latter, several listed in the References chapter. This one assumes you can already write the analysis and focuses on everything that has to be true before you can run it.
2.2 Does This Still Matter When a Model Can Write the Code?
It’s a fair question, and it deserves a real answer.
Consider what an AI assistant can and cannot do for you. It can draft your regression, explain an unfamiliar codebase, and suggest a fix for a stack trace. It cannot install Python on your laptop, repair your PATH, resolve a conflict between two package versions, or configure the machine its code will run on. Everything in this book is the part of the job that can’t be done from inside a chat window.
There’s a second reason, and it’s the more important one. 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.
So: use the assistants. They are genuinely good at the things this book doesn’t cover. But 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 2–6) cover the machine itself: the command line, Python and R, where data lives, how to make an environment reproducible, and how to keep your work under version control.
Communicating results (7–9) covers turning analysis into output someone else can read: documents and reports, charts and diagrams, and cloud platforms when your laptop isn’t enough.
Shipping (10–13) covers getting work in front of people: 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. Where this book quotes a specific limit, treat it as indicative rather than current — check the provider’s own pricing page before you rely on it. The Cloud Platforms chapter covers how to set a budget alert before you need one.
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.