Article 63T61 Finding similar world flags with Mathematica

Finding similar world flags with Mathematica

by
John
from John D. Cook on (#63T61)

A week ago I posted some pairs of similar flags on Twitter, and later I found that Mathematica's CountryData database contains flag descriptions. So I thought I'd use the flag descriptions to see which flags Mathematica things are similar.

For example, the FlagDescription attribute for Chad in Mathematica is

Three equal vertical bands of blue (hoist side), yellow, and red; similar to the flag of Romania; also similar to the flags of Andorra and Moldova, both of which have a national coat of arms centered in the yellow band; design was based on the flag of France.

I had Mathematica output a list of countries and flag descriptions, then searched the output for the word similar." I then made the following groupings based on the output [1].

Chad / Romania

Chad.png Romania.png

Bolivia / Ghana

Bolivia.png Ghana.png

Colombia / Ecuador

Equador.png Columbia.png

India / Niger

India.png Niger.png

Ireland / Cote d'Ivoire

Ireland.png Ivory_Coast.png

El Salvador / Nicaragua / Honduras

El_Salvador.png Nicaragua.png Honduras.png

Egypt / Iraq / Syria / Yemen

Egypt.png Iraq.png

Syria.png Yemen.png

Luxembourg / The Netherlands

Luxembourg.png Netherlands.png

Andorra / Moldova
Andorra.png Moldova.pngIndonesia / Monaco

Indonesia.png Monaco.png

Emoji

Each flag has an emoji, so here are the groupings above using emoji icons

  • 1f1f9-1f1e9.png 1f1f7-1f1f4.png
  • 1f1e7-1f1f4.png 1f1ec-1f1ed.png
  • 1f1e8-1f1f4.png 1f1ea-1f1e8.png
  • 1f1ee-1f1f3.png 1f1f3-1f1ea.png
  • 1f1ee-1f1ea.png 1f1e8-1f1ee.png
  • 1f1f8-1f1fb.png 1f1f3-1f1ee.png 1f1ed-1f1f3.png
  • 1f1ea-1f1ec.png 1f1ee-1f1f6.png 1f1f8-1f1fe.png 1f1fe-1f1ea.png
  • 1f1f1-1f1fa.png 1f1f3-1f1f1.png
  • 1f1e6-1f1e9.png 1f1f2-1f1e9.png
  • 1f1ee-1f1e9.png 1f1f2-1f1e8.png
Related posts

[1] The groupings are based on Mathematica's output, but I did some editing. Strictly following Mathematica's descriptions would have been complicated. For example, Mathematica's description might say A is similar to B, but not say B is similar to A. Or it might cluster four flags together that could better be split into two pairs.

The post Finding similar world flags with Mathematica first appeared on John D. Cook.
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments