The NBA Analytics Textbook is a free, open-source educational resource designed to teach basketball analytics using R and Python. Our mission is to make the analytical skills used by NBA front offices accessible to everyone.
Basketball analytics has transformed how the game is played, coached, and evaluated. Yet the skills required to participate in this revolution have remained largely inaccessible to casual fans, students, and aspiring analysts.
We believe everyone should have the opportunity to learn these skills. Whether you want to work in an NBA front office, dominate your fantasy league, or simply understand the game at a deeper level, this textbook provides the foundation you need.
Every example is provided in both R and Python, allowing you to learn in your preferred language or master both.
Learn the same methods used by professional analysts, including tracking data, machine learning, and advanced metrics.
Every chapter includes real-world examples, hands-on exercises, and portfolio-worthy projects.
No paywalls, no subscriptions, no registration required. Just open the site and start learning.
This textbook is designed to be accessible to beginners. You should have:
We start from the fundamentals and gradually build to advanced topics. If you're new to programming, Chapter 1 will guide you through setting up your environment.
This project wouldn't be possible without the incredible basketball analytics community and the creators of the data tools we use:
Have questions, suggestions, or found an error? We'd love to hear from you:
Begin your analytics journey with Chapter 1
Start Learning