It might be helpful to let reader know that we are going to hold the selected region entries of the legend as a set of values in the selectionModel -- here upfront.
Alternatively it might be easier to follow if instead of defining a general purpose selectionmodel, a selectionModel specific to the regions in the map was defined. Could then later abstract the design pattern into a general-purpose SelectionModel.
This cell is where I get confused as it is difficult to see the connection between region.toggle() and the toggle function defined in SelectionModel() because I haven't been told that region=SelectionModel(). I might add that in before talking about the region.toggle.
No, change.legend is for the legend's internal listener. This is a different listener, for the main chart. If we named if change.legend it would override the legend's listener due to how d3-dispatch is designed... I will add some more comments in the code to clarify.