This is a tree diagram that used data from a ‘flat’ format. It has been written with d3.js v5 and is based on the simple horizontal version here
This is designed to be used as part of documenting an update to the book D3 Tips and Tricks to version 5 of d3.js.