Data Science
From a first statistics course to pandas and the tidyverse, forecasting, conformal prediction and the data pipeline, the field as told through the free samples of the Leanpub books about data science.
Created from the free samples of 34 Leanpub books and the descriptions and tables of contents of 26 more, with every source cited.
Data science is the practice of drawing conclusions from data: posing a question, gathering and cleaning the data that might answer it, exploring and modelling it, and communicating what was found, with the statistics, programming and domain knowledge each of those steps needs. The name is newer than the work. John Tukey argued in 1962 that data analysis deserved to be treated as a field in its own right, apart from mathematical statistics,[15] and a prominent statistician remarked in 1991 that statisticians have a process for it that they espouse but do not fully understand.[2] One of the sources, a book for the executive who must hire and run a data science team, insists that the key word is science rather than data: data of any size is only useful when it is used to answer a question.[6]
The field today runs on two languages and a shared set of ideas. R grew out of statistics and carries the tidyverse, ggplot2 and R Markdown; Python carries pandas, Matplotlib and scikit-learn, and most of machine learning. Underneath both sit the statistics of a first course, sampling, inference and regression, and above them the newer concerns of a working data scientist: whether a series is forecastable at all, how sure a model's prediction is, what a model has learned and whether it can be trusted, and how a prototype in a notebook becomes a tested, versioned program that runs in production. Around the edges lie data engineering, the pipelines and storage that feed an analysis, and the sciences where much of the field's method was worked out, from genomics and biostatistics to neuroimaging and ecology.
This article covers each of those in turn. Its sources are the free samples of the Leanpub books listed at the end, and the public descriptions and tables of contents of those whose samples were not available: where a sample states something, the sentence cites it, and the rest is general knowledge of the field.
Where to start
The sources cover the subject from three sides, statistics, programming and practice, and a reader can enter from any of them. For the statistics, OpenIntro Statistics is a free college-level textbook built around real case studies whose preface tells the reader they need not be a mathematics expert,[1] and Introduction to Modern Statistics, from the same OpenIntro project, leads with simulation-based inference before the formulas;[4] Introductory Statistics for the Life and Biomedical Sciences is the edition for biology and medicine, with the software kept in separate labs.[7] A reader who will work in R has R Programming for Data Science, which starts at installation and treats R as a programming language,[35] and Introduction to Data Science, which pairs the statistics and machine learning with the working tools around them.[36]
For the practice, which is where a statistics course tends to stop, The Art of Data Science describes the process of an analysis with little technical detail,[2] The Elements of Data Analytic Style is a short style guide for the conduct and write-up of one,[37] and Report Writing for Data Science in R makes the case for reproducible reports before showing the tools.[5] Executive Data Science is the crash course for the manager who must hire and lead a team rather than do the work.[6]
Readers who already analyse data and want the next layer can go to Modeling Mindsets on the worldviews behind the methods,[22] The Orange Book of Machine Learning - Green edition for supervised learning on tabular data in Python,[27] Production Ready Data Science for turning a notebook into maintainable software,[30] and Introduction to Data Engineering for the pipelines upstream, which despite its name is about concepts rather than any language.[51]
History
Statistics predates the computer, and several of its founding episodes appear in the samples as teaching examples. Francis Galton developed linear regression while trying to predict children's heights from their parents', an early instance of what is now called supervised learning, and factor analysis of psychometric scores produced the g-factor with no gold-standard outcome to train against, an early instance of the unsupervised kind.[6] G. H. Hardy and Wilhelm Weinberg independently showed in 1908 how genotype frequencies follow from allele frequencies under random mating, the null model population genetics still tests against.[33] Time-series forecasting traces its mathematical foundations to Yule, Slutsky and Wold and its institutional form to ARIMA models and state-space filters, before machine learning and hybrid methods arrived in the twenty-first century.[28] Lloyd Shapley's work in cooperative game theory, a pursuit of fairness in dividing a shared cost, became decades later the basis of SHAP, the most used tool for explaining a model's predictions.[23]
The phrase "machine learning" was coined by Arthur Samuel at IBM in 1959, and one author holds that it was marketing from the start, since what a learning machine does is find a formula that reproduces the training outputs and works on new inputs from the same distribution.[11] Tukey's "The Future of Data Analysis" of 1962 argued that data analysis was closer to science than to mathematics,[15] and Leo Breiman's "Statistical Modeling: The Two Cultures" of 2001 set the data-modelling culture of statisticians against the algorithmic culture of machine learning, a distinction one book takes as its starting point and another lists as essential reading.[22][27]
The tools arrived in a cluster. Python was created by Guido van Rossum in the late 1980s and first released in 1991, and scikit-learn began as a Google Summer of Code project by David Cournapeau in 2007;[20] Matplotlib was begun by John D. Hunter in 2003.[34] In R, Sweave, by Fritz Leisch, was the original literate programming system, built on LaTeX, and knitr, written by Yihui Xie as a graduate student, replaced it with support for Markdown and HTML.[5] The OpenIntro project began posting a free statistics textbook in 2009,[1] and the Johns Hopkins Data Science Specialization on Coursera, which one of the podcast hosts quoted below co-founded, is the origin of several of the R books here.[10][39][40][8]
Neural language models were considered a dead research direction when Tomáš Mikolov began his master's thesis on them; he generated text from a neural model in the summer of 2007, released the RNNLM toolkit in 2010, and recalls the disbelief of established researchers when his thesis showed neural models beating n-grams on large data, with the gap widening as the data grew.[17] A book on generative AI for science divides scientific computing into three eras, digitisation and databases from the 1960s, statistical and machine learning methods from the 1990s, and generative models from the 2020s.[31] Conformal prediction, the newest method in these pages, is described by its author as enjoying an explosion of academic interest while still living mostly in the academic sphere.[25]
The practice of data analysis
The sources written by practising statisticians agree that the hard part of data science is not the methods but knowing what to do with them.
The process of an analysis
The Art of Data Science opens with the observation that data analysis is hard partly because the people good at it have not written down how they think; it borrows Donald Knuth's 1974 line that science is what we understand well enough to teach a computer, and everything else is art.[2] Its framework is five activities, stating and refining the question, exploring the data, building formal models, interpreting the results and communicating them, each run through an epicycle of setting expectations, collecting information and revising when the two do not match; a sharp expectation such as a thirty-dollar dinner bill is easy to check against the data, a vague one between zero and a thousand dollars teaches nothing.[2] A worked example on asthma prevalence shows the cycle in action: the first question is dropped because the CDC already answers it, a row count that comes up short reveals a second data file, and a gender coefficient with the wrong sign turns out to be a coding of 1 for male rather than female.[2]
Executive Data Science gives the same five phases from the manager's side and adds six types of question, descriptive, exploratory, inferential, causal, predictive and mechanistic, with a warning that generating a hypothesis from a dataset and then testing it on the same data, as if the exploration had never happened, is a recipe for bias.[6] Its argument against hype is that most of it has been about the first word, volume and tools, when the useful part is the second: a hundred gigabytes may hold three kilobytes relevant to the question.[6] Its examples are Moneyball, where the question was whether a winning team could be built on a limited budget, and a presidential campaign's experiments to find which voters to turn out; its counter-example is the Netflix prize, whose winning blend of algorithms was never deployed because it could not run at scale, the book's case that engineering is part of data science too.[6] Three questions separate hype from value, what question is being answered, whether the data can answer it and whether the answer could be used, and the book counts it as a success when an analysis proves that the data cannot answer the question.[6]
Essays on Data Analysis begins with a graduate student who, after a year of regression modelling, still did not know what to do when she opened a new dataset; the author's answer is that data analysis is taught by apprenticeship because no sequence of steps holds for every case, and that what statistical training leaves out is everything outside the data, the context, the resources and the audience, so that an analysis is better thought of as a design process than as science or mathematics.[15] The Elements of Data Analytic Style is the short version, one chapter per stage from the question to the write-up, ending in a checklist,[37] and Data Science Project turns the process into a project methodology, with tidy data, leakage avoidance, validation metrics and an adaptation of Scrum.[53]
Exploratory analysis and graphics
Exploratory Data Analysis with R compares exploratory data analysis to a film's rough cut: footage shot out of order is assembled quickly in the editing room to decide what to pursue and what to drop, before any colour correction; the goals are to find interesting relationships, check for evidence for or against a hypothesis, catch missing values and measurement error, and decide where more data are needed.[3] Its chapter on analytic graphics follows Edward Tufte: show comparisons, because evidence for a hypothesis is always relative to another and the scientist's question is "compared to what?"; show causal mechanism; show multivariate data; integrate evidence of every kind; document a graphic so that it tells its story alone; and put content above decoration.[3] The examples are a trial of home air cleaners for children with asthma, where the treatment group's gain in symptom-free days means nothing until the control group is drawn beside it, and daily particulate matter and mortality in New York, whose slightly negative relationship turns positive within every season, because season drives both.[3]
The Python books reach the same practice by example. A machine learning guide's first project spends its exploration on a skewed distribution of Airbnb prices that a log transform makes nearly normal, on counts of room types and boroughs, and on a correlation matrix that looks bad until the categorical features are remembered.[19] A tabular machine learning book gives exploratory analysis a chapter of data quality, descriptive statistics, Anscombe's quartet, box, violin and raincloud plots, outliers and inliers, correlation coefficients and mutual information, followed by a chapter on cleaning: missing values as MCAR, MAR or MNAR, imputation, duplicated rows, zero-variance columns and feature scaling.[27] Practical Data Cleaning covers the same ground for a beginner in nineteen tips with an Excel template.[45]
Reproducibility, reporting and data products
Report Writing for Data Science in R explains why reproducibility matters before showing any tool. Replication, independent people with different data reaching the same result, is the gold standard of science, but studies are now too big, too long or too unique to replicate; reproducibility, making the data and code available so that others can rerun the analysis, is the middle ground between replication and doing nothing.[5] The book cites the Duke University cancer-test incident, in which results that could not be reproduced led to clinical trials being stopped, and an Institute of Medicine report asking that data, fully specified code and every preprocessing step be made available; every field X now has a computational X, and an analysis with complex methods cannot be described in words alone.[5] Its checklist says not to do anything by hand, not to point and click, to teach the computer instead, to use version control, to record the software environment, to avoid saving output that cannot be regenerated, and to set the random seed; literate programming, text and code chunks woven into a document or tangled into a program, is the mechanism, through Sweave and then knitr.[5]
The executive guide names four outputs of a data science experiment, reports, presentations, interactive web pages and apps, and asks that reports be reproducible through knitr or IPython notebooks, that presentations use Slidify or RStudio Presenter, and that apps be documented, commented and version-controlled.[6] Developing Data Products in R is the book on those products in R: Shiny apps from a first app through reactivity and layouts to sharing, reproducible presentations, and interactive graphics with rCharts, googleVis, Leaflet and plot.ly.[41]
Teams and the day-to-day
The executive guide's chapter on software draws a line from code to function to package: code that will run once should be written and documented well, something done twice deserves a function with a defined interface, and something done three times or more deserves a small package, and in the authors' experience there are few one-shot deals.[6]
Conversations On Data Science is a transcript of two practitioners, one in academic biostatistics and one at a technology company, on the analyses that seem easy and are not. Power and sample-size calculations arrive with hours' notice for a grant deadline, the sample size is usually fixed by the budget, so what the statistician actually calculates is the detectable effect size, and nobody can say what effect size would matter; experiments are cheap in a web company and expensive in medicine, which is why industry defaults to the controlled experiment and academia to whatever data it can find.[10] A/B testing looks like counting one side against the other, but the assumption of independent, identically distributed observations is almost always violated by repeat visitors, the bucketing is imperfect, and a visit is whatever Google Analytics defined as thirty minutes between events, an arbitrary decision the industry inherited the way statistics inherited 0.05.[10]
Statistics
Statistics is the discipline the field grew out of, and the library's deepest shelf.
A first course
OpenIntro Statistics is the free textbook behind much of that shelf. Its preface asks readers to take away three ideas, that statistics is an applied field with practical uses, that one need not be a maths guru to learn from real data, and that data are messy and statistical tools imperfect but useful once their strengths and weaknesses are understood; its nine chapters run from data and sampling through probability and inference to multiple and logistic regression.[1] It opens with a case study of 451 patients randomly assigned to receive a stent or not: a fifth of the treatment group had a stroke within a year against an eighth of the controls, the opposite of what doctors expected, and the statistical question is whether a difference that large could be chance.[1]
Its derivatives form a family. Introduction to Modern Statistics is the second edition for a modern course, leading with exploratory analysis and simulation-based inference, randomisation tests and bootstrap intervals, before the mathematical models; the second edition explores Simpson's paradox, replaces "statistically significant" throughout with "statistically discernible", and keeps the text software-agnostic while supplying interactive R tutorials and labs.[4] Advanced High School Statistics is the version customised for Advanced Placement statistics in high schools, in a fourth edition updated in 2026,[9] and Introductory Statistics for the Life and Biomedical Sciences is the derivative for the life and biomedical sciences, whose foreword, written during the SARS-CoV-2 pandemic, reflects on retracted coronavirus studies and on racial disparities in health data, and advises that mastery of technique is secondary to choosing important questions and reporting results transparently.[7]
Other first courses take other routes. Modern Computational Statistics with R puts the question, the study design and what the data can justify before any formula, using R to simulate sampling variability and check assumptions;[59] Associations and Correlations for Medical Research is a short plain-English guide for medical researchers to relationships between pairs of variables, from correlation against causation to survival analysis;[55] and Statistical inference for data science is a compact frequentist treatment, probability and Bayes' rule through the central limit theorem, confidence intervals, p-values, power and the bootstrap, written as a Coursera companion.[39]
Regression and inference
Regression Models for Data Science in R builds regression from Galton's height data and ordinary least squares through residuals, inference, multivariable adjustment, diagnostics and model selection to generalised linear models for binary and count data, with simulation demonstrations throughout.[40] Longitudinal Data Analysis Using R shows what the output means on real data: a moderate correlation between mental health scores in two waves of a large panel survey, a regression slope of about a half read line by line with its intercept and residual, an R-squared of a quarter, and standard errors turned into a confidence interval; its author recommends spending more effort on whether effects are substantively large and on presenting their uncertainty than on the contested p-value.[29] Adding age as a second predictor is the book's first step toward the fixed and random effects, cross-lagged, multilevel and latent growth models of longitudinal analysis.[29] Advanced Linear Models for Data Science is the proof-level treatment for first-year PhD students, least squares, bases, normal-theory results and mixed models, which its author describes as about half finished,[42] and Methods in Biostatistics with R pairs the foundations, likelihood, Bayes' rule and ROC curves, confidence intervals, resampling, power and sample size, with R code in the same book.[48]
A book on modelling mindsets explains what the frequentist is doing when she reports an interval. Probability is the long-run frequency of an event in repeated trials, each parameter has a fixed true value, and the estimator is itself a random variable, so the modeller imagines repeating the experiment, ten apples weighed and their mean taken, and asks how often the result would be as extreme if the null hypothesis held.[22] A 95 per cent confidence interval does not mean a 95 per cent chance that the parameter lies within it; it means that 95 per cent of such intervals, over many repetitions, would cover the fixed value, and the book credits frequentism with enabling clear decisions while noting that its focus on p-values encourages p-hacking and oversimplifies questions into yes or no.[22]
Hierarchical, high-dimensional and correlated data
Data Analysis for the Life Sciences takes statistics from p-values to high-throughput data, matrix algebra and linear models, multiple testing and the false discovery rate, dimension reduction, clustering and batch effects, every analysis rerunnable from its R Markdown source.[38] Mixed and Phylogenetic Models: A Conceptual Introduction to Correlated Data addresses the structure that textbook methods ignore: plots within sites, repeated observations on one individual, species related by a phylogeny, all of which leave residual errors correlated for reasons the analyst does not know.[21] Its first chapter analyses one dataset, ruffed grouse heard at stations along fifty Wisconsin roadside routes, nine different ways, aggregated to the route or kept at the station, with linear, generalised linear and mixed models, some of them simply wrong for the data, to show that different methods can agree surprisingly or differ, and that almost every hypothesis test is an approximation whose quality at small sample sizes is unclear.[21]
Statistical computing and the modelling mindsets
Advanced Statistical Computing is about how the fitting is computed: its contents run from the principle of optimisation transfer through bisection, Newton's method, steepest descent, quasi-Newton, conjugate gradient and coordinate descent, the EM algorithm, the Laplace approximation, rejection and importance sampling, Metropolis-Hastings, the Gibbs sampler and simulated annealing.[14] Statistical foundations of machine learning: the book has been a free academic reference since 2004, written because the machine learning textbooks of the time underplayed statistics and glossed over the assumptions of inferring models from data; its author argues that Monte Carlo simulation should be routine in introductory statistics, supplies R and Python scripts and Shiny dashboards, and offers the abridged handbook free beside a longer paid edition.[32]
Modeling Mindsets frames the whole landscape. A model is variables plus learnable functions, and the same linear regression can serve a frequentist, a Bayesian or a supervised learner; what differs is the mindset, which decides what questions may be asked, how a model is judged and what a community accepts without argument, as when a medical student was told that every visualisation needed p-values.[22] Statistical modelling encodes the data-generating process in distributions and assumptions and evaluates fit on the data used for fitting; supervised learning evaluates on unseen data and treats everything as a prediction problem, so that hypothesis tests become irrelevant because the best model might be any function; and the flavours of statistics differ on what probability is, a long-run frequency, a degree of belief, or evidence through the likelihood.[22] The tabular machine learning book draws the same line in a sentence, a statistical model being about the estimated parameters and a machine learning model about the predictions,[27] and the executive guide adds that machine learning emphasises prediction performance on novel data where traditional statistics emphasises inference to a population, parsimony and interpretable parameters, a distinction that has faded as each side borrowed from the other.[6]
R
R is the language the statistical half of the library is written in, and most of its books come from one group of authors.
The language
R Programming for Data Science treats R as a programming language rather than a statistics package, from objects, subsetting and dplyr through functions and lexical scoping to debugging, profiling, simulation and parallel computation, with one case study on fine-particle air pollution.[35] Mastering Software Development in R, the companion to a Coursera sequence on software development in R, starts with a crash course that reuses that book's material: expressions at the prompt, auto-printing, the five atomic classes, the one rule that a vector holds objects of a single class and the list that is the exception, implicit and explicit coercion, matrices built column-wise, and factors as self-describing categorical data that modelling functions treat specially.[8] It lists some forty-five packages for its examples and goes on to functional and object-oriented programming, debugging, package building with devtools and testthat, and custom graphics on ggplot2 and grid.[8] Introduction to Data Science is the full introduction, six parts across thirty-eight chapters each meant to be one lecture: R, visualisation with ggplot2, statistics, wrangling, machine learning with caret, and the productivity tools of Unix, Git and R Markdown.[36]
The tidyverse, graphics and packages
Tidyverse Skills for Data Science in R walks the life cycle of a project with one set of tidy tools per stage, importing, wrangling, visualising and modelling, ending in the then-new tidymodels framework.[44] For plotting, the exploratory analysis book covers the base and ggplot2 systems and graphics devices,[3] and The Hitchhiker's Guide to Ggplot2 builds one plot type per chapter an argument at a time; its histogram chapter starts from a bare geom_histogram of ozone readings, overlays a normal density with stat_function and the after_stat syntax, passes na.rm for the missing values, and then switches the axis back from density to count.[12] The podcast transcript records the base graphics against ggplot2 debate as practitioners actually have it.[10]
The executive guide's rule, a function for anything done twice and a package for anything done three times, is the motivation for the software development book's later chapters,[6] and the report-writing book supplies the reproducibility half, with sessionInfo at the end of every report and set.seed before any randomness.[5] The data products book turns an analysis into a Shiny app or an interactive chart,[41] and the executive guide names Shiny as the way to put a data product in front of a manager who is not a data scientist.[6]
Python
Python arrived in data science through its libraries, and the books on it are about the libraries and about the engineering around them.
pandas and the library stack
A Hands-On Introduction to Essential Python Libraries and Frameworks (With Code Samples) is a reference tour of thirty-seven libraries, each given the same template of description, one code sample and a list of pros and cons: pandas, NumPy, Seaborn, SciPy and Matplotlib for data science, scikit-learn, PyTorch, TensorFlow, XGBoost, LightGBM, Keras and PyCaret for machine learning, MLflow, Kubeflow and ZenML for operations, SHAP, LIME and InterpretML for explanation, and libraries for text, images, web frameworks and scraping; its author notes that the code and descriptions were written with ChatGPT's support.[20] Its pandas entry introduces the Series and the DataFrame, a table that can be thought of as a spreadsheet or a SQL table, and its scikit-learn entry fits a logistic regression to the iris data.[20]
Effective Pandas is for the intermediate user, and starts with indexing because seven of the fifteen most-voted pandas questions on Stack Overflow were about it: a DataFrame can be indexed by position like a list, by label like a dictionary and by boolean mask like a NumPy array, on rows or columns and on hierarchical indexes.[13] The old .ix method chose label or position depending on the data, so that the same slice returned an empty frame on an integer index and rows on a string index; since version 0.12, .loc and .iloc separate the two.[13] The SettingWithCopy warning comes from chained indexing, two square-bracket operations in a row, where pandas cannot promise that the first returned a view rather than a copy, and the fix is a single .loc assignment; the chapter ends on MultiIndexes and IndexSlice, which the author suspects is underused.[13] Data Visualization Made Easy starts from the library's origin, its place beside pandas and NumPy, and installation through Anaconda and a first Jupyter notebook.[34] A short primer explains the web languages beneath browser charts, HTML for content, SVG for the bars, lines and circles, CSS for style and JavaScript for interaction, for the Python or R user whose Dash or Shiny dashboard needs more than the library gives,[26] and D3 Tips and Tricks v7.x takes that reader through D3 chart by chart.[47]
From notebook to production
Production Ready Data Science names the situations it is written for, a notebook that starts simple and becomes a mess, package installations that break the environment, code that runs differently on different machines, changes that cannot be rolled back, bugs that surface late, and attributes all of them to the gap between exploratory analysis and production-grade software engineering.[30] One chapter per practice names one tool: Git, uv for dependencies and packaging, pytest, Hydra for configuration, Loguru for logging, Pandera for data validation, DVC for data versioning, GitHub Actions for continuous integration and marimo for reproducible notebooks.[30] The version control chapter's scenarios are a churn model whose performance drops after an edit, a published model that must be reproduced six months later from a tagged commit, and an experiment kept on a branch; its advice is to revert rather than reset on shared history, to keep data, model and credential files out of the repository, and to fetch before merging.[30] Data Science Bootstrap Notes covers the layer beneath, a Mac or Linux machine configured for the work, reproducible environments with pixi and uv, project structure, testing and CI, data catalogues and formats, and, in its second edition, repository memory and skills for AI coding agents.[60]
The machine learning guide's first project ends where these books begin: the fitted Keras model and its scikit-learn column transformer are saved with joblib and the model's own save method, served from a Flask route that turns a JSON request into a DataFrame, applies the transformer and inverts the log transform, and deployed to Google App Engine, with the caveat that it is a prototype still needing protection, monitoring and an automated deployment.[19]
Machine learning
Machine learning is the half of the field that came from computer science, and the books on it are split between the method, the practice and the questions the method leaves open.
Foundations
The Hundred-Page Machine Learning Book begins by telling the truth, as its author puts it: machines do not learn. A learning machine finds a formula that produces the right outputs for the training data and for most other inputs from the same distribution, and fails when the inputs are distorted in ways it was not trained on, which is not how animals learn.[11] It defines the types of learning by their datasets, labelled pairs for supervised, unlabelled examples for unsupervised, a few labels among many unlabelled for semi-supervised, and states, actions and rewards for reinforcement learning, and walks through supervised learning with a spam filter: ten thousand emails become bag-of-words vectors of twenty thousand dimensions, and a support vector machine draws the hyperplane that separates spam from not-spam with the largest margin.[11] The model works on new data because examples drawn randomly from the same process tend to fall near the examples they resemble, and the larger the training set the less likely a new example is to be far from them.[11]
The Orange Book of Machine Learning - Green edition states the fundamental assumption as data equals signal plus noise, where the signal is the ground truth and the noise an irreducible error, and describes machine learning as glorified curve fitting: fit the signal and none of the noise, where interpolation would pass through every point.[27] It distinguishes aleatoric uncertainty, from randomness in the process, from epistemic uncertainty, from lack of data, and confidence intervals on parameters from prediction intervals on predictions.[27] Its chapters go from statistics, exploratory analysis and cleaning through cross-validation, data leakage and drift, regression and classification, quantile and conformal regression, random forests, boosting and stacking, hyperparameter optimisation and feature engineering to tabular foundation models, with thirty Kaggle notebooks, and its description says it was written without generative AI.[27] Practical Machine Learning in R is an R counterpart, lab handouts from a Greek university's pattern recognition courses, one algorithm per chapter from decision trees and support vector machines to k-means, DBSCAN and association rules.[50]
The end-to-end project in Hacker's Guide to Machine Learning with Python predicts Airbnb prices in New York from about forty-nine thousand listings: numeric features scaled and categorical ones one-hot encoded in a single column transformer, a Keras network with dropout trained with early stopping, and a test-set R-squared of about a half that the author says leaves room for improvement.[19] A second chapter fine-tunes a pretrained RetinaNet to find vehicle number plates, and recommends a well-maintained good-enough model over the state of the art when a manager wants the answer yesterday.[19]
Time series forecasting
Mastering Modern Time Series Forecasting asks, before any model, whether a series is forecastable at all. Forecasting is a probabilistic activity, it argues, citing Rob Hyndman's view that the point is not to eliminate uncertainty but to understand it and communicate it through prediction intervals, and Frank Knight's distinction between measurable risk and true uncertainty; it recalls Galbraith's quip that economic forecasting exists to make astrology look respectable, Joshua Epstein's point that plate tectonics explains earthquakes without predicting them, and Edward Lorenz's discovery that rounding an initial value changes a weather forecast, which sets a horizon of about two weeks beyond which detailed forecasts fail.[28] A forecasting problem needs time-ordered data whose order carries meaning, temporal structure such as trend, seasonality or autocorrelation, stationarity once those are modelled, and enough history; without structure the best forecast is the mean or the last value, without history the task is expert judgement rather than modelling, and no model, however complex, can predict a series that has none.[28] The book's eleven chapters then run from classical statistical models through machine learning, deep learning and transformers to foundation models for time series.[28]
Uncertainty and interpretability
Introduction To Conformal Prediction With Python opens with the problem that without uncertainty quantification an accurate prediction and a wild guess look the same.[25] Uncertainty enters at every step: the model is trained on a random sample and is itself a random variable, some training is non-deterministic, tuning and feature selection estimate from samples too, and the data carry measurement error and disagreeing labellers.[25] The usual answers lack guarantees, since class probabilities are usually not calibrated, Bayesian intervals rest on prior and distributional assumptions, and bootstrap intervals are known to be too narrow; conformal prediction turns any model's uncertainty score into prediction sets or intervals with a guaranteed coverage, needing no retraining and no assumption beyond exchangeability between the calibration data and the new data.[25] The worked example is a legacy classifier of dry beans into seven varieties, about three-quarters accurate and impossible to replace, which a bean company needs to make bags that are 95 per cent one variety: taking the model's probabilities at face value gives a bag that is only about 90 per cent pure, while computing a non-conformity score on a thousand calibration beans and cutting at its 95th percentile gives sets of one or two varieties that cover the true class 95 per cent of the time on average, though not, as the sequel warns, per class.[25] The same recipe is a few lines of code or a wrapper from the MAPIE library, and a lower error rate buys its coverage with larger sets.[25]
Interpreting Machine Learning Models With SHAP is by the author of Interpretable Machine Learning (Third Edition), who had overlooked SHAP in that book until a Twitter survey found most respondents using it, and who describes his relationship with it as a mix of admiration and frustration.[23] His case for interpretability is a rule-based pneumonia model that learned that asthma lowers the risk, because asthma patients in the data received aggressive early care, a dependence only an interpretable model could have revealed, and a hospital's sepsis early-warning system, whose unexplained scores led nurses to invent their own accounts of what the model was looking at.[23] Inherently interpretable models are not the whole answer, because what counts as interpretable is ambiguous and the best-performing models are usually not among them; the remedy is model-agnostic methods, of which SHAP, built on Shapley values and worked through a shared taxi fare, is the most used.[23] The third edition of the interpretability book catalogues the field, from interpretable models and decision rules through LIME, counterfactuals, Shapley values, partial dependence and permutation importance to the methods specific to neural networks.[43] The tabular book separates explainability, the how and the why of a prediction, from interpretability, the why alone, and notes a study finding that data scientists over-trust and misuse interpretability tools.[27] Credit Risk Modeling Working Notes applies the modelling to credit risk, as a continually updated compilation of the author's technical papers and experiments.[56]
Language models and generative AI
The large language model books in the library belong to the AI page, but three sit on this one's border. The Hundred-Page Language Models Book builds language models by implementing them, revisiting count-based models and recurrent networks before the Transformer so that the mathematics builds gradually, and says plainly that it is not about large-scale training, production deployment or enterprise applications.[17] Applied Artificial Intelligence is for the developer who builds AI applications from off-the-shelf components, and divides AI into knowledge-based approaches, whose reasoning is explicit but which need knowledge engineered up front, and machine learning, which needs only training samples but cannot explain its decisions.[16] Generative AI for Science grew from a graduate course, pairs every concept with a Colab notebook, and defines generative models as ones that learn the distribution underlying the data and sample new instances from it; its author discloses that chapters were drafted with the help of language models and then edited.[31]
Data engineering
Data engineering is the work that puts the data where an analysis can reach it, and its books in the library are written at the level of concepts rather than of any one tool. Introduction to Data Engineering is deliberately language-agnostic despite its slug: what a pipeline is and how to architect one, storage and file formats such as Parquet, Avro and ORC, row against columnar storage, batch against streaming, OLTP against OLAP, partitions against indexes, SQL, warehouses, lakes and lake houses, data modelling with facts and dimensions, data quality, and the Docker and CI practices around them.[51] The executive guide describes the usual division of labour: data in a database, a small MySQL instance or a distributed one, analysis in R or Python on rented cloud servers, and Hadoop or Spark when a result must be scaled.[6]
The Apache Ignite book is the in-memory side of that scaling, a long guide to Apache Ignite as a distributed database, cache and compute platform; its architecture chapter explains the shared-nothing design, in which a grid of heterogeneous commodity machines works on one problem in parallel, and later chapters stream from Kafka and share state across Spark jobs.[24] Database Engine Level Thinking goes beneath PostgreSQL to heap pages, the buffer pool, write-ahead logging and B-tree, covering and hash indexes, as a living draft.[58] On the analyst's side of the pipeline, the production-readiness book validates incoming data with Pandera and versions datasets with DVC,[30] and the bootstrap notes add data catalogues and formats.[60]
Data science in the sciences
Much of the method in this article was worked out in a science, and the library's science books are where the methods are seen at full stretch.
Life sciences and genomics
The life-sciences branch of the OpenIntro family keeps its statistics in the main text and its R in separate labs,[7] the biostatistics methods book keeps both together,[48] and Data Analysis for the Life Sciences goes on to the high-throughput data of microarrays and sequencing, where thousands of simultaneous tests make the false discovery rate and batch effects central.[38] Bioconductor introduces the R platform for computational biology through its shared data classes, IRanges, GRanges, ExpressionSet and SummarizedExperiment, so that the domain packages built on them make sense.[54]
Coding Genetics uses R for simulation rather than analysis. It argues that many biological questions can only be posed through explicit quantitative models; its running example is sickle cell anaemia, where the allele persists because carriers are protected from malaria, and its first model is Hardy-Weinberg equilibrium, derived step by step as the null model against which evolution is detected.[33] Genetic drift is introduced by simulating coin flips with sample, a for loop and hist, to show how far from half heads even five hundred coins can land.[33] Finding Hidden Messages in DNA takes the algorithmic route, finding where DNA replication begins and which patterns act as regulatory motifs, with profile matrices, randomised search and Gibbs sampling, and coding challenges graded online.[49] The report-writing book's example of why reproducibility matters is air pollution and health, a field that estimates small effects against stronger signals, informs regulation and uses complex methods.[5]
Neuroimaging, ecology and the earth sciences
Principles of fMRI presents functional brain imaging as a meeting point for psychologists, neuroscientists, physicists, statisticians and computer scientists, each feeling a different part of the elephant; its example of a study on how antidepressants act lists what each discipline contributes, from the psychologist's task design and the statistician's power calculation to the physicist's control of artefacts.[18] Brain maps, it explains, are mostly statistical constructions, maps of where an effect was deemed significant, and its chapter on how to lie with brain imaging describes the tricks to distrust: raising the threshold until one region remains, which also hides the activation in the ventricles that would reveal an artefact, and circular selection, which makes any trait correlate strongly with some voxel.[18] Mixed and Phylogenetic Models: A Conceptual Introduction to Correlated Data brings the same rigour to ecology,[21] Risk Analysis in the Earth Sciences is a lab manual of nine R exercises on climate risk, from the economically optimal height of a flood barrier to fitting a polynomial to sea-level data,[52] and R for Photobiology is a handbook of the authors' own CRAN packages for spectral irradiance, colour and the position of the sun.[57]
Economics and finance
Introduction to Econometric Production Analysis with R is a set of lecture notes, in their seventh draft, that pair each approach to estimating production technologies, primal and dual, stochastic frontier analysis and data envelopment analysis, with its R estimation and interpretation, for readers who already have the microeconomics.[46] The credit-risk working notes above are the finance counterpart,[56] and the podcast's statistician at a web company supplies the reminder that what counts as a meaningful correlation differs by field, terrible in physics and remarkable in social science.[10]
Sources
Every source is a Leanpub book. The note after each says which part of it was read; where no sample was available, only the public description and table of contents were used.
- 1.OpenIntro Statistics, David Diez, Mine Cetinkaya-Rundel, Christopher Barr, OpenIntro: Includes 1st, 2nd, 3rd, and 4th Editions Free sample: title page, contents and preface, and chapter 1 through the stents case study, data basics and the kinds of variables. 2024. Free sample: PDF
- 2.The Art of Data Science, Roger D. Peng, Elizabeth Matsui: A Guide for Anyone Who Works with Data Free sample: chapter 1 on data analysis as art and chapter 2 on the epicycle of analysis with the asthma example. 2018. Free sample: PDF · EPUB
- 3.Exploratory Data Analysis with R, Roger D. Peng Free sample: the preface and chapter 2 on the principles of analytic graphics. 2020. Free sample: PDF · EPUB
- 4.Introduction to Modern Statistics, Mine Cetinkaya-Rundel, Johanna Hardin, OpenIntro Free sample: the full table of contents and the preface; no chapter prose. 2024. Free sample: PDF
- 5.Report Writing for Data Science in R, Roger D. Peng Free sample: chapters 1 to 4, on reproducible reporting, the data science pipeline, literate statistical programming and the reproducibility checklist. 2019. Free sample: PDF · EPUB
- 6.Executive Data Science, Brian Caffo, Roger D. Peng, Jeffrey Leek: A Guide to Training and Managing the Best Data Scientists Free sample: all nine chapters, from what data science is through statistics, machine learning, software, project structure, outputs, success, the toolbox and hype. 2018. Free sample: PDF · EPUB
- 7.Introductory Statistics for the Life and Biomedical Sciences, Julie Vu, Dave Harrington, OpenIntro Free sample: front matter, the full table of contents and the start of the foreword. 2021. Free sample: PDF
- 8.Mastering Software Development in R, Roger D. Peng, Sean Kross, Brooke Anderson Free sample: the introduction and setup, and section 1.1, the crash course on R syntax. 2017. Free sample: PDF · EPUB
- 9.Advanced High School Statistics, David Diez, Mine Cetinkaya-Rundel, Leah Dorazio, Christopher Barr, OpenIntro: 1st + 2nd + 3rd + 4th Editions Free sample: title page, licence and the start of the table of contents. 2026. Free sample: PDF
- 10.Conversations On Data Science, Roger D. Peng, Hilary Parker Free sample: the podcast introduction and the episode on analyses that seem easy, power and sample size and A/B testing. 2016. Free sample: PDF · EPUB
- 11.The Hundred-Page Machine Learning Book, Andriy Burkov Free sample: preface, contents through chapter 3, chapter 1 on what machine learning is and why models work on new data, and the start of chapter 2 on notation. 2019. Free sample: PDF
- 12.The Hitchhiker's Guide to Ggplot2, Mauricio Vargas Sepúlveda, Jodie Burchell Free sample: the first three sections of chapter 7, on histograms. 2023. Free sample: PDF
- 13.Effective Pandas, Tom Augspurger Free sample: chapter 1, on indexing, SettingWithCopy and MultiIndexes. 2016. Free sample: PDF
- 14.Advanced Statistical Computing, Roger D. Peng Free sample: the table of contents only. 2022. Free sample: PDF
- 15.Essays on Data Analysis, Roger D. Peng Free sample: chapter 1, The Question. 2021. Free sample: PDF · EPUB
- 16.Applied Artificial Intelligence, Bernhard G. Humm: An Engineering Approach Free sample: the preface and the start of chapter 1, on what AI is and its two approaches. 2025. Free sample: PDF · EPUB
- 17.The Hundred-Page Language Models Book, Andriy Burkov: hands-on with PyTorch Free sample: endorsements, contents, the foreword by Tomáš Mikolov and the preface. 2025. Free sample: PDF
- 18.Principles of fMRI, Tor D. Wager, Martin A. Lindquist Free sample: chapter 2 on neuroimaging as multidisciplinary science, chapter 4 on brain maps and the start of chapter 6 on how to lie with brain imaging. 2015. Free sample: PDF · EPUB
- 19.Hacker's Guide to Machine Learning with Python, Venelin Valkov: Hands-on guide to solving real-world Machine Learning problems with Scikit-Learn, TensorFlow 2, and Keras Free sample: the end-to-end project predicting Airbnb prices and deploying with Flask, and the object detection chapter. 2020. Free sample: PDF · EPUB
- 20.A Hands-On Introduction to Essential Python Libraries and Frameworks (With Code Samples), Murat Durmus Free sample: front matter and contents, the history of Python, and the entries for pandas, scikit-learn, SHAP, regex, Flask and Selenium. 2023. Free sample: PDF
- 21.Mixed and Phylogenetic Models: A Conceptual Introduction to Correlated Data, Anthony R. Ives Free sample: the preface and the first sections of chapter 1 on nine methods for the grouse data. 2018. Free sample: PDF · EPUB
- 22.Modeling Mindsets, Christoph Molnar: The Many Cultures of Learning From Data Free sample: contents, preface, chapter 1 on mindsets, chapter 2 on statistical modelling and chapter 3 on frequentism. 2026. Free sample: PDF
- 23.Interpreting Machine Learning Models With SHAP, Christoph Molnar: A Guide With Python Examples And Theory On Shapley Values Free sample: contents, preface and chapter 2 on why interpretability matters; the history and theory chapters from the table of contents. 2026. Free sample: PDF
- 24.The Apache Ignite book, Shamim Bhuiyan: The next phase of the distributed systems Free sample: the preface with the chapter outline and the start of chapter 4 on the shared-nothing architecture. 2025. Free sample: PDF · EPUB
- 25.Introduction To Conformal Prediction With Python, Christoph Molnar: A Short Guide For Quantifying Uncertainty Of Machine Learning Models Free sample: contents, summary, preface, chapter 4 on why uncertainty quantification is needed and chapter 5 on classifying beans with MAPIE. 2026. Free sample: PDF
- 26.Fundamentals of HTML, SVG, CSS and JavaScript for Data Visualisation, Peter Cook Free sample: the introduction, the overview of the four web languages and the HTML chapter. 2025. Free sample: PDF · EPUB
- 27.The Orange Book of Machine Learning - Green edition, Carl McBride Ellis: The essentials of making predictions using supervised regression and classification for tabular data. Free sample: the free Orange edition's contents, chapter 1 on signal and noise, uncertainty and interpretability, and the start of chapter 2 on statistics; the Green edition from its description. 2026. Free sample: PDF
- 28.Mastering Modern Time Series Forecasting, Valery Manokhin: A Comprehensive Guide to Statistical, Machine Learning, and Deep Learning Models in Python Free sample: chapter 2 on the forecastability of time series, through the criteria for when forecasting is appropriate. 2026. Free sample: PDF
- 29.Longitudinal Data Analysis Using R, Alexandru Cernat Free sample: chapter 5 on correlation and regression, through adding a second predictor. 2026. Free sample: PDF
- 30.Production Ready Data Science, Khuyen Tran: From Prototyping to Production with Python Free sample: contents, preface and chapter 1 on version control. 2025. Free sample: PDF · EPUB
- 31.Generative AI for Science, J. Paul Liu: A Hands-On Guide for Students and Researchers Free sample: the author's note with its AI-use disclosure, and chapter 1 on generative AI in scientific discovery. 2026. Free sample: PDF · EPUB
- 32.Statistical foundations of machine learning: the book, Gianluca Bontempi Free sample: the abridged handbook's preface, software notes and the start of its contents, not the book's own chapters. 2025. Free sample: PDF
- 33.Coding Genetics, Jacob C. Koella: Simulating and analyzing population genetics with R Free sample: the introduction, the sickle cell example, Hardy-Weinberg equilibrium and the coin-flipping simulation of drift. 2026. Free sample: EPUB
- 34.Data Visualization Made Easy, Bhola Prasad: Create Beautiful Charts in Python with Matplotlib Free sample: the introduction, on what Matplotlib is, installation through Anaconda and a first Jupyter notebook. 2026. Free sample: PDF · EPUB
- 35.R Programming for Data Science, Roger D. Peng No sample: from the description and table of contents. 2022.
- 36.Introduction to Data Science, Rafael A Irizarry: Data Analysis and Prediction Algorithms with R No sample: from the description and table of contents. 2019.
- 37.The Elements of Data Analytic Style, Jeff Leek: A guide for people who want to analyze data. No sample: from the description and table of contents. 2015.
- 38.Data Analysis for the Life Sciences, Rafael A Irizarry, Michael I Love No sample: from the description and table of contents. 2021.
- 39.Statistical inference for data science, Brian Caffo: A companion to the Coursera Statistical Inference Course No sample: from the description and table of contents. 2016.
- 40.Regression Models for Data Science in R, Brian Caffo: A companion book for the Coursera Regression Models class No sample: from the description and table of contents. 2019.
- 41.Developing Data Products in R, Brian Caffo, Sean Kross No sample: from the description and table of contents. 2015.
- 42.Advanced Linear Models for Data Science, Brian Caffo No sample: from the description and table of contents. 2017.
- 43.Interpretable Machine Learning (Third Edition), Christoph Molnar: A Guide for Making Black Box Models Explainable No sample: from the description and table of contents. 2025.
- 44.Tidyverse Skills for Data Science in R, Carrie Wright, Shannon Ellis, Stephanie Hicks, Roger D. Peng No sample: from the description and table of contents. 2021.
- 45.Practical Data Cleaning, Lee Baker: 19 Essential Tips to Scrub Your Dirty Data No sample: from the description and table of contents. 2020.
- 46.Introduction to Econometric Production Analysis with R, Arne Henningsen: Seventh Draft Version No sample: from the description and table of contents. 2025.
- 47.D3 Tips and Tricks v7.x, Malcolm Maclean: Interactive Data Visualization in a Web Browser No sample: from the description and table of contents. 2021.
- 48.Methods in Biostatistics with R, Ciprian Crainiceanu, Brian Caffo, John Muschelli: A Rigorous and Practical Treatment of Biostatistics Foundations using R No sample: from the description and table of contents. 2019.
- 49.Finding Hidden Messages in DNA, Active Learning Publishers, Phillip Compeau, Pavel Pevzner No sample: from the description and table of contents. 2015.
- 50.Practical Machine Learning in R, Kyriakos Chatzidimitriou, Themistoklis Diamantopoulos, Thomas Karanikiotis, Michail Papamichail, Andreas Symeonidis No sample: from the description and table of contents. 2021.
- 51.Introduction to Data Engineering, Daniel Beach: Learn the skills needed to break into Data Engineering. No sample: from the description and table of contents. 2023.
- 52.Risk Analysis in the Earth Sciences, Patrick Applegate, Klaus Keller: A Lab Manual with Exercises in R No sample: from the description and table of contents. 2016.
- 53.Data Science Project, Filipe A. N. Verri: An Inductive Learning Approach No sample: from the description only, the table of contents being empty. 2026.
- 54.Bioconductor, Kasper D. Hansen: An Introduction to Core Technologies No sample: from the description and table of contents. 2016.
- 55.Associations and Correlations for Medical Research, Lee Baker: A Holistic Strategy To Help You Discover The Story of Your Data No sample: from the description and table of contents. 2020.
- 56.Credit Risk Modeling Working Notes, Andrija Djurovic: A Collection of Presentations, Experiments, and Technical Papers No sample: from the description only, the table of contents being empty. 2026.
- 57.R for Photobiology, Pedro J. Aphalo, T. Matthew Robson, Titta Kotilainen: Theory and recipes for common calculations No sample: from the description and table of contents. 2025.
- 58.Database Engine Level Thinking, Kareem Ashraf: Building a mental model of PostgreSQL internals — written while learning No sample: from the description and table of contents. 2026.
- 59.Modern Computational Statistics with R, Osama Abdelhay: An Introduction to Statistical Thinking, Uncertainty, and Evidence No sample: from the description only, the table of contents being empty. 2026.
- 60.Data Science Bootstrap Notes, Eric Ma: Set up your machine, structure your projects, and work at the speed of thought. No sample: from the description and table of contents. 2026.
Further reading
Other books in the library on the same ground, not cited above.
- D3 Tips and Tricks v6.x, Malcolm Maclean: Interactive Data Visualization in a Web Browser The earlier edition of the D3 tips and tricks book, for d3.js version 6. 2021.
- The Hundred-Page Language Models CourseCourse, Andriy Burkov The course version of the hundred-page language models book, with quizzes, exercises and video interviews. 2025.
- Course Analytics - Wrangling FutureLearn Data With Python and R, Tony Hirst Recipes in pandas and R for reporting on one online course platform's data export. 2016.
- How to be a modern scientist, Jeffrey Leek The tools and habits of an academic science career, from publishing and peer review to sharing data and code. 2016.
- A Quick Steep Climb Up Linear Algebra, Stephen Davies: Version 1.1.0 Free, open-source teaching material on the linear algebra computer science practitioners need. 2025.
- A Mathematical Theory of the Unknown, R. A. García Leiva: Journey Beyond the Frontiers of Human Understanding A mathematical theory of what is not known, built on Kolmogorov complexity, with chapters on machine learning and model comparison. 2026.
- The Agentic AI book, Dr. Ryan Rad: From Language Models to Multi-Agent Systems Building autonomous systems on language models, from prompting and retrieval to multi-agent architectures and deployment. 2026.
- Demystifying Artificial Intelligence, Jeffrey Leek, Divya N. A short general-audience explainer of how an AI application is data, an algorithm and an interface. 2017.