By Ignacio Martinez
This repository contains the source code for the book Business Data Science: A guide for data-driven decisions. The book provides a comprehensive guide to the principles and applications of business data science, with a focus on making sound, data-driven decisions through causal inference.
In the modern business landscape, data isn't just an asset – it's the raw material from which informed decisions are forged. Data, however, does not speak for itself. The extraction of actionable insights requires not only technical prowess, but a sophisticated understanding of causal inference. This is where the business data scientist steps in, acting as the voice of data, translating its complex signals into meaningful narratives that drive strategic decision-making.
Throughout this book, we navigate the core principles of causal inference, learning how to confidently identify cause-and-effect relationships within data. Our exploration emphasizes a "decisions first" philosophy, ensuring data analysis is always laser-focused on informing and optimizing decision-making. Topics include:
- The Potential Outcomes Framework & Causal Inference
- Randomized Controlled Trials (A/B testing, factorial designs)
- Observational methods (Matching, Causal Impact, Synthetic Control)
- Generalized Linear Models & Bayesian thinking
- Stochastic Trees (BART, BCF)
To further assist you, I have created Iggy, an AI Data Science agent that acts as a companion to this book. Iggy is designed to answer your data science questions using the contents of this book as its knowledge base, providing an interactive way to explore and clarify the concepts discussed.
This book is written and built using Quarto. To render the book locally:
- Install Quarto
- Clone this repository
- Render the book:
quarto render
To avoid installing R and all its dependencies locally, you can build and render the book using Docker. This ensures an isolated environment mirroring the CI process.
- Build the Docker image (this will take a few minutes as it installs all packages):
docker build -t business-data-science-book . - Run the container to render the book. To prevent generated files (like caches and compiled models) from cluttering your repository, we render everything into a dedicated
_docker_buildsubfolder that will be ignored by Git:Once finished, you can find the fully rendered book atmkdir -p _docker_build docker run --rm -v "$(pwd):/src:ro" -v "$(pwd)/_docker_build:/book" business-data-science-book bash -O extglob -O dotglob -c "cp -a /src/!(_docker_build) /book/ && quarto render"
_docker_build/docs/index.html.
This book is licensed under the Creative Commons Attribution-NonCommercial 4.0 License.