Today I watched this TED talk "Why city flags may be the worst-designed thing you've never noticed" and it made me really curious about how the five basic principles of flag design apply to countries. Certainly, most country flags are so simple that a child can draw them from memory. But this principle increases the odds of having flag duplicates, and to show this I've written the following WL code:
countries = CountryData["Countries", "Name"];
flags = Rasterize /@ CountryData["Countries", "Flag"];
similarities = # -> First[Nearest[DeleteCases[flags, #], #]] & /@ flags;
g = Graph[Labeled[#[[2]],Placed[Tooltip[#[[2]],#[[1]]],{.7,.6}]]&/@Transpose[{countries,flags}],similarities,ImageSize->3500]
ImageCollage[Length[#] -> ImageCollage[#] & /@ WeaklyConnectedComponents[g]]
GraphicsGrid[Partition[Flatten[WeaklyConnectedComponents[g]], 6], Background -> Gray]
Feel free to explore the similarity graph of flags in the CDF attached below.
Are these similarities mere accidents or deliberate flag copies? Mapping the countries with similar flags might answer this question. To get started, here is how to Map the Countries of Africa with Their Flags.
Attachments: