A more useful example of this attempt at a d3 module. Though I wouldn't advise on using so many discrete colors as I have here.
The example shows a more useful application of my attempt at a d3 module for patterns. The map is based off a visualization I probably first saw at age 6, in one of my favorite books, a 1989(?) topical world atlas - I'll find the name next visit my parents.
The map shows official languages (at a national level, sorry regional official languages) by country. Though, not all countries have official languages, so I've used a bit of discretion. Also, in the case of Bolivia, with a multitude of official languages, some of which may be extinct, I've shown some of the more major languages.
The map omits French Guiana - I quickly filtered countries by region, and French Guiana, as part of France didn't manage to stick around.
https://d3js.org/d3.v4.min.js
https://unpkg.com/topojson-client@3