"""Get the flag emoji of a country using its 2 (or 3)-letter ISO country code"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/04_flag.ipynb.

# %% auto 0
__all__ = ['country_code_flag', 'flag']

# %% ../nbs/04_flag.ipynb 4
_manually_added = {
    "UNITED STATES": "🇺🇲",
    "UNITED KINGDOM": "🇬🇧",
    "GREAT BRITAIN": "🇬🇧",
    "RUSSIA": "🇷🇺",
    "CZECH REPUBLIC": "🇨🇿",
}


country_code_flag = {
    "AFGHANISTAN": "🇦🇫",
    "THE ISLAMIC REPUBLIC OF AFGHANISTAN": "🇦🇫",
    "AF": "🇦🇫",
    "AFG": "🇦🇫",
    "ÅLAND ISLANDS": "🇦🇽",
    "ÅLAND": "🇦🇽",
    "AX": "🇦🇽",
    "ALA": "🇦🇽",
    "ALBANIA": "🇦🇱",
    "THE REPUBLIC OF ALBANIA": "🇦🇱",
    "AL": "🇦🇱",
    "ALB": "🇦🇱",
    "ALGERIA": "🇩🇿",
    "THE PEOPLE'S DEMOCRATIC REPUBLIC OF ALGERIA": "🇩🇿",
    "DZ": "🇩🇿",
    "DZA": "🇩🇿",
    "AMERICAN SAMOA": "🇦🇸",
    "AS": "🇦🇸",
    "ASM": "🇦🇸",
    "ANDORRA": "🇦🇩",
    "THE PRINCIPALITY OF ANDORRA": "🇦🇩",
    "AD": "🇦🇩",
    "AND": "🇦🇩",
    "ANGOLA": "🇦🇴",
    "THE REPUBLIC OF ANGOLA": "🇦🇴",
    "AO": "🇦🇴",
    "AGO": "🇦🇴",
    "ANGUILLA": "🇦🇮",
    "AI": "🇦🇮",
    "AIA": "🇦🇮",
    "ANTARCTICA": "🇦🇶",
    "AQ": "🇦🇶",
    "ATA": "🇦🇶",
    "ANTIGUA AND BARBUDA": "🇦🇬",
    "AG": "🇦🇬",
    "ATG": "🇦🇬",
    "ARGENTINA": "🇦🇷",
    "THE ARGENTINE REPUBLIC": "🇦🇷",
    "AR": "🇦🇷",
    "ARG": "🇦🇷",
    "ARMENIA": "🇦🇲",
    "THE REPUBLIC OF ARMENIA": "🇦🇲",
    "AM": "🇦🇲",
    "ARM": "🇦🇲",
    "ARUBA": "🇦🇼",
    "THE COUNTRY OF ARUBA": "🇦🇼",
    "AW": "🇦🇼",
    "ABW": "🇦🇼",
    "AUSTRALIA": "🇦🇺",
    "THE COMMONWEALTH OF AUSTRALIA": "🇦🇺",
    "AU": "🇦🇺",
    "AUS": "🇦🇺",
    "AUSTRIA": "🇦🇹",
    "THE REPUBLIC OF AUSTRIA": "🇦🇹",
    "AT": "🇦🇹",
    "AUT": "🇦🇹",
    "AZERBAIJAN": "🇦🇿",
    "THE REPUBLIC OF AZERBAIJAN": "🇦🇿",
    "AZ": "🇦🇿",
    "AZE": "🇦🇿",
    "BAHAMAS": "🇧🇸",
    "THE COMMONWEALTH OF THE BAHAMAS": "🇧🇸",
    "BS": "🇧🇸",
    "BHS": "🇧🇸",
    "BAHRAIN": "🇧🇭",
    "THE KINGDOM OF BAHRAIN": "🇧🇭",
    "BH": "🇧🇭",
    "BHR": "🇧🇭",
    "BANGLADESH": "🇧🇩",
    "THE PEOPLE'S REPUBLIC OF BANGLADESH": "🇧🇩",
    "BD": "🇧🇩",
    "BGD": "🇧🇩",
    "BARBADOS": "🇧🇧",
    "BB": "🇧🇧",
    "BRB": "🇧🇧",
    "BELARUS": "🇧🇾",
    "THE REPUBLIC OF BELARUS": "🇧🇾",
    "BY": "🇧🇾",
    "BLR": "🇧🇾",
    "BELGIUM": "🇧🇪",
    "THE KINGDOM OF BELGIUM": "🇧🇪",
    "BE": "🇧🇪",
    "BEL": "🇧🇪",
    "BELIZE": "🇧🇿",
    "BZ": "🇧🇿",
    "BLZ": "🇧🇿",
    "BENIN": "🇧🇯",
    "THE REPUBLIC OF BENIN": "🇧🇯",
    "BJ": "🇧🇯",
    "BEN": "🇧🇯",
    "BERMUDA": "🇧🇲",
    "BM": "🇧🇲",
    "BMU": "🇧🇲",
    "BHUTAN": "🇧🇹",
    "THE KINGDOM OF BHUTAN": "🇧🇹",
    "BT": "🇧🇹",
    "BTN": "🇧🇹",
    "BOLIVIA": "🇧🇴",
    "THE PLURINATIONAL STATE OF BOLIVIA": "🇧🇴",
    "BO": "🇧🇴",
    "BOL": "🇧🇴",
    "BONAIRE  SINT EUSTATIUS  SABA": "🇧🇶",
    "BONAIRE, SINT EUSTATIUS AND SABA": "🇧🇶",
    "BQ": "🇧🇶",
    "BES": "🇧🇶",
    "NL": "🇳🇱",
    "BOSNIA AND HERZEGOVINA": "🇧🇦",
    "BA": "🇧🇦",
    "BIH": "🇧🇦",
    "BOTSWANA": "🇧🇼",
    "THE REPUBLIC OF BOTSWANA": "🇧🇼",
    "BW": "🇧🇼",
    "BWA": "🇧🇼",
    "BOUVET ISLAND": "🇧🇻",
    "BV": "🇧🇻",
    "BVT": "🇧🇻",
    "": "🇪🇭",
    "BRAZIL": "🇧🇷",
    "THE FEDERATIVE REPUBLIC OF BRAZIL": "🇧🇷",
    "BR": "🇧🇷",
    "BRA": "🇧🇷",
    "BRITISH INDIAN OCEAN TERRITORY": "🇮🇴",
    "THE BRITISH INDIAN OCEAN TERRITORY": "🇮🇴",
    "IO": "🇮🇴",
    "IOT": "🇮🇴",
    "BRUNEI DARUSSALAM": "🇧🇳",
    "BN": "🇧🇳",
    "BRN": "🇧🇳",
    "BULGARIA": "🇧🇬",
    "THE REPUBLIC OF BULGARIA": "🇧🇬",
    "BG": "🇧🇬",
    "BGR": "🇧🇬",
    "BURKINA FASO": "🇧🇫",
    "BF": "🇧🇫",
    "BFA": "🇧🇫",
    "BURUNDI": "🇧🇮",
    "THE REPUBLIC OF BURUNDI": "🇧🇮",
    "BI": "🇧🇮",
    "BDI": "🇧🇮",
    "CABO VERDE": "🇨🇻",
    "THE REPUBLIC OF CABO VERDE": "🇨🇻",
    "CV": "🇨🇻",
    "CPV": "🇨🇻",
    "CAMBODIA": "🇰🇭",
    "THE KINGDOM OF CAMBODIA": "🇰🇭",
    "KH": "🇰🇭",
    "KHM": "🇰🇭",
    "CAMEROON": "🇨🇲",
    "THE REPUBLIC OF CAMEROON": "🇨🇲",
    "CM": "🇨🇲",
    "CMR": "🇨🇲",
    "CANADA": "🇨🇦",
    "CA": "🇨🇦",
    "CAN": "🇨🇦",
    "CAYMAN ISLANDS": "🇰🇾",
    "THE CAYMAN ISLANDS": "🇰🇾",
    "KY": "🇰🇾",
    "CYM": "🇰🇾",
    "CENTRAL AFRICAN REPUBLIC": "🇨🇫",
    "THE CENTRAL AFRICAN REPUBLIC": "🇨🇫",
    "CF": "🇨🇫",
    "CAF": "🇨🇫",
    "CHAD": "🇹🇩",
    "THE REPUBLIC OF CHAD": "🇹🇩",
    "TD": "🇹🇩",
    "TCD": "🇹🇩",
    "CHILE": "🇨🇱",
    "THE REPUBLIC OF CHILE": "🇨🇱",
    "CL": "🇨🇱",
    "CHL": "🇨🇱",
    "CHINA": "🇨🇳",
    "THE PEOPLE'S REPUBLIC OF CHINA": "🇨🇳",
    "CN": "🇨🇳",
    "CHN": "🇨🇳",
    "CHRISTMAS ISLAND": "🇨🇽",
    "THE TERRITORY OF CHRISTMAS ISLAND": "🇨🇽",
    "CX": "🇨🇽",
    "CXR": "🇨🇽",
    "COCOS ISLANDS": "🇨🇨",
    "THE TERRITORY OF COCOS (KEELING) ISLANDS": "🇨🇨",
    "CC": "🇨🇨",
    "CCK": "🇨🇨",
    "COLOMBIA": "🇨🇴",
    "THE REPUBLIC OF COLOMBIA": "🇨🇴",
    "CO": "🇨🇴",
    "COL": "🇨🇴",
    "COMOROS": "🇰🇲",
    "THE UNION OF THE COMOROS": "🇰🇲",
    "KM": "🇰🇲",
    "COM": "🇰🇲",
    "CONGO": "🇨🇬",
    "THE DEMOCRATIC REPUBLIC OF THE CONGO": "🇨🇩",
    "CD": "🇨🇩",
    "COD": "🇨🇩",
    "THE REPUBLIC OF THE CONGO": "🇨🇬",
    "CG": "🇨🇬",
    "COG": "🇨🇬",
    "COOK ISLANDS": "🇨🇰",
    "THE COOK ISLANDS": "🇨🇰",
    "CK": "🇨🇰",
    "COK": "🇨🇰",
    "COSTA RICA": "🇨🇷",
    "THE REPUBLIC OF COSTA RICA": "🇨🇷",
    "CR": "🇨🇷",
    "CRI": "🇨🇷",
    "CÔTE D'IVOIRE": "🇨🇮",
    "THE REPUBLIC OF CÔTE D'IVOIRE": "🇨🇮",
    "CI": "🇨🇮",
    "CIV": "🇨🇮",
    "CROATIA": "🇭🇷",
    "THE REPUBLIC OF CROATIA": "🇭🇷",
    "HR": "🇭🇷",
    "HRV": "🇭🇷",
    "CUBA": "🇨🇺",
    "THE REPUBLIC OF CUBA": "🇨🇺",
    "CU": "🇨🇺",
    "CUB": "🇨🇺",
    "CURAÇAO": "🇨🇼",
    "THE COUNTRY OF CURAÇAO": "🇨🇼",
    "CW": "🇨🇼",
    "CUW": "🇨🇼",
    "CYPRUS": "🇨🇾",
    "THE REPUBLIC OF CYPRUS": "🇨🇾",
    "CY": "🇨🇾",
    "CYP": "🇨🇾",
    "CZECHIA": "🇨🇿",
    "THE CZECH REPUBLIC": "🇨🇿",
    "CZ": "🇨🇿",
    "CZE": "🇨🇿",
    "DENMARK": "🇩🇰",
    "THE KINGDOM OF DENMARK": "🇩🇰",
    "DK": "🇩🇰",
    "DNK": "🇩🇰",
    "DJIBOUTI": "🇩🇯",
    "THE REPUBLIC OF DJIBOUTI": "🇩🇯",
    "DJ": "🇩🇯",
    "DJI": "🇩🇯",
    "DOMINICA": "🇩🇲",
    "THE COMMONWEALTH OF DOMINICA": "🇩🇲",
    "DM": "🇩🇲",
    "DMA": "🇩🇲",
    "DOMINICAN REPUBLIC": "🇩🇴",
    "THE DOMINICAN REPUBLIC": "🇩🇴",
    "DO": "🇩🇴",
    "DOM": "🇩🇴",
    "ECUADOR": "🇪🇨",
    "THE REPUBLIC OF ECUADOR": "🇪🇨",
    "EC": "🇪🇨",
    "ECU": "🇪🇨",
    "EGYPT": "🇪🇬",
    "THE ARAB REPUBLIC OF EGYPT": "🇪🇬",
    "EG": "🇪🇬",
    "EGY": "🇪🇬",
    "EL SALVADOR": "🇸🇻",
    "THE REPUBLIC OF EL SALVADOR": "🇸🇻",
    "SV": "🇸🇻",
    "SLV": "🇸🇻",
    "EQUATORIAL GUINEA": "🇬🇶",
    "THE REPUBLIC OF EQUATORIAL GUINEA": "🇬🇶",
    "GQ": "🇬🇶",
    "GNQ": "🇬🇶",
    "ERITREA": "🇪🇷",
    "THE STATE OF ERITREA": "🇪🇷",
    "ER": "🇪🇷",
    "ERI": "🇪🇷",
    "ESTONIA": "🇪🇪",
    "THE REPUBLIC OF ESTONIA": "🇪🇪",
    "EE": "🇪🇪",
    "EST": "🇪🇪",
    "ESWATINI": "🇸🇿",
    "THE KINGDOM OF ESWATINI": "🇸🇿",
    "SZ": "🇸🇿",
    "SWZ": "🇸🇿",
    "ETHIOPIA": "🇪🇹",
    "THE FEDERAL DEMOCRATIC REPUBLIC OF ETHIOPIA": "🇪🇹",
    "ET": "🇪🇹",
    "ETH": "🇪🇹",
    "FALKLAND ISLANDS": "🇫🇰",
    "THE FALKLAND ISLANDS": "🇫🇰",
    "FK": "🇫🇰",
    "FLK": "🇫🇰",
    "FAROE ISLANDS": "🇫🇴",
    "THE FAROE ISLANDS": "🇫🇴",
    "FO": "🇫🇴",
    "FRO": "🇫🇴",
    "FIJI": "🇫🇯",
    "THE REPUBLIC OF FIJI": "🇫🇯",
    "FJ": "🇫🇯",
    "FJI": "🇫🇯",
    "FINLAND": "🇫🇮",
    "THE REPUBLIC OF FINLAND": "🇫🇮",
    "FI": "🇫🇮",
    "FIN": "🇫🇮",
    "FRANCE": "🇫🇷",
    "THE FRENCH REPUBLIC": "🇫🇷",
    "FR": "🇫🇷",
    "FRA": "🇫🇷",
    "FRENCH GUIANA": "🇬🇫",
    "GUYANE": "🇬🇫",
    "GF": "🇬🇫",
    "GUF": "🇬🇫",
    "FRENCH POLYNESIA": "🇵🇫",
    "OVERSEAS LANDS OF FRENCH POLYNESIA": "🇵🇫",
    "PF": "🇵🇫",
    "PYF": "🇵🇫",
    "FRENCH SOUTHERN TERRITORIES": "🇹🇫",
    "THE FRENCH SOUTHERN AND ANTARCTIC LANDS": "🇹🇫",
    "TF": "🇹🇫",
    "ATF": "🇹🇫",
    "GABON": "🇬🇦",
    "THE GABONESE REPUBLIC": "🇬🇦",
    "GA": "🇬🇦",
    "GAB": "🇬🇦",
    "GAMBIA": "🇬🇲",
    "THE REPUBLIC OF THE GAMBIA": "🇬🇲",
    "GM": "🇬🇲",
    "GMB": "🇬🇲",
    "GEORGIA": "🇬🇪",
    "GE": "🇬🇪",
    "GEO": "🇬🇪",
    "GERMANY": "🇩🇪",
    "THE FEDERAL REPUBLIC OF GERMANY": "🇩🇪",
    "DE": "🇩🇪",
    "DEU": "🇩🇪",
    "GHANA": "🇬🇭",
    "THE REPUBLIC OF GHANA": "🇬🇭",
    "GH": "🇬🇭",
    "GHA": "🇬🇭",
    "GIBRALTAR": "🇬🇮",
    "GI": "🇬🇮",
    "GIB": "🇬🇮",
    "GREECE": "🇬🇷",
    "THE HELLENIC REPUBLIC": "🇬🇷",
    "GR": "🇬🇷",
    "GRC": "🇬🇷",
    "GREENLAND": "🇬🇱",
    "GL": "🇬🇱",
    "GRL": "🇬🇱",
    "GRENADA": "🇬🇩",
    "GD": "🇬🇩",
    "GRD": "🇬🇩",
    "GUADELOUPE": "🇬🇵",
    "GP": "🇬🇵",
    "GLP": "🇬🇵",
    "GUAM": "🇬🇺",
    "GU": "🇬🇺",
    "GUM": "🇬🇺",
    "GUATEMALA": "🇬🇹",
    "THE REPUBLIC OF GUATEMALA": "🇬🇹",
    "GT": "🇬🇹",
    "GTM": "🇬🇹",
    "GUERNSEY": "🇬🇬",
    "THE BAILIWICK OF GUERNSEY": "🇬🇬",
    "GG": "🇬🇬",
    "GGY": "🇬🇬",
    "GUINEA": "🇬🇳",
    "THE REPUBLIC OF GUINEA": "🇬🇳",
    "GN": "🇬🇳",
    "GIN": "🇬🇳",
    "GUINEA-BISSAU": "🇬🇼",
    "THE REPUBLIC OF GUINEA-BISSAU": "🇬🇼",
    "GW": "🇬🇼",
    "GNB": "🇬🇼",
    "GUYANA": "🇬🇾",
    "THE CO-OPERATIVE REPUBLIC OF GUYANA": "🇬🇾",
    "GY": "🇬🇾",
    "GUY": "🇬🇾",
    "HAITI": "🇭🇹",
    "THE REPUBLIC OF HAITI": "🇭🇹",
    "HT": "🇭🇹",
    "HTI": "🇭🇹",
    "HEARD ISLAND AND MCDONALD ISLANDS": "🇭🇲",
    "THE TERRITORY OF HEARD ISLAND AND MCDONALD ISLANDS": "🇭🇲",
    "HM": "🇭🇲",
    "HMD": "🇭🇲",
    "HOLY SEE": "🇻🇦",
    "THE HOLY SEE": "🇻🇦",
    "VA": "🇻🇦",
    "VAT": "🇻🇦",
    "HONDURAS": "🇭🇳",
    "THE REPUBLIC OF HONDURAS": "🇭🇳",
    "HN": "🇭🇳",
    "HND": "🇭🇳",
    "HONG KONG": "🇭🇰",
    "THE HONG KONG SPECIAL ADMINISTRATIVE REGION OF CHINA": "🇭🇰",
    "HK": "🇭🇰",
    "HKG": "🇭🇰",
    "HUNGARY": "🇭🇺",
    "HU": "🇭🇺",
    "HUN": "🇭🇺",
    "ICELAND": "🇮🇸",
    "IS": "🇮🇸",
    "ISL": "🇮🇸",
    "INDIA": "🇮🇳",
    "THE REPUBLIC OF INDIA": "🇮🇳",
    "IN": "🇮🇳",
    "IND": "🇮🇳",
    "INDONESIA": "🇮🇩",
    "THE REPUBLIC OF INDONESIA": "🇮🇩",
    "ID": "🇮🇩",
    "IDN": "🇮🇩",
    "IRAN": "🇮🇷",
    "THE ISLAMIC REPUBLIC OF IRAN": "🇮🇷",
    "IR": "🇮🇷",
    "IRN": "🇮🇷",
    "IRAQ": "🇮🇶",
    "THE REPUBLIC OF IRAQ": "🇮🇶",
    "IQ": "🇮🇶",
    "IRQ": "🇮🇶",
    "IRELAND": "🇮🇪",
    "IE": "🇮🇪",
    "IRL": "🇮🇪",
    "ISLE OF MAN": "🇮🇲",
    "THE ISLE OF MAN": "🇮🇲",
    "IM": "🇮🇲",
    "IMN": "🇮🇲",
    "ISRAEL": "🇮🇱",
    "THE STATE OF ISRAEL": "🇮🇱",
    "IL": "🇮🇱",
    "ISR": "🇮🇱",
    "ITALY": "🇮🇹",
    "THE ITALIAN REPUBLIC": "🇮🇹",
    "IT": "🇮🇹",
    "ITA": "🇮🇹",
    "JAMAICA": "🇯🇲",
    "JM": "🇯🇲",
    "JAM": "🇯🇲",
    "JAPAN": "🇯🇵",
    "JP": "🇯🇵",
    "JPN": "🇯🇵",
    "JERSEY": "🇯🇪",
    "THE BAILIWICK OF JERSEY": "🇯🇪",
    "JE": "🇯🇪",
    "JEY": "🇯🇪",
    "JORDAN": "🇯🇴",
    "THE HASHEMITE KINGDOM OF JORDAN": "🇯🇴",
    "JO": "🇯🇴",
    "JOR": "🇯🇴",
    "KAZAKHSTAN": "🇰🇿",
    "THE REPUBLIC OF KAZAKHSTAN": "🇰🇿",
    "KZ": "🇰🇿",
    "KAZ": "🇰🇿",
    "KENYA": "🇰🇪",
    "THE REPUBLIC OF KENYA": "🇰🇪",
    "KE": "🇰🇪",
    "KEN": "🇰🇪",
    "KIRIBATI": "🇰🇮",
    "THE REPUBLIC OF KIRIBATI": "🇰🇮",
    "KI": "🇰🇮",
    "KIR": "🇰🇮",
    "KOREA": "🇰🇷",
    "THE DEMOCRATIC PEOPLE'S REPUBLIC OF KOREA": "🇰🇵",
    "KP": "🇰🇵",
    "PRK": "🇰🇵",
    "THE REPUBLIC OF KOREA": "🇰🇷",
    "KR": "🇰🇷",
    "KOR": "🇰🇷",
    "KUWAIT": "🇰🇼",
    "THE STATE OF KUWAIT": "🇰🇼",
    "KW": "🇰🇼",
    "KWT": "🇰🇼",
    "KYRGYZSTAN": "🇰🇬",
    "THE KYRGYZ REPUBLIC": "🇰🇬",
    "KG": "🇰🇬",
    "KGZ": "🇰🇬",
    "LAO PEOPLE'S DEMOCRATIC REPUBLIC": "🇱🇦",
    "THE LAO PEOPLE'S DEMOCRATIC REPUBLIC": "🇱🇦",
    "LA": "🇱🇦",
    "LAO": "🇱🇦",
    "LATVIA": "🇱🇻",
    "THE REPUBLIC OF LATVIA": "🇱🇻",
    "LV": "🇱🇻",
    "LVA": "🇱🇻",
    "LEBANON": "🇱🇧",
    "THE LEBANESE REPUBLIC": "🇱🇧",
    "LB": "🇱🇧",
    "LBN": "🇱🇧",
    "LESOTHO": "🇱🇸",
    "THE KINGDOM OF LESOTHO": "🇱🇸",
    "LS": "🇱🇸",
    "LSO": "🇱🇸",
    "LIBERIA": "🇱🇷",
    "THE REPUBLIC OF LIBERIA": "🇱🇷",
    "LR": "🇱🇷",
    "LBR": "🇱🇷",
    "LIBYA": "🇱🇾",
    "THE STATE OF LIBYA": "🇱🇾",
    "LY": "🇱🇾",
    "LBY": "🇱🇾",
    "LIECHTENSTEIN": "🇱🇮",
    "THE PRINCIPALITY OF LIECHTENSTEIN": "🇱🇮",
    "LI": "🇱🇮",
    "LIE": "🇱🇮",
    "LITHUANIA": "🇱🇹",
    "THE REPUBLIC OF LITHUANIA": "🇱🇹",
    "LT": "🇱🇹",
    "LTU": "🇱🇹",
    "LUXEMBOURG": "🇱🇺",
    "THE GRAND DUCHY OF LUXEMBOURG": "🇱🇺",
    "LU": "🇱🇺",
    "LUX": "🇱🇺",
    "MACAO": "🇲🇴",
    "THE MACAO SPECIAL ADMINISTRATIVE REGION OF CHINA": "🇲🇴",
    "MO": "🇲🇴",
    "MAC": "🇲🇴",
    "MADAGASCAR": "🇲🇬",
    "THE REPUBLIC OF MADAGASCAR": "🇲🇬",
    "MG": "🇲🇬",
    "MDG": "🇲🇬",
    "MALAWI": "🇲🇼",
    "THE REPUBLIC OF MALAWI": "🇲🇼",
    "MW": "🇲🇼",
    "MWI": "🇲🇼",
    "MALAYSIA": "🇲🇾",
    "MY": "🇲🇾",
    "MYS": "🇲🇾",
    "MALDIVES": "🇲🇻",
    "THE REPUBLIC OF MALDIVES": "🇲🇻",
    "MV": "🇲🇻",
    "MDV": "🇲🇻",
    "MALI": "🇲🇱",
    "THE REPUBLIC OF MALI": "🇲🇱",
    "ML": "🇲🇱",
    "MLI": "🇲🇱",
    "MALTA": "🇲🇹",
    "THE REPUBLIC OF MALTA": "🇲🇹",
    "MT": "🇲🇹",
    "MLT": "🇲🇹",
    "MARSHALL ISLANDS": "🇲🇭",
    "THE REPUBLIC OF THE MARSHALL ISLANDS": "🇲🇭",
    "MH": "🇲🇭",
    "MHL": "🇲🇭",
    "MARTINIQUE": "🇲🇶",
    "MQ": "🇲🇶",
    "MTQ": "🇲🇶",
    "MAURITANIA": "🇲🇷",
    "THE ISLAMIC REPUBLIC OF MAURITANIA": "🇲🇷",
    "MR": "🇲🇷",
    "MRT": "🇲🇷",
    "MAURITIUS": "🇲🇺",
    "THE REPUBLIC OF MAURITIUS": "🇲🇺",
    "MU": "🇲🇺",
    "MUS": "🇲🇺",
    "MAYOTTE": "🇾🇹",
    "THE DEPARTMENT OF MAYOTTE": "🇾🇹",
    "YT": "🇾🇹",
    "MYT": "🇾🇹",
    "MEXICO": "🇲🇽",
    "THE UNITED MEXICAN STATES": "🇲🇽",
    "MX": "🇲🇽",
    "MEX": "🇲🇽",
    "MICRONESIA": "🇫🇲",
    "THE FEDERATED STATES OF MICRONESIA": "🇫🇲",
    "FM": "🇫🇲",
    "FSM": "🇫🇲",
    "MOLDOVA": "🇲🇩",
    "THE REPUBLIC OF MOLDOVA": "🇲🇩",
    "MD": "🇲🇩",
    "MDA": "🇲🇩",
    "MONACO": "🇲🇨",
    "THE PRINCIPALITY OF MONACO": "🇲🇨",
    "MC": "🇲🇨",
    "MCO": "🇲🇨",
    "MONGOLIA": "🇲🇳",
    "MN": "🇲🇳",
    "MNG": "🇲🇳",
    "MONTENEGRO": "🇲🇪",
    "ME": "🇲🇪",
    "MNE": "🇲🇪",
    "MONTSERRAT": "🇲🇸",
    "MS": "🇲🇸",
    "MSR": "🇲🇸",
    "MOROCCO": "🇲🇦",
    "THE KINGDOM OF MOROCCO": "🇲🇦",
    "MA": "🇲🇦",
    "MAR": "🇲🇦",
    "MOZAMBIQUE": "🇲🇿",
    "THE REPUBLIC OF MOZAMBIQUE": "🇲🇿",
    "MZ": "🇲🇿",
    "MOZ": "🇲🇿",
    "MYANMAR": "🇲🇲",
    "THE REPUBLIC OF THE UNION OF MYANMAR": "🇲🇲",
    "MM": "🇲🇲",
    "MMR": "🇲🇲",
    "NAMIBIA": "🇳🇦",
    "THE REPUBLIC OF NAMIBIA": "🇳🇦",
    "NA": "🇳🇦",
    "NAM": "🇳🇦",
    "NAURU": "🇳🇷",
    "THE REPUBLIC OF NAURU": "🇳🇷",
    "NR": "🇳🇷",
    "NRU": "🇳🇷",
    "NEPAL": "🇳🇵",
    "THE FEDERAL DEMOCRATIC REPUBLIC OF NEPAL": "🇳🇵",
    "NP": "🇳🇵",
    "NPL": "🇳🇵",
    "NETHERLANDS": "🇳🇱",
    "THE KINGDOM OF THE NETHERLANDS": "🇳🇱",
    "NLD": "🇳🇱",
    "NEW CALEDONIA": "🇳🇨",
    "NC": "🇳🇨",
    "NCL": "🇳🇨",
    "NEW ZEALAND": "🇳🇿",
    "NZ": "🇳🇿",
    "NZL": "🇳🇿",
    "NICARAGUA": "🇳🇮",
    "THE REPUBLIC OF NICARAGUA": "🇳🇮",
    "NI": "🇳🇮",
    "NIC": "🇳🇮",
    "NIGER": "🇳🇪",
    "THE REPUBLIC OF THE NIGER": "🇳🇪",
    "NE": "🇳🇪",
    "NER": "🇳🇪",
    "NIGERIA": "🇳🇬",
    "THE FEDERAL REPUBLIC OF NIGERIA": "🇳🇬",
    "NG": "🇳🇬",
    "NGA": "🇳🇬",
    "NIUE": "🇳🇺",
    "NU": "🇳🇺",
    "NIU": "🇳🇺",
    "NORFOLK ISLAND": "🇳🇫",
    "THE TERRITORY OF NORFOLK ISLAND": "🇳🇫",
    "NF": "🇳🇫",
    "NFK": "🇳🇫",
    "NORTH MACEDONIA": "🇲🇰",
    "THE REPUBLIC OF NORTH MACEDONIA": "🇲🇰",
    "MK": "🇲🇰",
    "MKD": "🇲🇰",
    "NORTHERN MARIANA ISLANDS": "🇲🇵",
    "THE COMMONWEALTH OF THE NORTHERN MARIANA ISLANDS": "🇲🇵",
    "MP": "🇲🇵",
    "MNP": "🇲🇵",
    "NORWAY": "🇳🇴",
    "THE KINGDOM OF NORWAY": "🇳🇴",
    "NO": "🇳🇴",
    "NOR": "🇳🇴",
    "OMAN": "🇴🇲",
    "THE SULTANATE OF OMAN": "🇴🇲",
    "OM": "🇴🇲",
    "OMN": "🇴🇲",
    "PAKISTAN": "🇵🇰",
    "THE ISLAMIC REPUBLIC OF PAKISTAN": "🇵🇰",
    "PK": "🇵🇰",
    "PAK": "🇵🇰",
    "PALAU": "🇵🇼",
    "THE REPUBLIC OF PALAU": "🇵🇼",
    "PW": "🇵🇼",
    "PLW": "🇵🇼",
    "PALESTINE, STATE OF": "🇵🇸",
    "PALESTINE": "🇵🇸",
    "THE STATE OF PALESTINE": "🇵🇸",
    "PS": "🇵🇸",
    "PSE": "🇵🇸",
    "PANAMA": "🇵🇦",
    "THE REPUBLIC OF PANAMA": "🇵🇦",
    "PA": "🇵🇦",
    "PAN": "🇵🇦",
    "PAPUA NEW GUINEA": "🇵🇬",
    "THE INDEPENDENT STATE OF PAPUA NEW GUINEA": "🇵🇬",
    "PG": "🇵🇬",
    "PNG": "🇵🇬",
    "PARAGUAY": "🇵🇾",
    "THE REPUBLIC OF PARAGUAY": "🇵🇾",
    "PY": "🇵🇾",
    "PRY": "🇵🇾",
    "PERU": "🇵🇪",
    "THE REPUBLIC OF PERU": "🇵🇪",
    "PE": "🇵🇪",
    "PER": "🇵🇪",
    "PHILIPPINES": "🇵🇭",
    "THE REPUBLIC OF THE PHILIPPINES": "🇵🇭",
    "PH": "🇵🇭",
    "PHL": "🇵🇭",
    "PITCAIRN": "🇵🇳",
    "THE PITCAIRN, HENDERSON, DUCIE AND OENO ISLANDS": "🇵🇳",
    "PN": "🇵🇳",
    "PCN": "🇵🇳",
    "POLAND": "🇵🇱",
    "THE REPUBLIC OF POLAND": "🇵🇱",
    "PL": "🇵🇱",
    "POL": "🇵🇱",
    "PORTUGAL": "🇵🇹",
    "THE PORTUGUESE REPUBLIC": "🇵🇹",
    "PT": "🇵🇹",
    "PRT": "🇵🇹",
    "PUERTO RICO": "🇵🇷",
    "THE COMMONWEALTH OF PUERTO RICO": "🇵🇷",
    "PR": "🇵🇷",
    "PRI": "🇵🇷",
    "QATAR": "🇶🇦",
    "THE STATE OF QATAR": "🇶🇦",
    "QA": "🇶🇦",
    "QAT": "🇶🇦",
    "RÉUNION": "🇷🇪",
    "RE": "🇷🇪",
    "REU": "🇷🇪",
    "ROMANIA": "🇷🇴",
    "RO": "🇷🇴",
    "ROU": "🇷🇴",
    "RUSSIAN FEDERATION": "🇷🇺",
    "THE RUSSIAN FEDERATION": "🇷🇺",
    "RU": "🇷🇺",
    "RUS": "🇷🇺",
    "RWANDA": "🇷🇼",
    "THE REPUBLIC OF RWANDA": "🇷🇼",
    "RW": "🇷🇼",
    "RWA": "🇷🇼",
    "SAINT BARTHÉLEMY": "🇧🇱",
    "THE COLLECTIVITY OF SAINT-BARTHÉLEMY": "🇧🇱",
    "BL": "🇧🇱",
    "BLM": "🇧🇱",
    "SAINT HELENA  ASCENSION ISLAND  TRISTAN DA CUNHA": "🇸🇭",
    "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA": "🇸🇭",
    "SH": "🇸🇭",
    "SHN": "🇸🇭",
    "SAINT KITTS AND NEVIS": "🇰🇳",
    "THE FEDERATION OF SAINT KITTS AND NEVIS": "🇰🇳",
    "KN": "🇰🇳",
    "KNA": "🇰🇳",
    "SAINT LUCIA": "🇱🇨",
    "LC": "🇱🇨",
    "LCA": "🇱🇨",
    "SAINT MARTIN": "🇲🇫",
    "THE COLLECTIVITY OF SAINT-MARTIN": "🇲🇫",
    "MF": "🇲🇫",
    "MAF": "🇲🇫",
    "SAINT PIERRE AND MIQUELON": "🇵🇲",
    "THE OVERSEAS COLLECTIVITY OF SAINT-PIERRE AND MIQUELON": "🇵🇲",
    "PM": "🇵🇲",
    "SPM": "🇵🇲",
    "SAINT VINCENT AND THE GRENADINES": "🇻🇨",
    "VC": "🇻🇨",
    "VCT": "🇻🇨",
    "SAMOA": "🇼🇸",
    "THE INDEPENDENT STATE OF SAMOA": "🇼🇸",
    "WS": "🇼🇸",
    "WSM": "🇼🇸",
    "SAN MARINO": "🇸🇲",
    "THE REPUBLIC OF SAN MARINO": "🇸🇲",
    "SM": "🇸🇲",
    "SMR": "🇸🇲",
    "SAO TOME AND PRINCIPE": "🇸🇹",
    "THE DEMOCRATIC REPUBLIC OF SÃO TOMÉ AND PRÍNCIPE": "🇸🇹",
    "ST": "🇸🇹",
    "STP": "🇸🇹",
    "SAUDI ARABIA": "🇸🇦",
    "THE KINGDOM OF SAUDI ARABIA": "🇸🇦",
    "SA": "🇸🇦",
    "SAU": "🇸🇦",
    "SENEGAL": "🇸🇳",
    "THE REPUBLIC OF SENEGAL": "🇸🇳",
    "SN": "🇸🇳",
    "SEN": "🇸🇳",
    "SERBIA": "🇷🇸",
    "THE REPUBLIC OF SERBIA": "🇷🇸",
    "RS": "🇷🇸",
    "SRB": "🇷🇸",
    "SEYCHELLES": "🇸🇨",
    "THE REPUBLIC OF SEYCHELLES": "🇸🇨",
    "SC": "🇸🇨",
    "SYC": "🇸🇨",
    "SIERRA LEONE": "🇸🇱",
    "THE REPUBLIC OF SIERRA LEONE": "🇸🇱",
    "SL": "🇸🇱",
    "SLE": "🇸🇱",
    "SINGAPORE": "🇸🇬",
    "THE REPUBLIC OF SINGAPORE": "🇸🇬",
    "SG": "🇸🇬",
    "SGP": "🇸🇬",
    "SINT MAARTEN": "🇸🇽",
    "SX": "🇸🇽",
    "SXM": "🇸🇽",
    "SLOVAKIA": "🇸🇰",
    "THE SLOVAK REPUBLIC": "🇸🇰",
    "SK": "🇸🇰",
    "SVK": "🇸🇰",
    "SLOVENIA": "🇸🇮",
    "THE REPUBLIC OF SLOVENIA": "🇸🇮",
    "SI": "🇸🇮",
    "SVN": "🇸🇮",
    "SOLOMON ISLANDS": "🇸🇧",
    "THE SOLOMON ISLANDS": "🇸🇧",
    "SB": "🇸🇧",
    "SLB": "🇸🇧",
    "SOMALIA": "🇸🇴",
    "THE FEDERAL REPUBLIC OF SOMALIA": "🇸🇴",
    "SO": "🇸🇴",
    "SOM": "🇸🇴",
    "SOUTH AFRICA": "🇿🇦",
    "THE REPUBLIC OF SOUTH AFRICA": "🇿🇦",
    "ZA": "🇿🇦",
    "ZAF": "🇿🇦",
    "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS": "🇬🇸",
    "GS": "🇬🇸",
    "SGS": "🇬🇸",
    "SOUTH SUDAN": "🇸🇸",
    "THE REPUBLIC OF SOUTH SUDAN": "🇸🇸",
    "SS": "🇸🇸",
    "SSD": "🇸🇸",
    "SPAIN": "🇪🇸",
    "THE KINGDOM OF SPAIN": "🇪🇸",
    "ES": "🇪🇸",
    "ESP": "🇪🇸",
    "SRI LANKA": "🇱🇰",
    "THE DEMOCRATIC SOCIALIST REPUBLIC OF SRI LANKA": "🇱🇰",
    "LK": "🇱🇰",
    "LKA": "🇱🇰",
    "SUDAN": "🇸🇩",
    "THE REPUBLIC OF THE SUDAN": "🇸🇩",
    "SD": "🇸🇩",
    "SDN": "🇸🇩",
    "SURINAME": "🇸🇷",
    "THE REPUBLIC OF SURINAME": "🇸🇷",
    "SR": "🇸🇷",
    "SUR": "🇸🇷",
    "SVALBARD  JAN MAYEN": "🇸🇯",
    "SVALBARD AND JAN MAYEN": "🇸🇯",
    "SJ": "🇸🇯",
    "SJM": "🇸🇯",
    "SWEDEN": "🇸🇪",
    "THE KINGDOM OF SWEDEN": "🇸🇪",
    "SE": "🇸🇪",
    "SWE": "🇸🇪",
    "SWITZERLAND": "🇨🇭",
    "THE SWISS CONFEDERATION": "🇨🇭",
    "CH": "🇨🇭",
    "CHE": "🇨🇭",
    "SYRIAN ARAB REPUBLIC": "🇸🇾",
    "THE SYRIAN ARAB REPUBLIC": "🇸🇾",
    "SY": "🇸🇾",
    "SYR": "🇸🇾",
    "TAIWAN": "🇹🇼",
    "THE REPUBLIC OF CHINA": "🇹🇼",
    "TW": "🇹🇼",
    "TWN": "🇹🇼",
    "TAJIKISTAN": "🇹🇯",
    "THE REPUBLIC OF TAJIKISTAN": "🇹🇯",
    "TJ": "🇹🇯",
    "TJK": "🇹🇯",
    "TANZANIA, THE UNITED REPUBLIC OF": "🇹🇿",
    "TANZANIA": "🇹🇿",
    "THE UNITED REPUBLIC OF TANZANIA": "🇹🇿",
    "TZ": "🇹🇿",
    "TZA": "🇹🇿",
    "THAILAND": "🇹🇭",
    "THE KINGDOM OF THAILAND": "🇹🇭",
    "TH": "🇹🇭",
    "THA": "🇹🇭",
    "TIMOR-LESTE": "🇹🇱",
    "THE DEMOCRATIC REPUBLIC OF TIMOR-LESTE": "🇹🇱",
    "TL": "🇹🇱",
    "TLS": "🇹🇱",
    "TOGO": "🇹🇬",
    "THE TOGOLESE REPUBLIC": "🇹🇬",
    "TG": "🇹🇬",
    "TGO": "🇹🇬",
    "TOKELAU": "🇹🇰",
    "TK": "🇹🇰",
    "TKL": "🇹🇰",
    "TONGA": "🇹🇴",
    "THE KINGDOM OF TONGA": "🇹🇴",
    "TO": "🇹🇴",
    "TON": "🇹🇴",
    "TRINIDAD AND TOBAGO": "🇹🇹",
    "THE REPUBLIC OF TRINIDAD AND TOBAGO": "🇹🇹",
    "TT": "🇹🇹",
    "TTO": "🇹🇹",
    "TUNISIA": "🇹🇳",
    "THE REPUBLIC OF TUNISIA": "🇹🇳",
    "TN": "🇹🇳",
    "TUN": "🇹🇳",
    "TÜRKIYE": "🇹🇷",
    "THE REPUBLIC OF TÜRKIYE": "🇹🇷",
    "TR": "🇹🇷",
    "TUR": "🇹🇷",
    "TURKMENISTAN": "🇹🇲",
    "TM": "🇹🇲",
    "TKM": "🇹🇲",
    "TURKS AND CAICOS ISLANDS": "🇹🇨",
    "THE TURKS AND CAICOS ISLANDS": "🇹🇨",
    "TC": "🇹🇨",
    "TCA": "🇹🇨",
    "TUVALU": "🇹🇻",
    "TV": "🇹🇻",
    "TUV": "🇹🇻",
    "UGANDA": "🇺🇬",
    "THE REPUBLIC OF UGANDA": "🇺🇬",
    "UG": "🇺🇬",
    "UGA": "🇺🇬",
    "UKRAINE": "🇺🇦",
    "UA": "🇺🇦",
    "UKR": "🇺🇦",
    "UNITED ARAB EMIRATES": "🇦🇪",
    "THE UNITED ARAB EMIRATES": "🇦🇪",
    "AE": "🇦🇪",
    "ARE": "🇦🇪",
    "UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND": "🇬🇧",
    "THE UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND": "🇬🇧",
    "GB": "🇬🇧",
    "GBR": "🇬🇧",
    "UK": "🇬🇧",
    "UNITED STATES MINOR OUTLYING ISLANDS": "🇺🇲",
    "UNITED STATES PACIFIC ISLAND WILDLIFE REFUGES, NAVASSA ISLAND, AND WAKE ISLAND": "🇺🇲",
    "UM": "🇺🇲",
    "UMI": "🇺🇲",
    "UNITED STATES OF AMERICA": "🇺🇸",
    "THE UNITED STATES OF AMERICA": "🇺🇸",
    "US": "🇺🇸",
    "USA": "🇺🇸",
    "URUGUAY": "🇺🇾",
    "THE ORIENTAL REPUBLIC OF URUGUAY": "🇺🇾",
    "UY": "🇺🇾",
    "URY": "🇺🇾",
    "UZBEKISTAN": "🇺🇿",
    "THE REPUBLIC OF UZBEKISTAN": "🇺🇿",
    "UZ": "🇺🇿",
    "UZB": "🇺🇿",
    "VANUATU": "🇻🇺",
    "THE REPUBLIC OF VANUATU": "🇻🇺",
    "VU": "🇻🇺",
    "VUT": "🇻🇺",
    "VENEZUELA": "🇻🇪",
    "THE BOLIVARIAN REPUBLIC OF VENEZUELA": "🇻🇪",
    "VE": "🇻🇪",
    "VEN": "🇻🇪",
    "VIET NAM": "🇻🇳",
    "THE SOCIALIST REPUBLIC OF VIET NAM": "🇻🇳",
    "VN": "🇻🇳",
    "VNM": "🇻🇳",
    "VIRGIN ISLANDS": "🇻🇮",
    "THE VIRGIN ISLANDS": "🇻🇬",
    "VG": "🇻🇬",
    "VGB": "🇻🇬",
    "THE VIRGIN ISLANDS OF THE UNITED STATES": "🇻🇮",
    "VI": "🇻🇮",
    "VIR": "🇻🇮",
    "WALLIS AND FUTUNA": "🇼🇫",
    "THE TERRITORY OF THE WALLIS AND FUTUNA ISLANDS": "🇼🇫",
    "WF": "🇼🇫",
    "WLF": "🇼🇫",
    "WESTERN SAHARA": "🇪🇭",
    "THE SAHRAWI ARAB DEMOCRATIC REPUBLIC": "🇪🇭",
    "EH": "🇪🇭",
    "ESH": "🇪🇭",
    "YEMEN": "🇾🇪",
    "THE REPUBLIC OF YEMEN": "🇾🇪",
    "YE": "🇾🇪",
    "YEM": "🇾🇪",
    "ZAMBIA": "🇿🇲",
    "THE REPUBLIC OF ZAMBIA": "🇿🇲",
    "ZM": "🇿🇲",
    "ZMB": "🇿🇲",
    "ZIMBABWE": "🇿🇼",
    "THE REPUBLIC OF ZIMBABWE": "🇿🇼",
    "ZW": "🇿🇼",
    "ZWE": "🇿🇼",
}

country_code_flag.update(_manually_added)

# %% ../nbs/04_flag.ipynb 5
def flag(cc):
    """Get the flag emoji of a country using various identifiers.

    Identifiers are case-insensitive so you don't need to worry about whether it's in lower or upper case:

    - Two-letter code: jp, mx, MX
    - Three-letter code: jpn, MEX
    - Country name: France, Jordan
    - Official name: THE REPUBLIC OF ARMENIA, The Federal Democratic Republic of Ethiopia
    - TLD (top-level domain): vn, br

    Parameters
    ----------
    cc : str
        Country code, name, top-level domain or official country name

    Returns
    -------
    flag : str
        The Unicode emoji flag of the respective country

    References
    ----------
    .. [1] Wikipedia, "List of ISO 3166 country codes",
       https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
    """
    return country_code_flag[cc.upper()]
