with several caveats that I’ll point out in the following posts: an attempt at a map of countries colored by whether their national anthem includes their country name (blue) or not (red)

https://query.wikidata.org/embed.html#%23title%3A%28flawed%29%20map%20of%20countries%20%28UN%20member%20states%29%20colored%20by%20whether%20their%20national%20anthem%20includes%20their%20country%20name%20%28%E2%80%9CO%20Canada%E2%80%9D%29%20or%20not%20%28%E2%80%9CStar-Spangled%20Banner%E2%80%9D%29%0A%23%20looks%20at%20%E2%80%9Cnamed%20after%E2%80%9D%20on%20the%20anthem%2C%20whether%20the%20anthem%E2%80%99s%20title%20or%20native%20label%20contains%20the%20country%E2%80%99s%20native%20label%2C%20and%20whether%20the%20anthem%E2%80%99s%20label%20in%20the%20UI%20language%20contains%20the%20country%E2%80%99s%20label%20in%20the%20UI%20language%0A%23%20results%20will%20thus%20vary%20based%20on%20the%20UI%20language%21%20also%2C%20for%20various%20reasons%20%28including%20Q35%20%E2%89%A0%20Q756617%29%20the%20map%20doesn%E2%80%99t%20cover%20all%20land%0A%23defaultView%3AMap%7B%22hide%22%3A%5B%22%3Flayer%22%2C%20%22%3Frgb%22%2C%20%22%3Fshape_%22%5D%7D%0ASELECT%0A%3Fstate%0A%3FstateLabel%0A%3Fanthem%0A%3FanthemLabel%0A%28MAX%28%0A%20%20COALESCE%28%3FanthemNamedAfterState%2C%20false%29%20%7C%7C%0A%20%20COALESCE%28CONTAINS%28%3FanthemNativeLabel%2C%20%3FstateNativeLabel%29%2C%20false%29%20%7C%7C%0A%20%20COALESCE%28CONTAINS%28%3FanthemTitle%2C%20%3FstateNativeLabel%29%2C%20false%29%20%7C%7C%0A%20%20CONTAINS%28%3FanthemLabel%2C%20%3FstateLabel%29%0A%20%29%20AS%20%3Flayer%29%0A%28IF%28%3Flayer%2C%20%2236c%22%2C%20%22bf3c2c%22%29%20AS%20%3Frgb%29%0A%28SAMPLE%28%3Fshape%29%20AS%20%3Fshape_%29%0AWITH%20%7B%0A%20%20SELECT%20DISTINCT%20%3Fstate%20WHERE%20%7B%0A%20%20%20%20%3Fstate%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ3624078%3B%0A%20%20%20%20%20%20%20%20%20%20%20p%3AP463%20%3FmemberOfStatement.%0A%20%20%20%20%3FmemberOfStatement%20a%20wikibase%3ABestRank%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ps%3AP463%20wd%3AQ1065.%0A%20%20%20%20MINUS%20%7B%20%3FmemberOfStatement%20pq%3AP582%20%3FendTime.%20%7D%0A%20%20%20%20MINUS%20%7B%20%3Fstate%20wdt%3AP576%7Cwdt%3AP582%20%3Fend.%20%7D%0A%20%20%7D%0A%7D%20AS%20%25states%20WHERE%20%7B%0A%20%20INCLUDE%20%25states.%0A%20%20%3Fstate%20wdt%3AP85%20%3Fanthem%3B%0A%20%20%20%20%20%20%20%20%20wdt%3AP3896%20%3Fshape.%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fanthem%20wdt%3AP138%20%3Fstate.%0A%20%20%20%20BIND%28true%20AS%20%3FanthemNamedAfterState%29%0A%20%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fstate%20wdt%3AP1705%20%3FstateNativeLabel.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fanthem%20wdt%3AP1705%20%3FanthemNativeLabel.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fanthem%20wdt%3AP1476%20%3FanthemTitle.%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cmul%2Cen%22.%20%0A%20%20%20%20%3Fstate%20rdfs%3Alabel%20%3FstateLabel.%0A%20%20%20%20%3Fanthem%20rdfs%3Alabel%20%3FanthemLabel.%0A%20%20%7D%0A%7D%0AGROUP%20BY%20%3Fstate%20%3FstateLabel%20%3Fanthem%20%3FanthemLabel

first of all, you may notice the map doesn’t even cover all land. the query only looks at UN member states, so it’s missing some unrecognized territories; also, none of the Danish Realm is colored in, because (according to Wikidata, anyway) technically the Kingdom of Denmark (Q756617) is a member of the UN, yet only Denmark (Q35) has a geoshape that we can draw on the map (Kingdom of Denmark = [metropolitan] Denmark + Greenland + Faroe Islands, IIUC)
determining whether the national anthem includes the country name is also tricky. ideally, this would just be a check whether the “named after” statement exists; however, very few anthems have any “named after” statements at the moment, so the query also tries some fallbacks: it looks at the native label or title of the anthem and checks if it contains the native label of the country; and it also does the same with the labels of both in the UI language
that last part was necessary to add in a lot of countries where the anthem has no native label or title statement, but of course it also means that the query result varies by UI language, which is far from ideal. and it *still* isn’t enough to color Switzerland’s Swiss Psalm blue, either :/
(also, Mexico is a darker shade of red because according to Wikidata it has two national anthems. though neither statement has a reference, and Wikipedia mentions nothing of the sort, so that’s probably not right)