A lot changed in version 4.0 of D3! In case you were just getting comfortable with version 3.x, you may feel as though 4.0 pulled the rug out from under you. Here I’ve summarized the changes most likely to affect beginner users of D3; this appendix addresses only the changes that impact what you would have learned from the first edition of this book.
The good news is that the fundamental principles baked into D3 (such as that of the data join) are unchanged. But 4.0 was rewritten from the ground up, and there are several significant structural and syntactical changes. 4.0 is decidedly not backward compatible.
No longer one giant, hulking library, D3 is now modular, meaning it’s made up of many tiny libraries, each focused on a specific domain. Unless your project is super fancy, you can probably just use the default bundle, which includes the following D3 microlibraries or modules (each repository for which also contains its own documentation):