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.
Our content is created and reviewed by experienced professionals with deep expertise in basketball analytics, data science, and the sport itself.
Lead Author & Editor-in-Chief
Former NBA analytics consultant with a Ph.D. in Statistics from Stanford University and over 10 years of experience in sports analytics. Previously worked with NBA front offices on player evaluation systems and published researcher in the Journal of Quantitative Analysis in Sports.
Contributing Author
Data Scientist with a Master's in Applied Statistics from Carnegie Mellon University. Five years of experience at a major sports analytics firm, specializing in R and Python programming for sports data. Contributed chapters on data visualization and statistical foundations.
Contributing Author
Basketball analytics writer, consultant, and former Division I college basketball player. Combines firsthand playing experience with analytical expertise. Wrote chapters on defensive metrics, player development, and the practical application of analytics in coaching.
Technical Reviewer
Assistant Professor of Data Science at MIT with a research focus on Bayesian methods in sports analytics. Reviewed all statistical methodologies and machine learning content for accuracy and academic rigor.
We hold our content to the highest standards of accuracy and quality. Every piece of content published on NBA Analytics Textbook goes through a rigorous editorial process:
All chapters are written by subject-matter experts and reviewed by at least one additional team member with relevant expertise before publication.
Every code example is tested in both R and Python to ensure it runs correctly and produces the expected output. We verify compatibility with the latest package versions.
Content is updated regularly to reflect current NBA seasons, rule changes, and the latest developments in analytics methodologies and data sources.
Statistical methods and analytical frameworks are backed by citations and references to peer-reviewed academic research, ensuring methodological soundness.
We have built one of the most comprehensive free basketball analytics resources available online.
Comprehensive Chapters
Glossary Terms
Hands-On Exercises
Dual Language Code
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