National Official Languages in the Americas
This visualization displays the national official languages of countries in the Americas using an SVG map built with D3 v4. The map renders geographic boundaries from the Americas.json TopoJSON file, with each country filled by a color-coded pattern indicating its official language(s). Patterns are generated using custom d3.patternStripes and d3.patternGetNextClass helper functions, which create SVG stripe patterns with configurable colors, widths, angles, and opacities to distinguish between languages. The use of striped patterns rather than solid fills allows for the representation of multiple official languages per country, with each language assigned a distinct stripe color.
AI-generated descriptionA 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.