Dataview: How do I use "contain" if there are two true options?

In my frontmatter there is a variable called Country: which is followed by the two letter code for that country, so e.g. Country: UK for the United Kingdom.
Now Iโ€™d like Dataview to replace this country code with a flag emoji in my Cards table, which I do with this rather unwieldy chain of choice combined with contain:

choice(contains(country, "US"), " ๐Ÿ‡บ๐Ÿ‡ธ ", 
choice(contains(country, "UK"), " ๐Ÿ‡ฌ๐Ÿ‡ง ", 
choice(contains(country, "JP"), " ๐Ÿ‡ฏ๐Ÿ‡ต ", 
choice(contains(country, "IN"), " ๐Ÿ‡ฎ๐Ÿ‡ณ ",
choice(contains(country, "CA"), " ๐Ÿ‡จ๐Ÿ‡ฆ ",
choice(contains(country, "CL"), " ๐Ÿ‡จ๐Ÿ‡ฑ ",
choice(contains(country, "IT"), " ๐Ÿ‡ฎ๐Ÿ‡น ",
choice(contains(country, "SI"), " ๐Ÿ‡ธ๐Ÿ‡ฎ ",
choice(contains(country, "AR"), " ๐Ÿ‡ฆ๐Ÿ‡ท ",
choice(contains(country, "DE"), " ๐Ÿ‡ฉ๐Ÿ‡ช ",
choice(contains(country, "AT"), " ๐Ÿ‡ฆ๐Ÿ‡น ",
choice(contains(country, "PL"), " ๐Ÿ‡ต๐Ÿ‡ฑ ",
choice(contains(country, "MY"), " ๐Ÿ‡ฒ๐Ÿ‡พ ",
choice(contains(country, "FR"), " ๐Ÿ‡ซ๐Ÿ‡ท ",
choice(contains(country, "CN"), " ๐Ÿ‡จ๐Ÿ‡ณ ",
choice(contains(country, "NG"), " ๐Ÿ‡ณ๐Ÿ‡ฌ ",
choice(contains(country, "KE"), " ๐Ÿ‡ฐ๐Ÿ‡ช ",
choice(contains(country, "AU"), " ๐Ÿ‡ฆ๐Ÿ‡บ ",
choice(contains(country, "BD"), " ๐Ÿ‡ง๐Ÿ‡ฉ ",
choice(contains(country, "NZ"), " ๐Ÿ‡ณ๐Ÿ‡ฟ ",
choice(contains(country, "HK"), " ๐Ÿ‡ญ๐Ÿ‡ฐ ",
choice(contains(country, "SP"), " ๐Ÿ‡ช๐Ÿ‡ธ ", "")))))))))))))))))))))) as Flag

However, for some cases TWO countries apply, such as when a movie is made by people from different nations. How do I implement this? It would look like Country: US, UK. But since my chain of choice has US first, only the US flag shows up. How do I combine these so both flags would show up?

Thanks!

BTW if someone knows of a more elegant way of doing this, Iโ€™m all ears :slight_smile:

1 Like

The gist of a better solution is to first split your country code based on the comma, and then concatenate the result for each of the countries. And I would tend to use an array to lookup the icon instead of using choice, and then rather have a default in case they mess up the country code.

Such a solution could be done using various tools, but I leave that as an exercise for the reader. :smile:

Regards,
Holroy

Iโ€™m not sure I understand. That means youโ€™d have it look up the flag online?

Not sure how to do that.

No, it means you use an array to hold all the icons and use the country code as the key to get your icon.

If that still doesnโ€™t make any sense, you might consider taking a step back, and learn about arrays and lists, before proceeding. Sorry, if that feels a little hush, but youโ€™ll be better off in the end if you know what you are coding, instead of being spoon fed.

Regards,
Holroy

OK, good point. I had a look at arrays, and now have something like this for testing:

``dataviewjs
const flags = [" ๐Ÿ‡บ๐Ÿ‡ธ ", " ๐Ÿ‡ฌ๐Ÿ‡ง ", " ๐Ÿ‡ฏ๐Ÿ‡ต ", " ๐Ÿ‡ฎ๐Ÿ‡ณ ", " ๐Ÿ‡จ๐Ÿ‡ฆ ", " ๐Ÿ‡จ๐Ÿ‡ฑ ", " ๐Ÿ‡ฎ๐Ÿ‡น ", " ๐Ÿ‡ธ๐Ÿ‡ฎ ",]
dv.paragraph(flags[0])

that flags[0] renders the US flag. However the issue I see with this solution is that Iโ€™m not sure Cards works with JS?

Edit: It seems Cards can use JS as well. But I canโ€™t figure out how to render external images (links) which regular Dataview can handle fine.

Topic

Summary
  • How to transform a country code into a flag emoji?

Test

Summary
  • dataview: v0.5.46

Input

Summary

dictionary files:

Summary
  • Location: โ€œ100_Project/02_dataview/Q20_Flags/Q20_test_dataโ€

folder: 03

  • filename : dic_19800301 (GB=United Kingdom)
---
Date: 1980-03-01
Country: "GB"
---




folder: 04

  • filename : dic_19800401 (US=United States)
---
Date: 1980-04-01
Country: "US"
---




folder: 05

  • filename : dic_19800501
---
Date: 1980-05-01
Country: ["US", "GB"]
---




PNG files:

  • all the worlds flags in PNG format : used by DQL20
Summary
  • Location: โ€œ999_Test/Q20_test_data02โ€

folder: png100px

  • filename : gb.png, us.png, and so on

Screenshots(PNG_preview)


DQL10_transform_country_code_into_flag_icon_from_HTML_Hex_and_TABLE

Summary

Main DQL

Code Name Data type Group By Purposes Remark
DQL10
_transform
_country_code
_into
_flag_icon
_from_HTML_Hex
_and_TABLE
Country:
1.a string
2.a list of strings
no 1.To filter by Country
2.To sort by file.link in ascending order
3.To display the result as a table
For Windows OS:

1.To require NotoColorEmojiLimited.css
2.To enable the CSS snippet

Notes

Summary

Q1: How do I view country flags on Windows 10 through HTML?

Summary_Q1

A1

Steps:
  • Suppose that your vault is note_a8.
  • Copy the following css file into the folder note_a8/.obsidian/snippets.
  • Settings/Appearances/CSS snippets: enable it.
Screenshots(DQL10_A1)
Summary_DQL10_A1

CSS file: using online NotoColorEmoji.ttf
Summary_CSS file
  • filename : NotoColorEmojiLimited.css
```CSS
/*
Problems: How do I view country flags on Windows 10 through HTML?
https://stackoverflow.com/questions/62729729/how-do-i-view-country-flags-on-windows-10-through-html
*/

/*
Solutions: answered Nov 18, 2021 at 14:48 By Felipe Saldanha

Use [Noto Color Emoji font](https://github.com/googlefonts/noto-emoji).

First, write a `@font-face` rule with the `unicode-range` property. Then add the font to the top of your font stack:
([Source](https://prinsfrank.nl/2021/01/25/Non-existing-flag-emojis-on-windows))
*/

@font-face {
  font-family: NotoColorEmojiLimited;
  unicode-range: U+1F1E6-1F1FF;
  src: url(https://raw.githack.com/googlefonts/noto-emoji/main/fonts/NotoColorEmoji.ttf);
}

div {
  font-family: 'NotoColorEmojiLimited', -apple-system, BlinkMacSystemFont, 
  'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 
  'Segoe UI Emoji', 'Segoe UI Symbol';
}



```

Code DQL10_transform_country_code_into_flag_icon_from_HTML_Hex_and_TABLE

Summary_code
title: DQL10_transform_country_code_into_flag_icon_from_HTML_Hex_and_TABLE =>0.For Windows OS:To require `NotoColorEmojiLimited.css` and To enable the CSS snippet 1.To filter by `Country` 2.To sort by `file.name` in ascending order 3.To display the result as a table
collapse: close
icon: 
color: 
```dataview
TABLE WITHOUT ID
      file.link AS "FILE",
      join(Country, " ") AS "Country",
      
      join(
          map(
              choice(typeof(Country) = "array", Country, list(Country)), 
                  (e) => 
                      {
                        "US": "🇺🇸",
                        "GB": "🇬🇧",
                        "JP": "🇯🇵",
                        "IN": "🇮🇳",
                        "CA": "🇨🇦",
                        "CL": "🇨🇱",
                        "IT": "🇮🇹",
                        "SI": "🇸🇮",
                        "AR": "🇦🇷",   
                        "DE": "🇩🇪",
                        "AT": "🇦🇹",
                        "PL": "🇵🇱",
                        "MY": "🇲🇾",
                        "FR": "🇫🇷",
                        "CN": "🇨🇳",
                        "NG": "🇳🇬",
                        "KE": "🇰🇪",
                        "AU": "🇦🇺",
                        "BD": "🇧🇩",
                        "NZ": "🇳🇿",
                        "HK": "🇭🇰",
                        "ES": "🇪🇸"
                      }[e]     
              )
           , " ")
          AS "Flag"

FROM "100_Project/02_dataview/Q20_Flags/Q20_test_data"
WHERE Country
SORT file.name ASC

```

Screenshots(DQL10): NotoColorEmojiLimited.css used on win7(or win10)

Summary_A

)


Screenshots(DQL10): NotoColorEmojiLimited.css not used on win7(or win10)

Summary_B


DQL20_transform_country_code_into_flag_icon_from_PNG_and_TABLE

Summary

Main DQL

Code Name Data type Group By Purposes Remark
DQL20
_transform
_country_code
_into
_flag_icon
_from_PNG
_and_TABLE
Country:
1.a string
2.a list of strings
no 1.To filter by Country
2.To sort by file.name in ascending order
3.To display the result as a tableThe PNG
To require all the worlds flags in PNG format: download this repository

Notes

Summary

Q1: What is a country flag emoji?

from: SVG and PNG renders of all countriesโ€™ flags. >> Readme

Summary_Q1

A1

A country flag emoji is organized by an โ€œISO country-codeโ€
  • The flags are named by their 2-letter ISO-3166 country code, except for the
    constituent countries of Great Britain which have 6-letter codes โ€œGB-ENGโ€ etc).

  • Kosovo uses the user-assigned country code XK, which is not part of the ISO standard, but in use by several multinational organizations.

  • Also included is a JSON file that maps the ISO country code to the name of the
    country.


Q2: How to get all country flag images?

from: SVG and PNG renders of all countriesโ€™ flags. >> Readme

Summary_Q2

A2


Code DQL20_transform_country_code_into_flag_icon_from_PNG_and_TABLE

Summary_code
title: DQL20_transform_country_code_into_flag_icon_from_PNG_and_TABLE =>0.To require all the worlds flags in PNG format: [download this repository](https://github.com/hampusborgos/country-flags/archive/refs/heads/main.zip) 1.To filter by `Country` 2.To sort by `file.link` in ascending order 3.To display the result as a table
collapse: close
icon: 
color: 
```dataview
TABLE WITHOUT ID
      file.link AS "FILE",
      Country AS "Country",     

      map(
          choice(typeof(Country) = "array", Country, list(Country)), 
              (e) => 
                  embed(link("999_Test/Q20_test_data02/png100px/" + lower(e) + ".png"))                  
          )
      AS "Flag"

FROM "100_Project/02_dataview/Q20_Flags/Q20_test_data"
WHERE Country

SORT file.name ASC

```

Screenshots(DQL20)


Reference

Summary

used by DQL10 or DQL20

used by DQL10

Emoji Flags

  • The following order is the same as that of ReaderGuy42โ€™s nested choice statement.
Summary_Flags

used by DQL20


Hey justdoit:
Can you dumb this response down for a simpler request ? What if I want to tag status of a project with a โ€œDoneโ€ field (responses could be โ€˜not startedโ€™, โ€˜almost doneโ€™ and โ€˜doneโ€™. Each would be represented by a red, yellow and green circle.

I know how to use choice() for a true/false. For example:

table WITHOUT ID
file.link AS โ€œDocumentโ€,
choice(Done, โ€œ:green_circle:โ€, โ€œ:yellow_circle:โ€) AS โ€œStatusโ€
FROM โ€œ020 Investments/Pagesโ€
WHERE Done != null

Is there an easy way to choose from 3 items with choice ? Thanks so much !

You can present the third option as the โ€œelseโ€. With the help of someone, my dataview thing looks like this now:


TABLE without id 
("![](" + Cover + ")") as Cover,
link(file.link, Alias) + " by " + Author + (choice(medium = "Book", " ๐Ÿ“– ", choice(medium = "Audiobook", " ๐ŸŽง ", choice(medium = "Podcast", " ๐Ÿ“ป ", choice(medium = "eBook", " ๐Ÿ“ƒ ", ""))))) + choice(contains(tags, "Favorite"), "๐Ÿ’›", "") as Title, 
Year + " || " + " โญ " + Rating + " || " + (choice(medium = "Book", Pages + " p", choice(medium = "Audiobook", Hours + " h", choice(medium = "Podcast", Hours + " h", choice(medium = "eBook", Pages + " p", ""))))) + " || " + map(split(Country, ", "), (c) => ((x) => {
AD: "๐Ÿ‡ฆ๐Ÿ‡ฉ",
AE: "๐Ÿ‡ฆ๐Ÿ‡ช",
AF: "๐Ÿ‡ฆ๐Ÿ‡ซ",
AG: "๐Ÿ‡ฆ๐Ÿ‡ฌ",
AI: "๐Ÿ‡ฆ๐Ÿ‡ฎ",
AL: "๐Ÿ‡ฆ๐Ÿ‡ฑ",
AM: "๐Ÿ‡ฆ๐Ÿ‡ฒ",
AO: "๐Ÿ‡ฆ๐Ÿ‡ด",
AQ: "๐Ÿ‡ฆ๐Ÿ‡ถ",
AR: "๐Ÿ‡ฆ๐Ÿ‡ท",
[...]
WS: "๐Ÿ‡ผ๐Ÿ‡ธ",
YE: "๐Ÿ‡พ๐Ÿ‡ช",
YT: "๐Ÿ‡พ๐Ÿ‡น",
ZA: "๐Ÿ‡ฟ๐Ÿ‡ฆ",
ZM: "๐Ÿ‡ฟ๐Ÿ‡ฒ",
ZW: "๐Ÿ‡ฟ๐Ÿ‡ผ"
}[x])(c)) as "Time and Place",
DateStarted + " โ€” " + DateFinished as Dates,
"(" + choice((DateFinished != DateStarted), (DateFinished - DateStarted).days + " days", "0 days" ) + ")" as "Reading Time"
FROM "Book Log/2022"
WHERE Medium = "Book" OR Medium = "Audiobook" OR Medium = "Podcast" OR Medium = "eBook"
SORT DateFinished desc

So you could do

choice(status = "not started", "๐Ÿ”ด", choice(status = "almost done",  โ€œ๐ŸŸกโ€, choice(status = "done",  โ€œ๐ŸŸขโ€, ""))) as "Status"

by nesting the choice function you can get more than two outcomes. If you just want three options itโ€™s pretty straight forward (I think). In this example, after the โ€œ:green_circle:โ€ you canโ€™t forget the extra ,"" as thatโ€™s the last else function. You could also put a โ€œ:question:โ€ in there, for example, because then if thereโ€™s a note with an empty status field, or one that isnโ€™t one of those three options it should output a โ€œ:question:โ€ to signify that.

Let me know if this works out for you :slight_smile:

Letโ€™s say your field key is status, instead of Done.
In regular DQL queries, instead of nested choice(), as suggested by @ReaderGuy42, you can use something like this:

TABLE ((x) => {"done": "๐ŸŸข", "almost done": "๐ŸŸก", "not started": "โš ๏ธ"}[x])(status) AS Status
FROM "020 Investments/Pages"
WHERE status

or

TABLE Status
FROM "020 Investments/Pages"
WHERE status
FLATTEN ((x) => {"done": "๐ŸŸข", "almost done": "๐ŸŸก", "not started": "โš ๏ธ"}[x])(status) AS Status

This is something related with โ€œIIFE = immediately invoked function expressionโ€ (donโ€™t ask me, Iโ€™m not a coder)

3 Likes

Both work perfectly. Once again, mnvwvnm, you save the day. 'brigado !!!

1 Like

Topic

Summary
  • How to transform a Done field content which is โ€˜not startedโ€™, โ€˜almost doneโ€™ or โ€˜doneโ€™ into a red, yellow or green circle icon?

Test

Summary
  • dataview: v0.5.46

Input

Summary

dictionary files:

  • Location: โ€œ100_Project/02_dataview/Q20_Flags/Q20_test_data03โ€

folder: 03

  • filename : dic_19800306
---
Date: 1980-03-06
Done: "done"
---



folder: 04

  • filename : dic_19800406
---
Date: 1980-04-06
Done: "almost done"
---



folder: 05

  • filename : dic_19800506
---
Date: 1980-05-06
Done: "not started"
---



DQL10: Use {key1:value1, โ€ฆ}[Done]

Summary

Code DQL10

Summary_code
title: DQL10 => Use {key1:value1, ...}[Done]
collapse: close
icon: 
color:
```dataview
TABLE WITHOUT ID
      file.link AS "Document",
      Status AS "Status"

FROM "100_Project/02_dataview/Q20_Flags/Q20_test_data03"
WHERE Done != null

FLATTEN {
    "not started": "๐Ÿ”ด",
    "almost done": "๐ŸŸก",
    "done": "๐ŸŸข"
}[Done] AS Status
```

Screenshots(DQL10)


DQL11: Use object(key1, value1, โ€ฆ)[Done]

Summary

Code DQL11

Summary_code
title: DQL11 => Use object(key1, value1, ...)[Done]
collapse: close
icon: 
color:
```dataview
TABLE WITHOUT ID
      file.link AS "Document",
      Status AS "Status"

FROM "100_Project/02_dataview/Q20_Flags/Q20_test_data03"
WHERE Done != null

FLATTEN object(
    "not started", "๐Ÿ”ด",
    "almost done", "๐ŸŸก",
    "done", "๐ŸŸข"
)[Done] AS Status
```

Screenshots(DQL11)


Reference

Summary

Emoji

Q01_Sum

Q19_Workout


1 Like

Fantastic - thank you !

1 Like

I canโ€™t get this to work for me. When I try implementing your FLATTEN, I get Parsing errors:


TABLE without id 
("![](" + Cover + ")") as Cover,
link(file.link, Alias) + " by " + Author,
Medium as "Medium"
Where Status != null

FLATTEN object(
    "Book", " ๐Ÿ“– ",
    "Audiobook", " ๐ŸŽง ",
    "Podcast", " ๐Ÿ“ป ",
    "eBook", " ๐Ÿ“ƒ "
)[Medium] AS Medium,
 choice(contains(tags, "Favorite"), "๐Ÿ’›", "") as Title, 
Year + " || " + " โญ " + Rating + " || " + (choice(medium = "Book", Pages + " p", choice(medium = "Audiobook", Hours + " h", choice(medium = "Podcast", Hours + " h", choice(medium = "eBook", Pages + " p", ""))))) + " || " + map(split(Country, ", "), (c) => ((x) => {
AD: "๐Ÿ‡ฆ๐Ÿ‡ฉ",
AE: "๐Ÿ‡ฆ๐Ÿ‡ช",
AF: "๐Ÿ‡ฆ๐Ÿ‡ซ",
AG: "๐Ÿ‡ฆ๐Ÿ‡ฌ",
AI: "๐Ÿ‡ฆ๐Ÿ‡ฎ",
AL: "๐Ÿ‡ฆ๐Ÿ‡ฑ",
AM: "๐Ÿ‡ฆ๐Ÿ‡ฒ",
AO: "๐Ÿ‡ฆ๐Ÿ‡ด",
AQ: "๐Ÿ‡ฆ๐Ÿ‡ถ",
AR: "๐Ÿ‡ฆ๐Ÿ‡ท",
AS: "๐Ÿ‡ฆ๐Ÿ‡ธ",
AT: "๐Ÿ‡ฆ๐Ÿ‡น",
AU: "๐Ÿ‡ฆ๐Ÿ‡บ",
AW: "๐Ÿ‡ฆ๐Ÿ‡ผ",
AX: "๐Ÿ‡ฆ๐Ÿ‡ฝ",
AZ: "๐Ÿ‡ฆ๐Ÿ‡ฟ",
BA: "๐Ÿ‡ง๐Ÿ‡ฆ",
BB: "๐Ÿ‡ง๐Ÿ‡ง",
BD: "๐Ÿ‡ง๐Ÿ‡ฉ",
BE: "๐Ÿ‡ง๐Ÿ‡ช",
BF: "๐Ÿ‡ง๐Ÿ‡ซ",
BG: "๐Ÿ‡ง๐Ÿ‡ฌ",
BH: "๐Ÿ‡ง๐Ÿ‡ญ",
BI: "๐Ÿ‡ง๐Ÿ‡ฎ",
BJ: "๐Ÿ‡ง๐Ÿ‡ฏ",
BL: "๐Ÿ‡ง๐Ÿ‡ฑ",
BM: "๐Ÿ‡ง๐Ÿ‡ฒ",
BN: "๐Ÿ‡ง๐Ÿ‡ณ",
BO: "๐Ÿ‡ง๐Ÿ‡ด",
BQ: "๐Ÿ‡ง๐Ÿ‡ถ",
BR: "๐Ÿ‡ง๐Ÿ‡ท",
BS: "๐Ÿ‡ง๐Ÿ‡ธ",
BT: "๐Ÿ‡ง๐Ÿ‡น",
BV: "๐Ÿ‡ง๐Ÿ‡ป",
BW: "๐Ÿ‡ง๐Ÿ‡ผ",
BY: "๐Ÿ‡ง๐Ÿ‡พ",
BZ: "๐Ÿ‡ง๐Ÿ‡ฟ",
CA: "๐Ÿ‡จ๐Ÿ‡ฆ",
CC: "๐Ÿ‡จ๐Ÿ‡จ",
CD: "๐Ÿ‡จ๐Ÿ‡ฉ",
CF: "๐Ÿ‡จ๐Ÿ‡ซ",
CG: "๐Ÿ‡จ๐Ÿ‡ฌ",
CH: "๐Ÿ‡จ๐Ÿ‡ญ",
CI: "๐Ÿ‡จ๐Ÿ‡ฎ",
CK: "๐Ÿ‡จ๐Ÿ‡ฐ",
CL: "๐Ÿ‡จ๐Ÿ‡ฑ",
CM: "๐Ÿ‡จ๐Ÿ‡ฒ",
CN: "๐Ÿ‡จ๐Ÿ‡ณ",
CO: "๐Ÿ‡จ๐Ÿ‡ด",
CR: "๐Ÿ‡จ๐Ÿ‡ท",
CU: "๐Ÿ‡จ๐Ÿ‡บ",
CV: "๐Ÿ‡จ๐Ÿ‡ป",
CW: "๐Ÿ‡จ๐Ÿ‡ผ",
CX: "๐Ÿ‡จ๐Ÿ‡ฝ",
CY: "๐Ÿ‡จ๐Ÿ‡พ",
CYMRU: "๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ",
CZ: "๐Ÿ‡จ๐Ÿ‡ฟ",
DE: "๐Ÿ‡ฉ๐Ÿ‡ช",
DJ: "๐Ÿ‡ฉ๐Ÿ‡ฏ",
DK: "๐Ÿ‡ฉ๐Ÿ‡ฐ",
DM: "๐Ÿ‡ฉ๐Ÿ‡ฒ",
DO: "๐Ÿ‡ฉ๐Ÿ‡ด",
DZ: "๐Ÿ‡ฉ๐Ÿ‡ฟ",
EC: "๐Ÿ‡ช๐Ÿ‡จ",
EE: "๐Ÿ‡ช๐Ÿ‡ช",
EG: "๐Ÿ‡ช๐Ÿ‡ฌ",
EH: "๐Ÿ‡ช๐Ÿ‡ญ",
ENG: "๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ",
ER: "๐Ÿ‡ช๐Ÿ‡ท",
ES: "๐Ÿ‡ช๐Ÿ‡ธ",
ET: "๐Ÿ‡ช๐Ÿ‡น",
FI: "๐Ÿ‡ซ๐Ÿ‡ฎ",
FJ: "๐Ÿ‡ซ๐Ÿ‡ฏ",
FK: "๐Ÿ‡ซ๐Ÿ‡ฐ",
FM: "๐Ÿ‡ซ๐Ÿ‡ฒ",
FO: "๐Ÿ‡ซ๐Ÿ‡ด",
FR: "๐Ÿ‡ซ๐Ÿ‡ท",
GA: "๐Ÿ‡ฌ๐Ÿ‡ฆ",
GB: "๐Ÿ‡ฌ๐Ÿ‡ง",
GD: "๐Ÿ‡ฌ๐Ÿ‡ฉ",
GE: "๐Ÿ‡ฌ๐Ÿ‡ช",
GF: "๐Ÿ‡ฌ๐Ÿ‡ซ",
GG: "๐Ÿ‡ฌ๐Ÿ‡ฌ",
GH: "๐Ÿ‡ฌ๐Ÿ‡ญ",
GI: "๐Ÿ‡ฌ๐Ÿ‡ฎ",
GL: "๐Ÿ‡ฌ๐Ÿ‡ฑ",
GM: "๐Ÿ‡ฌ๐Ÿ‡ฒ",
GN: "๐Ÿ‡ฌ๐Ÿ‡ณ",
GP: "๐Ÿ‡ฌ๐Ÿ‡ต",
GQ: "๐Ÿ‡ฌ๐Ÿ‡ถ",
GR: "๐Ÿ‡ฌ๐Ÿ‡ท",
GS: "๐Ÿ‡ฌ๐Ÿ‡ธ",
GT: "๐Ÿ‡ฌ๐Ÿ‡น",
GU: "๐Ÿ‡ฌ๐Ÿ‡บ",
GW: "๐Ÿ‡ฌ๐Ÿ‡ผ",
GY: "๐Ÿ‡ฌ๐Ÿ‡พ",
HK: "๐Ÿ‡ญ๐Ÿ‡ฐ",
HM: "๐Ÿ‡ญ๐Ÿ‡ฒ",
HN: "๐Ÿ‡ญ๐Ÿ‡ณ",
HR: "๐Ÿ‡ญ๐Ÿ‡ท",
HT: "๐Ÿ‡ญ๐Ÿ‡น",
HU: "๐Ÿ‡ญ๐Ÿ‡บ",
ID: "๐Ÿ‡ฎ๐Ÿ‡ฉ",
IE: "๐Ÿ‡ฎ๐Ÿ‡ช",
IL: "๐Ÿ‡ฎ๐Ÿ‡ฑ",
IM: "๐Ÿ‡ฎ๐Ÿ‡ฒ",
IN: "๐Ÿ‡ฎ๐Ÿ‡ณ",
IO: "๐Ÿ‡ฎ๐Ÿ‡ด",
IQ: "๐Ÿ‡ฎ๐Ÿ‡ถ",
IR: "๐Ÿ‡ฎ๐Ÿ‡ท",
IS: "๐Ÿ‡ฎ๐Ÿ‡ธ",
IT: "๐Ÿ‡ฎ๐Ÿ‡น",
JE: "๐Ÿ‡ฏ๐Ÿ‡ช",
JM: "๐Ÿ‡ฏ๐Ÿ‡ฒ",
JO: "๐Ÿ‡ฏ๐Ÿ‡ด",
JP: "๐Ÿ‡ฏ๐Ÿ‡ต",
KE: "๐Ÿ‡ฐ๐Ÿ‡ช",
KG: "๐Ÿ‡ฐ๐Ÿ‡ฌ",
KH: "๐Ÿ‡ฐ๐Ÿ‡ญ",
KI: "๐Ÿ‡ฐ๐Ÿ‡ฎ",
KM: "๐Ÿ‡ฐ๐Ÿ‡ฒ",
KN: "๐Ÿ‡ฐ๐Ÿ‡ณ",
KP: "๐Ÿ‡ฐ๐Ÿ‡ต",
KR: "๐Ÿ‡ฐ๐Ÿ‡ท",
KW: "๐Ÿ‡ฐ๐Ÿ‡ผ",
KY: "๐Ÿ‡ฐ๐Ÿ‡พ",
KZ: "๐Ÿ‡ฐ๐Ÿ‡ฟ",
LA: "๐Ÿ‡ฑ๐Ÿ‡ฆ",
LB: "๐Ÿ‡ฑ๐Ÿ‡ง",
LC: "๐Ÿ‡ฑ๐Ÿ‡จ",
LI: "๐Ÿ‡ฑ๐Ÿ‡ฎ",
LK: "๐Ÿ‡ฑ๐Ÿ‡ฐ",
LR: "๐Ÿ‡ฑ๐Ÿ‡ท",
LS: "๐Ÿ‡ฑ๐Ÿ‡ธ",
LT: "๐Ÿ‡ฑ๐Ÿ‡น",
LU: "๐Ÿ‡ฑ๐Ÿ‡บ",
LV: "๐Ÿ‡ฑ๐Ÿ‡ป",
LY: "๐Ÿ‡ฑ๐Ÿ‡พ",
MA: "๐Ÿ‡ฒ๐Ÿ‡ฆ",
MC: "๐Ÿ‡ฒ๐Ÿ‡จ",
MD: "๐Ÿ‡ฒ๐Ÿ‡ฉ",
ME: "๐Ÿ‡ฒ๐Ÿ‡ช",
MF: "๐Ÿ‡ฒ๐Ÿ‡ซ",
MG: "๐Ÿ‡ฒ๐Ÿ‡ฌ",
MH: "๐Ÿ‡ฒ๐Ÿ‡ญ",
MK: "๐Ÿ‡ฒ๐Ÿ‡ฐ",
ML: "๐Ÿ‡ฒ๐Ÿ‡ฑ",
MM: "๐Ÿ‡ฒ๐Ÿ‡ฒ",
MN: "๐Ÿ‡ฒ๐Ÿ‡ณ",
MO: "๐Ÿ‡ฒ๐Ÿ‡ด",
MP: "๐Ÿ‡ฒ๐Ÿ‡ต",
MQ: "๐Ÿ‡ฒ๐Ÿ‡ถ",
MR: "๐Ÿ‡ฒ๐Ÿ‡ท",
MS: "๐Ÿ‡ฒ๐Ÿ‡ธ",
MT: "๐Ÿ‡ฒ๐Ÿ‡น",
MU: "๐Ÿ‡ฒ๐Ÿ‡บ",
MV: "๐Ÿ‡ฒ๐Ÿ‡ป",
MW: "๐Ÿ‡ฒ๐Ÿ‡ผ",
MX: "๐Ÿ‡ฒ๐Ÿ‡ฝ",
MY: "๐Ÿ‡ฒ๐Ÿ‡พ",
MZ: "๐Ÿ‡ฒ๐Ÿ‡ฟ",
NA: "๐Ÿ‡ณ๐Ÿ‡ฆ",
NC: "๐Ÿ‡ณ๐Ÿ‡จ",
NE: "๐Ÿ‡ณ๐Ÿ‡ช",
NF: "๐Ÿ‡ณ๐Ÿ‡ซ",
NG: "๐Ÿ‡ณ๐Ÿ‡ฌ",
NI: "๐Ÿ‡ณ๐Ÿ‡ฎ",
NL: "๐Ÿ‡ณ๐Ÿ‡ฑ",
NO: "๐Ÿ‡ณ๐Ÿ‡ด",
NP: "๐Ÿ‡ณ๐Ÿ‡ต",
NR: "๐Ÿ‡ณ๐Ÿ‡ท",
NU: "๐Ÿ‡ณ๐Ÿ‡บ",
NZ: "๐Ÿ‡ณ๐Ÿ‡ฟ",
OM: "๐Ÿ‡ด๐Ÿ‡ฒ",
PA: "๐Ÿ‡ต๐Ÿ‡ฆ",
PE: "๐Ÿ‡ต๐Ÿ‡ช",
PF: "๐Ÿ‡ต๐Ÿ‡ซ",
PG: "๐Ÿ‡ต๐Ÿ‡ฌ",
PH: "๐Ÿ‡ต๐Ÿ‡ญ",
PK: "๐Ÿ‡ต๐Ÿ‡ฐ",
PL: "๐Ÿ‡ต๐Ÿ‡ฑ",
PM: "๐Ÿ‡ต๐Ÿ‡ฒ",
PN: "๐Ÿ‡ต๐Ÿ‡ณ",
PR: "๐Ÿ‡ต๐Ÿ‡ท",
PS: "๐Ÿ‡ต๐Ÿ‡ธ",
PT: "๐Ÿ‡ต๐Ÿ‡น",
PW: "๐Ÿ‡ต๐Ÿ‡ผ",
PY: "๐Ÿ‡ต๐Ÿ‡พ",
QA: "๐Ÿ‡ถ๐Ÿ‡ฆ",
RE: "๐Ÿ‡ท๐Ÿ‡ช",
RO: "๐Ÿ‡ท๐Ÿ‡ด",
RS: "๐Ÿ‡ท๐Ÿ‡ธ",
RU: "๐Ÿ‡ท๐Ÿ‡บ",
RW: "๐Ÿ‡ท๐Ÿ‡ผ",
SA: "๐Ÿ‡ธ๐Ÿ‡ฆ",
SB: "๐Ÿ‡ธ๐Ÿ‡ง",
SC: "๐Ÿ‡ธ๐Ÿ‡จ",
SCOT: "๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ",
SD: "๐Ÿ‡ธ๐Ÿ‡ฉ",
SE: "๐Ÿ‡ธ๐Ÿ‡ช",
SG: "๐Ÿ‡ธ๐Ÿ‡ฌ",
SH: "๐Ÿ‡ธ๐Ÿ‡ญ",
SI: "๐Ÿ‡ธ๐Ÿ‡ฎ",
SJ: "๐Ÿ‡ธ๐Ÿ‡ฏ",
SK: "๐Ÿ‡ธ๐Ÿ‡ฐ",
SL: "๐Ÿ‡ธ๐Ÿ‡ฑ",
SM: "๐Ÿ‡ธ๐Ÿ‡ฒ",
SN: "๐Ÿ‡ธ๐Ÿ‡ณ",
SO: "๐Ÿ‡ธ๐Ÿ‡ด",
SR: "๐Ÿ‡ธ๐Ÿ‡ท",
SS: "๐Ÿ‡ธ๐Ÿ‡ธ",
ST: "๐Ÿ‡ธ๐Ÿ‡น",
SV: "๐Ÿ‡ธ๐Ÿ‡ป",
SX: "๐Ÿ‡ธ๐Ÿ‡ฝ",
SY: "๐Ÿ‡ธ๐Ÿ‡พ",
SZ: "๐Ÿ‡ธ๐Ÿ‡ฟ",
TC: "๐Ÿ‡น๐Ÿ‡จ",
TD: "๐Ÿ‡น๐Ÿ‡ฉ",
TF: "๐Ÿ‡น๐Ÿ‡ซ",
TG: "๐Ÿ‡น๐Ÿ‡ฌ",
TH: "๐Ÿ‡น๐Ÿ‡ญ",
TJ: "๐Ÿ‡น๐Ÿ‡ฏ",
TK: "๐Ÿ‡น๐Ÿ‡ฐ",
TL: "๐Ÿ‡น๐Ÿ‡ฑ",
TM: "๐Ÿ‡น๐Ÿ‡ฒ",
TN: "๐Ÿ‡น๐Ÿ‡ณ",
TO: "๐Ÿ‡น๐Ÿ‡ด",
TR: "๐Ÿ‡น๐Ÿ‡ท",
TT: "๐Ÿ‡น๐Ÿ‡น",
TV: "๐Ÿ‡น๐Ÿ‡ป",
TW: "๐Ÿ‡น๐Ÿ‡ผ",
TZ: "๐Ÿ‡น๐Ÿ‡ฟ",
UA: "๐Ÿ‡บ๐Ÿ‡ฆ",
UG: "๐Ÿ‡บ๐Ÿ‡ฌ",
UM: "๐Ÿ‡บ๐Ÿ‡ฒ",
US: "๐Ÿ‡บ๐Ÿ‡ธ",
UY: "๐Ÿ‡บ๐Ÿ‡พ",
UZ: "๐Ÿ‡บ๐Ÿ‡ฟ",
VA: "๐Ÿ‡ป๐Ÿ‡ฆ",
VC: "๐Ÿ‡ป๐Ÿ‡จ",
VE: "๐Ÿ‡ป๐Ÿ‡ช",
VG: "๐Ÿ‡ป๐Ÿ‡ฌ",
VI: "๐Ÿ‡ป๐Ÿ‡ฎ",
VN: "๐Ÿ‡ป๐Ÿ‡ณ",
VU: "๐Ÿ‡ป๐Ÿ‡บ",
WF: "๐Ÿ‡ผ๐Ÿ‡ซ",
WS: "๐Ÿ‡ผ๐Ÿ‡ธ",
YE: "๐Ÿ‡พ๐Ÿ‡ช",
YT: "๐Ÿ‡พ๐Ÿ‡น",
ZA: "๐Ÿ‡ฟ๐Ÿ‡ฆ",
ZM: "๐Ÿ‡ฟ๐Ÿ‡ฒ",
ZW: "๐Ÿ‡ฟ๐Ÿ‡ผ"
}[x])(c)) as "Time and Place",
DateStarted + " โ€” " + DateFinished as Dates,
"(" + choice((DateFinished != DateStarted), (DateFinished - DateStarted).days + " days", "0 days" ) + ")" as "Reading Time"
FROM "Book Log/2022"
WHERE Medium = "Book" OR Medium = "Audiobook" OR Medium = "Podcast" OR Medium = "eBook"
SORT DateFinished desc

For reference, my version with the nested choice doesnโ€™t look nice, but worked:

TABLE without id 
("![](" + Cover + ")") as Cover,
link(file.link, Alias) + " by " + Author + (choice(medium = "Book", " ๐Ÿ“– ", choice(medium = "Audiobook", " ๐ŸŽง ", choice(medium = "Podcast", " ๐Ÿ“ป ", choice(medium = "eBook", " ๐Ÿ“ƒ ", ""))))) + choice(contains(tags, "Favorite"), "๐Ÿ’›", "") as Title, 
Year + " || " + " โญ " + Rating + " || " + (choice(medium = "Book", Pages + " p", choice(medium = "Audiobook", Hours + " h", choice(medium = "Podcast", Hours + " h", choice(medium = "eBook", Pages + " p", ""))))) + " || " + map(split(Country, ", "), (c) => ((x) => {
AD: "๐Ÿ‡ฆ๐Ÿ‡ฉ",
AE: "๐Ÿ‡ฆ๐Ÿ‡ช",
AF: "๐Ÿ‡ฆ๐Ÿ‡ซ",
AG: "๐Ÿ‡ฆ๐Ÿ‡ฌ",
AI: "๐Ÿ‡ฆ๐Ÿ‡ฎ",
AL: "๐Ÿ‡ฆ๐Ÿ‡ฑ",
AM: "๐Ÿ‡ฆ๐Ÿ‡ฒ",
AO: "๐Ÿ‡ฆ๐Ÿ‡ด",
AQ: "๐Ÿ‡ฆ๐Ÿ‡ถ",
AR: "๐Ÿ‡ฆ๐Ÿ‡ท",
AS: "๐Ÿ‡ฆ๐Ÿ‡ธ",
AT: "๐Ÿ‡ฆ๐Ÿ‡น",
AU: "๐Ÿ‡ฆ๐Ÿ‡บ",
AW: "๐Ÿ‡ฆ๐Ÿ‡ผ",
AX: "๐Ÿ‡ฆ๐Ÿ‡ฝ",
AZ: "๐Ÿ‡ฆ๐Ÿ‡ฟ",
BA: "๐Ÿ‡ง๐Ÿ‡ฆ",
BB: "๐Ÿ‡ง๐Ÿ‡ง",
BD: "๐Ÿ‡ง๐Ÿ‡ฉ",
BE: "๐Ÿ‡ง๐Ÿ‡ช",
BF: "๐Ÿ‡ง๐Ÿ‡ซ",
BG: "๐Ÿ‡ง๐Ÿ‡ฌ",
BH: "๐Ÿ‡ง๐Ÿ‡ญ",
BI: "๐Ÿ‡ง๐Ÿ‡ฎ",
BJ: "๐Ÿ‡ง๐Ÿ‡ฏ",
BL: "๐Ÿ‡ง๐Ÿ‡ฑ",
BM: "๐Ÿ‡ง๐Ÿ‡ฒ",
BN: "๐Ÿ‡ง๐Ÿ‡ณ",
BO: "๐Ÿ‡ง๐Ÿ‡ด",
BQ: "๐Ÿ‡ง๐Ÿ‡ถ",
BR: "๐Ÿ‡ง๐Ÿ‡ท",
BS: "๐Ÿ‡ง๐Ÿ‡ธ",
BT: "๐Ÿ‡ง๐Ÿ‡น",
BV: "๐Ÿ‡ง๐Ÿ‡ป",
BW: "๐Ÿ‡ง๐Ÿ‡ผ",
BY: "๐Ÿ‡ง๐Ÿ‡พ",
BZ: "๐Ÿ‡ง๐Ÿ‡ฟ",
CA: "๐Ÿ‡จ๐Ÿ‡ฆ",
CC: "๐Ÿ‡จ๐Ÿ‡จ",
CD: "๐Ÿ‡จ๐Ÿ‡ฉ",
CF: "๐Ÿ‡จ๐Ÿ‡ซ",
CG: "๐Ÿ‡จ๐Ÿ‡ฌ",
CH: "๐Ÿ‡จ๐Ÿ‡ญ",
CI: "๐Ÿ‡จ๐Ÿ‡ฎ",
CK: "๐Ÿ‡จ๐Ÿ‡ฐ",
CL: "๐Ÿ‡จ๐Ÿ‡ฑ",
CM: "๐Ÿ‡จ๐Ÿ‡ฒ",
CN: "๐Ÿ‡จ๐Ÿ‡ณ",
CO: "๐Ÿ‡จ๐Ÿ‡ด",
CR: "๐Ÿ‡จ๐Ÿ‡ท",
CU: "๐Ÿ‡จ๐Ÿ‡บ",
CV: "๐Ÿ‡จ๐Ÿ‡ป",
CW: "๐Ÿ‡จ๐Ÿ‡ผ",
CX: "๐Ÿ‡จ๐Ÿ‡ฝ",
CY: "๐Ÿ‡จ๐Ÿ‡พ",
CYMRU: "๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ",
CZ: "๐Ÿ‡จ๐Ÿ‡ฟ",
DE: "๐Ÿ‡ฉ๐Ÿ‡ช",
DJ: "๐Ÿ‡ฉ๐Ÿ‡ฏ",
DK: "๐Ÿ‡ฉ๐Ÿ‡ฐ",
DM: "๐Ÿ‡ฉ๐Ÿ‡ฒ",
DO: "๐Ÿ‡ฉ๐Ÿ‡ด",
DZ: "๐Ÿ‡ฉ๐Ÿ‡ฟ",
EC: "๐Ÿ‡ช๐Ÿ‡จ",
EE: "๐Ÿ‡ช๐Ÿ‡ช",
EG: "๐Ÿ‡ช๐Ÿ‡ฌ",
EH: "๐Ÿ‡ช๐Ÿ‡ญ",
ENG: "๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ",
ER: "๐Ÿ‡ช๐Ÿ‡ท",
ES: "๐Ÿ‡ช๐Ÿ‡ธ",
ET: "๐Ÿ‡ช๐Ÿ‡น",
FI: "๐Ÿ‡ซ๐Ÿ‡ฎ",
FJ: "๐Ÿ‡ซ๐Ÿ‡ฏ",
FK: "๐Ÿ‡ซ๐Ÿ‡ฐ",
FM: "๐Ÿ‡ซ๐Ÿ‡ฒ",
FO: "๐Ÿ‡ซ๐Ÿ‡ด",
FR: "๐Ÿ‡ซ๐Ÿ‡ท",
GA: "๐Ÿ‡ฌ๐Ÿ‡ฆ",
GB: "๐Ÿ‡ฌ๐Ÿ‡ง",
GD: "๐Ÿ‡ฌ๐Ÿ‡ฉ",
GE: "๐Ÿ‡ฌ๐Ÿ‡ช",
GF: "๐Ÿ‡ฌ๐Ÿ‡ซ",
GG: "๐Ÿ‡ฌ๐Ÿ‡ฌ",
GH: "๐Ÿ‡ฌ๐Ÿ‡ญ",
GI: "๐Ÿ‡ฌ๐Ÿ‡ฎ",
GL: "๐Ÿ‡ฌ๐Ÿ‡ฑ",
GM: "๐Ÿ‡ฌ๐Ÿ‡ฒ",
GN: "๐Ÿ‡ฌ๐Ÿ‡ณ",
GP: "๐Ÿ‡ฌ๐Ÿ‡ต",
GQ: "๐Ÿ‡ฌ๐Ÿ‡ถ",
GR: "๐Ÿ‡ฌ๐Ÿ‡ท",
GS: "๐Ÿ‡ฌ๐Ÿ‡ธ",
GT: "๐Ÿ‡ฌ๐Ÿ‡น",
GU: "๐Ÿ‡ฌ๐Ÿ‡บ",
GW: "๐Ÿ‡ฌ๐Ÿ‡ผ",
GY: "๐Ÿ‡ฌ๐Ÿ‡พ",
HK: "๐Ÿ‡ญ๐Ÿ‡ฐ",
HM: "๐Ÿ‡ญ๐Ÿ‡ฒ",
HN: "๐Ÿ‡ญ๐Ÿ‡ณ",
HR: "๐Ÿ‡ญ๐Ÿ‡ท",
HT: "๐Ÿ‡ญ๐Ÿ‡น",
HU: "๐Ÿ‡ญ๐Ÿ‡บ",
ID: "๐Ÿ‡ฎ๐Ÿ‡ฉ",
IE: "๐Ÿ‡ฎ๐Ÿ‡ช",
IL: "๐Ÿ‡ฎ๐Ÿ‡ฑ",
IM: "๐Ÿ‡ฎ๐Ÿ‡ฒ",
IN: "๐Ÿ‡ฎ๐Ÿ‡ณ",
IO: "๐Ÿ‡ฎ๐Ÿ‡ด",
IQ: "๐Ÿ‡ฎ๐Ÿ‡ถ",
IR: "๐Ÿ‡ฎ๐Ÿ‡ท",
IS: "๐Ÿ‡ฎ๐Ÿ‡ธ",
IT: "๐Ÿ‡ฎ๐Ÿ‡น",
JE: "๐Ÿ‡ฏ๐Ÿ‡ช",
JM: "๐Ÿ‡ฏ๐Ÿ‡ฒ",
JO: "๐Ÿ‡ฏ๐Ÿ‡ด",
JP: "๐Ÿ‡ฏ๐Ÿ‡ต",
KE: "๐Ÿ‡ฐ๐Ÿ‡ช",
KG: "๐Ÿ‡ฐ๐Ÿ‡ฌ",
KH: "๐Ÿ‡ฐ๐Ÿ‡ญ",
KI: "๐Ÿ‡ฐ๐Ÿ‡ฎ",
KM: "๐Ÿ‡ฐ๐Ÿ‡ฒ",
KN: "๐Ÿ‡ฐ๐Ÿ‡ณ",
KP: "๐Ÿ‡ฐ๐Ÿ‡ต",
KR: "๐Ÿ‡ฐ๐Ÿ‡ท",
KW: "๐Ÿ‡ฐ๐Ÿ‡ผ",
KY: "๐Ÿ‡ฐ๐Ÿ‡พ",
KZ: "๐Ÿ‡ฐ๐Ÿ‡ฟ",
LA: "๐Ÿ‡ฑ๐Ÿ‡ฆ",
LB: "๐Ÿ‡ฑ๐Ÿ‡ง",
LC: "๐Ÿ‡ฑ๐Ÿ‡จ",
LI: "๐Ÿ‡ฑ๐Ÿ‡ฎ",
LK: "๐Ÿ‡ฑ๐Ÿ‡ฐ",
LR: "๐Ÿ‡ฑ๐Ÿ‡ท",
LS: "๐Ÿ‡ฑ๐Ÿ‡ธ",
LT: "๐Ÿ‡ฑ๐Ÿ‡น",
LU: "๐Ÿ‡ฑ๐Ÿ‡บ",
LV: "๐Ÿ‡ฑ๐Ÿ‡ป",
LY: "๐Ÿ‡ฑ๐Ÿ‡พ",
MA: "๐Ÿ‡ฒ๐Ÿ‡ฆ",
MC: "๐Ÿ‡ฒ๐Ÿ‡จ",
MD: "๐Ÿ‡ฒ๐Ÿ‡ฉ",
ME: "๐Ÿ‡ฒ๐Ÿ‡ช",
MF: "๐Ÿ‡ฒ๐Ÿ‡ซ",
MG: "๐Ÿ‡ฒ๐Ÿ‡ฌ",
MH: "๐Ÿ‡ฒ๐Ÿ‡ญ",
MK: "๐Ÿ‡ฒ๐Ÿ‡ฐ",
ML: "๐Ÿ‡ฒ๐Ÿ‡ฑ",
MM: "๐Ÿ‡ฒ๐Ÿ‡ฒ",
MN: "๐Ÿ‡ฒ๐Ÿ‡ณ",
MO: "๐Ÿ‡ฒ๐Ÿ‡ด",
MP: "๐Ÿ‡ฒ๐Ÿ‡ต",
MQ: "๐Ÿ‡ฒ๐Ÿ‡ถ",
MR: "๐Ÿ‡ฒ๐Ÿ‡ท",
MS: "๐Ÿ‡ฒ๐Ÿ‡ธ",
MT: "๐Ÿ‡ฒ๐Ÿ‡น",
MU: "๐Ÿ‡ฒ๐Ÿ‡บ",
MV: "๐Ÿ‡ฒ๐Ÿ‡ป",
MW: "๐Ÿ‡ฒ๐Ÿ‡ผ",
MX: "๐Ÿ‡ฒ๐Ÿ‡ฝ",
MY: "๐Ÿ‡ฒ๐Ÿ‡พ",
MZ: "๐Ÿ‡ฒ๐Ÿ‡ฟ",
NA: "๐Ÿ‡ณ๐Ÿ‡ฆ",
NC: "๐Ÿ‡ณ๐Ÿ‡จ",
NE: "๐Ÿ‡ณ๐Ÿ‡ช",
NF: "๐Ÿ‡ณ๐Ÿ‡ซ",
NG: "๐Ÿ‡ณ๐Ÿ‡ฌ",
NI: "๐Ÿ‡ณ๐Ÿ‡ฎ",
NL: "๐Ÿ‡ณ๐Ÿ‡ฑ",
NO: "๐Ÿ‡ณ๐Ÿ‡ด",
NP: "๐Ÿ‡ณ๐Ÿ‡ต",
NR: "๐Ÿ‡ณ๐Ÿ‡ท",
NU: "๐Ÿ‡ณ๐Ÿ‡บ",
NZ: "๐Ÿ‡ณ๐Ÿ‡ฟ",
OM: "๐Ÿ‡ด๐Ÿ‡ฒ",
PA: "๐Ÿ‡ต๐Ÿ‡ฆ",
PE: "๐Ÿ‡ต๐Ÿ‡ช",
PF: "๐Ÿ‡ต๐Ÿ‡ซ",
PG: "๐Ÿ‡ต๐Ÿ‡ฌ",
PH: "๐Ÿ‡ต๐Ÿ‡ญ",
PK: "๐Ÿ‡ต๐Ÿ‡ฐ",
PL: "๐Ÿ‡ต๐Ÿ‡ฑ",
PM: "๐Ÿ‡ต๐Ÿ‡ฒ",
PN: "๐Ÿ‡ต๐Ÿ‡ณ",
PR: "๐Ÿ‡ต๐Ÿ‡ท",
PS: "๐Ÿ‡ต๐Ÿ‡ธ",
PT: "๐Ÿ‡ต๐Ÿ‡น",
PW: "๐Ÿ‡ต๐Ÿ‡ผ",
PY: "๐Ÿ‡ต๐Ÿ‡พ",
QA: "๐Ÿ‡ถ๐Ÿ‡ฆ",
RE: "๐Ÿ‡ท๐Ÿ‡ช",
RO: "๐Ÿ‡ท๐Ÿ‡ด",
RS: "๐Ÿ‡ท๐Ÿ‡ธ",
RU: "๐Ÿ‡ท๐Ÿ‡บ",
RW: "๐Ÿ‡ท๐Ÿ‡ผ",
SA: "๐Ÿ‡ธ๐Ÿ‡ฆ",
SB: "๐Ÿ‡ธ๐Ÿ‡ง",
SC: "๐Ÿ‡ธ๐Ÿ‡จ",
SCOT: "๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ",
SD: "๐Ÿ‡ธ๐Ÿ‡ฉ",
SE: "๐Ÿ‡ธ๐Ÿ‡ช",
SG: "๐Ÿ‡ธ๐Ÿ‡ฌ",
SH: "๐Ÿ‡ธ๐Ÿ‡ญ",
SI: "๐Ÿ‡ธ๐Ÿ‡ฎ",
SJ: "๐Ÿ‡ธ๐Ÿ‡ฏ",
SK: "๐Ÿ‡ธ๐Ÿ‡ฐ",
SL: "๐Ÿ‡ธ๐Ÿ‡ฑ",
SM: "๐Ÿ‡ธ๐Ÿ‡ฒ",
SN: "๐Ÿ‡ธ๐Ÿ‡ณ",
SO: "๐Ÿ‡ธ๐Ÿ‡ด",
SR: "๐Ÿ‡ธ๐Ÿ‡ท",
SS: "๐Ÿ‡ธ๐Ÿ‡ธ",
ST: "๐Ÿ‡ธ๐Ÿ‡น",
SV: "๐Ÿ‡ธ๐Ÿ‡ป",
SX: "๐Ÿ‡ธ๐Ÿ‡ฝ",
SY: "๐Ÿ‡ธ๐Ÿ‡พ",
SZ: "๐Ÿ‡ธ๐Ÿ‡ฟ",
TC: "๐Ÿ‡น๐Ÿ‡จ",
TD: "๐Ÿ‡น๐Ÿ‡ฉ",
TF: "๐Ÿ‡น๐Ÿ‡ซ",
TG: "๐Ÿ‡น๐Ÿ‡ฌ",
TH: "๐Ÿ‡น๐Ÿ‡ญ",
TJ: "๐Ÿ‡น๐Ÿ‡ฏ",
TK: "๐Ÿ‡น๐Ÿ‡ฐ",
TL: "๐Ÿ‡น๐Ÿ‡ฑ",
TM: "๐Ÿ‡น๐Ÿ‡ฒ",
TN: "๐Ÿ‡น๐Ÿ‡ณ",
TO: "๐Ÿ‡น๐Ÿ‡ด",
TR: "๐Ÿ‡น๐Ÿ‡ท",
TT: "๐Ÿ‡น๐Ÿ‡น",
TV: "๐Ÿ‡น๐Ÿ‡ป",
TW: "๐Ÿ‡น๐Ÿ‡ผ",
TZ: "๐Ÿ‡น๐Ÿ‡ฟ",
UA: "๐Ÿ‡บ๐Ÿ‡ฆ",
UG: "๐Ÿ‡บ๐Ÿ‡ฌ",
UM: "๐Ÿ‡บ๐Ÿ‡ฒ",
US: "๐Ÿ‡บ๐Ÿ‡ธ",
UY: "๐Ÿ‡บ๐Ÿ‡พ",
UZ: "๐Ÿ‡บ๐Ÿ‡ฟ",
VA: "๐Ÿ‡ป๐Ÿ‡ฆ",
VC: "๐Ÿ‡ป๐Ÿ‡จ",
VE: "๐Ÿ‡ป๐Ÿ‡ช",
VG: "๐Ÿ‡ป๐Ÿ‡ฌ",
VI: "๐Ÿ‡ป๐Ÿ‡ฎ",
VN: "๐Ÿ‡ป๐Ÿ‡ณ",
VU: "๐Ÿ‡ป๐Ÿ‡บ",
WF: "๐Ÿ‡ผ๐Ÿ‡ซ",
WS: "๐Ÿ‡ผ๐Ÿ‡ธ",
YE: "๐Ÿ‡พ๐Ÿ‡ช",
YT: "๐Ÿ‡พ๐Ÿ‡น",
ZA: "๐Ÿ‡ฟ๐Ÿ‡ฆ",
ZM: "๐Ÿ‡ฟ๐Ÿ‡ฒ",
ZW: "๐Ÿ‡ฟ๐Ÿ‡ผ"
}[x])(c)) as "Time and Place",
DateStarted + " โ€” " + DateFinished as Dates,
"(" + choice((DateFinished != DateStarted), (DateFinished - DateStarted).days + " days", "0 days" ) + ")" as "Reading Time"
FROM "Book Log/2022"
WHERE Medium = "Book" OR Medium = "Audiobook" OR Medium = "Podcast" OR Medium = "eBook"
SORT DateFinished desc

but Iโ€™d like to try your FLATTEN because itโ€™s easier to add more values.
Any ideas?
Thanks :slight_smile:

Idea A

  • The WHERE(or FLATTEN) statement should be behind the FROM statement.
  • The FLATTEN statement ends with a field variable like AS Medium instead of AS Medium,.
Summary

DQL01_bug_ReaderGuy42: errors

I canโ€™t get this to work for me. When I try implementing your FLATTEN, I get Parsing errors

```dataview
TABLE without id 
      ("![](" + Cover + ")") AS Cover,
      link(file.link, Alias) + " by " + Author,
      Medium AS "Medium"

WHERE Status != null

FLATTEN object(
    "Book", " ๐Ÿ“– ",
    "Audiobook", " ๐ŸŽง ",
    "Podcast", " ๐Ÿ“ป ",
    "eBook", " ๐Ÿ“ƒ "
)[Medium] AS Medium,

FROM "Book Log/2022"
WHERE Medium = "Book" OR Medium = "Audiobook" OR Medium = "Podcast" OR Medium = "eBook"
SORT DateFinished desc
```

DQL02_bug_fixed_ReaderGuy42: OK

```dataview
TABLE without id 
      ("![](" + Cover + ")") AS Cover,
      link(file.link, Alias) + " by " + Author,
      Medium AS "Medium"

FROM "Book Log/2022"

WHERE Medium = "Book" OR Medium = "Audiobook" OR Medium = "Podcast" OR Medium = "eBook"
WHERE Status != null

SORT DateFinished desc

FLATTEN object(
    "Book", " ๐Ÿ“– ",
    "Audiobook", " ๐ŸŽง ",
    "Podcast", " ๐Ÿ“ป ",
    "eBook", " ๐Ÿ“ƒ "
)[Medium] AS Medium


```

Idea B

  • The FLATTEN operator, which is different from the TABLE operator, does not support batch processing different statements.
  • You need at least five FLATTEN statements to do it because there are to be five new variables like MediumIcon, Title, TimeAndPlace, Dates and ReadingTime.
Summary

DQL03_bug_ReaderGuy42: errors

I canโ€™t get this to work for me. When I try implementing your FLATTEN, I get Parsing errors

```dataview
FLATTEN object(
    "Book", " ๐Ÿ“– ",
    "Audiobook", " ๐ŸŽง ",
    "Podcast", " ๐Ÿ“ป ",
    "eBook", " ๐Ÿ“ƒ "
)[Medium] AS Medium,
 choice(contains(tags, "Favorite"), "๐Ÿ’›", "") as Title, 
Year + " || " + " โญ " + Rating + " || " + (choice(medium = "Book", Pages + " p", choice(medium = "Audiobook", Hours + " h", choice(medium = "Podcast", Hours + " h", choice(medium = "eBook", Pages + " p", ""))))) + " || " + map(split(Country, ", "), (c) => ((x) => {
AD: "๐Ÿ‡ฆ๐Ÿ‡ฉ",
AE: "๐Ÿ‡ฆ๐Ÿ‡ช",
...
...
ZW: "๐Ÿ‡ฟ๐Ÿ‡ผ"
}[x])(c)) as "Time and Place",
DateStarted + " โ€” " + DateFinished as Dates,
"(" + choice((DateFinished != DateStarted), (DateFinished - DateStarted).days + " days", "0 days" ) + ")" as "Reading Time"

```

Idea C

  • When youโ€™re going to write a FLATTEN statement, it is recommended that defining a new field variable is better than using the original variable for easier reading.
Summary

To use an original variable like Medium

```dataview
FLATTEN object(
    "Book", " ๐Ÿ“– ",
    "Audiobook", " ๐ŸŽง ",
    "Podcast", " ๐Ÿ“ป ",
    "eBook", " ๐Ÿ“ƒ "
)[Medium] AS Medium
```

To define a new field variable like MediumIcon

```dataview
FLATTEN object(
    "Book", " ๐Ÿ“– ",
    "Audiobook", " ๐ŸŽง ",
    "Podcast", " ๐Ÿ“ป ",
    "eBook", " ๐Ÿ“ƒ "
)[Medium] AS MediumIcon
```

The DQL30 does what your original DQL that contains 252 country codes does.
What you have to do is to modify the FROM statement.

Topic

Summary
  • How to transform a country code into a flag emoji via JavaScript Objects?
  • How to simplify nested choices where a Medium field content is โ€œBookโ€, โ€œAudiobookโ€, โ€œPodcastโ€ or โ€œeBookโ€?

Test

Summary
  • dataview: v0.5.46

Input

Summary

dictionary files:

Summary
  • Location: โ€œ100_Project/02_dataview/Q20_Flags/Q20_test_data04โ€

folder: 03

  • filename : dic_19800311 (US=United States) (GB=United Kingdom)
---
Date: 1980-03-11
tags: [Favorite]
Alias: "Javascript: The Definitive Guide, 7/e"
Medium: "Book"
Author: "David Flanagan"
 
Country: "US, GB"
DateStarted: "2020-06-23"
DateFinished: "2020-07-25"
Status: "done"

Year: 2020
Rating: 5
Pages: 680
Hours: 
Cover: https://m.media-amazon.com/images/W/WEBP\_402378-T2/images/I/919ZMTHDPBL.\_AC\_SX75\_CR,0,0,75,75\_.jpg
---



# Javascript: The Definitive Guide, 7/e
- What :: [Javascript: The Definitive Guide, 7/e](https://www.amazon.com/-/es/David-Flanagan/dp/1491952024/ref=sr_1_1?__mk_es_US=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=32QHTGRP393RS&keywords=Javascript&qid=1672211738&s=books&sprefix=javascript%2Cstripbooks-intl-ship%2C286&sr=1-1)
- Authors :: 
- Keywords :: 
- Summaries :: 
- Comments :: 
- Downloaded :: 



folder: 04

  • filename : dic_19800411 (IT=Italy)
---
Date: 1980-04-11
tags: [Favorite]
Alias: "UNIX Shells by Example, 4/e"
Medium: "Audiobook"
Author: "Ellie Quigley"

Country: "IT"
DateStarted: "2004-09-01"
DateFinished: "2005-12-25"
Status: "done"

Year: 2004
Rating: 4
Pages: 
Hours: 1200
Cover: https://m.media-amazon.com/images/W/WEBP\_402378-T2/images/I/91vUmLEjbHL.\_AC\_SX75\_CR,0,0,75,75\_.jpg
---


# UNIX Shells by Example, 4/e
- What :: [UNIX Shells by Example, 4/e](https://www.amazon.com/-/es/Ellie-Quigley/dp/013147572X/ref=sr_1_1?__mk_es_US=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=IHF5F5CXXTV0&keywords=UNIX+Shells+by+Example&qid=1672214391&s=books&sprefix=unix+shells+by+example%2Cstripbooks-intl-ship%2C250&sr=1-1)
- Authors :: 
- Keywords :: 
- Summaries :: 
- Comments :: 
- Downloaded :: 




folder: 05

  • filename : dic_19800511 (DE=Germany)
---
Date: 1980-05-11
tags: [Favorite]
Alias: "P_Podcast"
Medium: "Podcast"
Author: "YYY"

Country: "DE"
DateStarted: "2022-12-16"
DateFinished: "2022-12-17"
Status: "done"

Year: 2000
Rating: 3
Pages: 
Hours: 8
Cover: https://media.wnyc.org/i/200/200/c/70/2022/12/NullandVoid_1600x1200.png
---



# Null and Void
- What :: [Null and Void](https://radiolab.org/episodes/null-and-void-2212)
- Authors :: 
- Keywords :: 
- Summaries :: 
- Comments :: 
- Downloaded :: 



folder: 06

  • filename : dic_19800611 (FR=France)
---
Date: 1980-06-11
tags: [Favorite]
Alias: "Perl by Example, 5/e"
Medium: "eBook"
Author: "Ellie Quigley"

Country: "FR"
DateStarted: "2014-12-17"
DateFinished: "2015-12-21"
Status: "done"

Year: 2014
Rating: 5
Pages: 888
Hours: 
Cover: https://m.media-amazon.com/images/W/WEBP\_402378-T2/images/I/41aGGHu7Q-L.\_AC\_SX75\_CR,0,0,75,75\_.jpg
---



# Perl by Example, 5/e
- What :: [Perl by Example, 5/e](https://www.amazon.com/-/es/Ellie-Quigley/dp/0133760812/ref=sr_1_1?__mk_es_US=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=207AKU6YA3671&keywords=perl+by+example&qid=1672212277&s=books&sprefix=perl+by+exampl%2Cstripbooks-intl-ship%2C432&sr=1-1)
- Authors :: 
- Keywords :: 
- Summaries :: 
- Comments :: 
- Downloaded :: 




folder: 08_excluded

  • filename : dic_19800811 (US=United States)
---
Date: 1980-08-11
tags: [test]
Alias: "Z_Others"
Medium: "Others"
Author: "XXX"

Country: "US"
DateStarted: 
DateFinished: 
Status: "done"

Year: 2020
Rating: 1
Pages: 100
Hours:
Cover:
---



# Z_Others
- What :: 
- Authors :: 
- Keywords :: 
- Summaries :: 
- Comments :: 
- Downloaded :: 




DQL30_simplify_nested_choices_via_JavaScript_Objects_and_TABLE

Summary

Main DQL

Code Name Data type Group By Purposes Remark
DQL30
_simplify_nested_choices
_via_JavaScript_Objects
_and_TABLE
Country:
1.a string like โ€œFRโ€
2.a tring like โ€œUS, GBโ€

Medium:
1.โ€œBookโ€
2.โ€œAudiobookโ€
3.โ€œPodcastโ€
4.โ€œeBookโ€
no 1.To simplify ReaderGuy42โ€™s original DQL that contains 252 country codes
2.For best performance
3.For easier reading
4.For easier modification
5.For easier debugging
For Windows OS
(To see Notes of the DQL10
_transform_country_code
_into_flag_icon
_from_HTML_Hex
_and_TABLE):

1.To require NotoColorEmojiLimited.css
2.To enable the CSS snippet

Notes

Summary

Q1: How to modify the following code when โ€œtypeAโ€, โ€œtypeBโ€ or โ€œOthersโ€ (icons: a red , yellow or green circle)(units: h, p, p) is added to a Medium field content?

Summary_Q1
Original Example: Q1 (To be modified)
```dataview


WHERE Medium = "Book" OR Medium = "Audiobook" OR Medium = "Podcast" OR Medium = "eBook"


FLATTEN {
    "Book": " ๐Ÿ“– ",
    "Audiobook": " ๐ŸŽง ",
    "Podcast": " ๐Ÿ“ป ",
    "eBook": " ๐Ÿ“ƒ "
}[Medium] AS P_MediumIcon


FLATTEN {
    "Book": Pages + " p",
    "Audiobook": Hours + " h",
    "Podcast": Hours + " h",
    "eBook": Pages + " p"
}[Medium] AS Q_PagesHours


```

A1:

Another Example: A1_11
```dataview


WHERE Medium = "Book" OR Medium = "Audiobook" OR Medium = "Podcast" OR Medium = "eBook" OR Medium = "typeA" OR Medium = "typeB" OR Medium = "Others"


FLATTEN {
    "Book": " ๐Ÿ“– ",
    "Audiobook": " ๐ŸŽง ",
    "Podcast": " ๐Ÿ“ป ",
    "eBook": " ๐Ÿ“ƒ ",
    "typeA": " ๐Ÿ”ด ",
    "typeB": " ๐ŸŸก ",
    "Others": " ๐ŸŸข "
}[Medium] AS P_MediumIcon


FLATTEN {
    "Book": Pages + " p",
    "Audiobook": Hours + " h",
    "Podcast": Hours + " h",
    "eBook": Pages + " p",
    "typeA": Pages + " h",
    "typeB": Pages + " p",
    "Others": Pages + " p"
}[Medium] AS Q_PagesHours


```

Code DQL30_simplify_nested_choices_via_JavaScript_Objects_and_TABLE

Summary_code
title: DQL30_simplify_nested_choices_via_JavaScript_Objects_and_TABLE =>0.For Windows OS:To require `NotoColorEmojiLimited.css` and To enable the CSS snippet 1.To simplify ReaderGuy42's original DQL 2.For best performance 3.For easier reading 4.For easier modification 5.For easier debugging
collapse: close
icon: 
color: 
```dataview
TABLE without id 
      ("![](" + Cover + ")") AS "Cover",
      P_BookByAuthor + P_MediumIcon + P_FavoriteIcon AS "Title",
      Q_YearRating + Q_PagesHours + " || " + Q_FLAG AS "Time and Place",      
      R_Dates AS "Dates",
      S_ReadingTime AS "Reading Time"
      
FROM "100_Project/02_dataview/Q20_Flags/Q20_test_data04"

WHERE Status != null
WHERE Medium = "Book" OR Medium = "Audiobook" OR Medium = "Podcast" OR Medium = "eBook"
SORT DateFinished desc


FLATTEN link(file.link, Alias) + " by " + Author AS P_BookByAuthor
FLATTEN choice(contains(tags, "Favorite"), "๐Ÿ’›", "") AS P_FavoriteIcon

FLATTEN {
    "Book": " ๐Ÿ“– ",
    "Audiobook": " ๐ŸŽง ",
    "Podcast": " ๐Ÿ“ป ",
    "eBook": " ๐Ÿ“ƒ "
}[Medium] AS P_MediumIcon



FLATTEN DateStarted + " โ€” " + DateFinished AS R_Dates
FLATTEN "(" + choice((DateFinished != DateStarted), (DateFinished - DateStarted).days + " days", "0 days" ) + ")" AS S_ReadingTime



FLATTEN Year + " || " + " โญ " + Rating + " || " AS Q_YearRating

FLATTEN {
    "Book": Pages + " p",
    "Audiobook": Hours + " h",
    "Podcast": Hours + " h",
    "eBook": Pages + " p"
}[Medium] AS Q_PagesHours


FLATTEN join(map(split(Country, ", "), (c) => {
AD: "๐Ÿ‡ฆ๐Ÿ‡ฉ",
AE: "๐Ÿ‡ฆ๐Ÿ‡ช",
AF: "๐Ÿ‡ฆ๐Ÿ‡ซ",
AG: "๐Ÿ‡ฆ๐Ÿ‡ฌ",
AI: "๐Ÿ‡ฆ๐Ÿ‡ฎ",
AL: "๐Ÿ‡ฆ๐Ÿ‡ฑ",
AM: "๐Ÿ‡ฆ๐Ÿ‡ฒ",
AO: "๐Ÿ‡ฆ๐Ÿ‡ด",
AQ: "๐Ÿ‡ฆ๐Ÿ‡ถ",
AR: "๐Ÿ‡ฆ๐Ÿ‡ท",
AS: "๐Ÿ‡ฆ๐Ÿ‡ธ",
AT: "๐Ÿ‡ฆ๐Ÿ‡น",
AU: "๐Ÿ‡ฆ๐Ÿ‡บ",
AW: "๐Ÿ‡ฆ๐Ÿ‡ผ",
AX: "๐Ÿ‡ฆ๐Ÿ‡ฝ",
AZ: "๐Ÿ‡ฆ๐Ÿ‡ฟ",
BA: "๐Ÿ‡ง๐Ÿ‡ฆ",
BB: "๐Ÿ‡ง๐Ÿ‡ง",
BD: "๐Ÿ‡ง๐Ÿ‡ฉ",
BE: "๐Ÿ‡ง๐Ÿ‡ช",
BF: "๐Ÿ‡ง๐Ÿ‡ซ",
BG: "๐Ÿ‡ง๐Ÿ‡ฌ",
BH: "๐Ÿ‡ง๐Ÿ‡ญ",
BI: "๐Ÿ‡ง๐Ÿ‡ฎ",
BJ: "๐Ÿ‡ง๐Ÿ‡ฏ",
BL: "๐Ÿ‡ง๐Ÿ‡ฑ",
BM: "๐Ÿ‡ง๐Ÿ‡ฒ",
BN: "๐Ÿ‡ง๐Ÿ‡ณ",
BO: "๐Ÿ‡ง๐Ÿ‡ด",
BQ: "๐Ÿ‡ง๐Ÿ‡ถ",
BR: "๐Ÿ‡ง๐Ÿ‡ท",
BS: "๐Ÿ‡ง๐Ÿ‡ธ",
BT: "๐Ÿ‡ง๐Ÿ‡น",
BV: "๐Ÿ‡ง๐Ÿ‡ป",
BW: "๐Ÿ‡ง๐Ÿ‡ผ",
BY: "๐Ÿ‡ง๐Ÿ‡พ",
BZ: "๐Ÿ‡ง๐Ÿ‡ฟ",
CA: "๐Ÿ‡จ๐Ÿ‡ฆ",
CC: "๐Ÿ‡จ๐Ÿ‡จ",
CD: "๐Ÿ‡จ๐Ÿ‡ฉ",
CF: "๐Ÿ‡จ๐Ÿ‡ซ",
CG: "๐Ÿ‡จ๐Ÿ‡ฌ",
CH: "๐Ÿ‡จ๐Ÿ‡ญ",
CI: "๐Ÿ‡จ๐Ÿ‡ฎ",
CK: "๐Ÿ‡จ๐Ÿ‡ฐ",
CL: "๐Ÿ‡จ๐Ÿ‡ฑ",
CM: "๐Ÿ‡จ๐Ÿ‡ฒ",
CN: "๐Ÿ‡จ๐Ÿ‡ณ",
CO: "๐Ÿ‡จ๐Ÿ‡ด",
CR: "๐Ÿ‡จ๐Ÿ‡ท",
CU: "๐Ÿ‡จ๐Ÿ‡บ",
CV: "๐Ÿ‡จ๐Ÿ‡ป",
CW: "๐Ÿ‡จ๐Ÿ‡ผ",
CX: "๐Ÿ‡จ๐Ÿ‡ฝ",
CY: "๐Ÿ‡จ๐Ÿ‡พ",
CYMRU: "๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ",
CZ: "๐Ÿ‡จ๐Ÿ‡ฟ",
DE: "๐Ÿ‡ฉ๐Ÿ‡ช",
DJ: "๐Ÿ‡ฉ๐Ÿ‡ฏ",
DK: "๐Ÿ‡ฉ๐Ÿ‡ฐ",
DM: "๐Ÿ‡ฉ๐Ÿ‡ฒ",
DO: "๐Ÿ‡ฉ๐Ÿ‡ด",
DZ: "๐Ÿ‡ฉ๐Ÿ‡ฟ",
EC: "๐Ÿ‡ช๐Ÿ‡จ",
EE: "๐Ÿ‡ช๐Ÿ‡ช",
EG: "๐Ÿ‡ช๐Ÿ‡ฌ",
EH: "๐Ÿ‡ช๐Ÿ‡ญ",
ENG: "๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ",
ER: "๐Ÿ‡ช๐Ÿ‡ท",
ES: "๐Ÿ‡ช๐Ÿ‡ธ",
ET: "๐Ÿ‡ช๐Ÿ‡น",
FI: "๐Ÿ‡ซ๐Ÿ‡ฎ",
FJ: "๐Ÿ‡ซ๐Ÿ‡ฏ",
FK: "๐Ÿ‡ซ๐Ÿ‡ฐ",
FM: "๐Ÿ‡ซ๐Ÿ‡ฒ",
FO: "๐Ÿ‡ซ๐Ÿ‡ด",
FR: "๐Ÿ‡ซ๐Ÿ‡ท",
GA: "๐Ÿ‡ฌ๐Ÿ‡ฆ",
GB: "๐Ÿ‡ฌ๐Ÿ‡ง",
GD: "๐Ÿ‡ฌ๐Ÿ‡ฉ",
GE: "๐Ÿ‡ฌ๐Ÿ‡ช",
GF: "๐Ÿ‡ฌ๐Ÿ‡ซ",
GG: "๐Ÿ‡ฌ๐Ÿ‡ฌ",
GH: "๐Ÿ‡ฌ๐Ÿ‡ญ",
GI: "๐Ÿ‡ฌ๐Ÿ‡ฎ",
GL: "๐Ÿ‡ฌ๐Ÿ‡ฑ",
GM: "๐Ÿ‡ฌ๐Ÿ‡ฒ",
GN: "๐Ÿ‡ฌ๐Ÿ‡ณ",
GP: "๐Ÿ‡ฌ๐Ÿ‡ต",
GQ: "๐Ÿ‡ฌ๐Ÿ‡ถ",
GR: "๐Ÿ‡ฌ๐Ÿ‡ท",
GS: "๐Ÿ‡ฌ๐Ÿ‡ธ",
GT: "๐Ÿ‡ฌ๐Ÿ‡น",
GU: "๐Ÿ‡ฌ๐Ÿ‡บ",
GW: "๐Ÿ‡ฌ๐Ÿ‡ผ",
GY: "๐Ÿ‡ฌ๐Ÿ‡พ",
HK: "๐Ÿ‡ญ๐Ÿ‡ฐ",
HM: "๐Ÿ‡ญ๐Ÿ‡ฒ",
HN: "๐Ÿ‡ญ๐Ÿ‡ณ",
HR: "๐Ÿ‡ญ๐Ÿ‡ท",
HT: "๐Ÿ‡ญ๐Ÿ‡น",
HU: "๐Ÿ‡ญ๐Ÿ‡บ",
ID: "๐Ÿ‡ฎ๐Ÿ‡ฉ",
IE: "๐Ÿ‡ฎ๐Ÿ‡ช",
IL: "๐Ÿ‡ฎ๐Ÿ‡ฑ",
IM: "๐Ÿ‡ฎ๐Ÿ‡ฒ",
IN: "๐Ÿ‡ฎ๐Ÿ‡ณ",
IO: "๐Ÿ‡ฎ๐Ÿ‡ด",
IQ: "๐Ÿ‡ฎ๐Ÿ‡ถ",
IR: "๐Ÿ‡ฎ๐Ÿ‡ท",
IS: "๐Ÿ‡ฎ๐Ÿ‡ธ",
IT: "๐Ÿ‡ฎ๐Ÿ‡น",
JE: "๐Ÿ‡ฏ๐Ÿ‡ช",
JM: "๐Ÿ‡ฏ๐Ÿ‡ฒ",
JO: "๐Ÿ‡ฏ๐Ÿ‡ด",
JP: "๐Ÿ‡ฏ๐Ÿ‡ต",
KE: "๐Ÿ‡ฐ๐Ÿ‡ช",
KG: "๐Ÿ‡ฐ๐Ÿ‡ฌ",
KH: "๐Ÿ‡ฐ๐Ÿ‡ญ",
KI: "๐Ÿ‡ฐ๐Ÿ‡ฎ",
KM: "๐Ÿ‡ฐ๐Ÿ‡ฒ",
KN: "๐Ÿ‡ฐ๐Ÿ‡ณ",
KP: "๐Ÿ‡ฐ๐Ÿ‡ต",
KR: "๐Ÿ‡ฐ๐Ÿ‡ท",
KW: "๐Ÿ‡ฐ๐Ÿ‡ผ",
KY: "๐Ÿ‡ฐ๐Ÿ‡พ",
KZ: "๐Ÿ‡ฐ๐Ÿ‡ฟ",
LA: "๐Ÿ‡ฑ๐Ÿ‡ฆ",
LB: "๐Ÿ‡ฑ๐Ÿ‡ง",
LC: "๐Ÿ‡ฑ๐Ÿ‡จ",
LI: "๐Ÿ‡ฑ๐Ÿ‡ฎ",
LK: "๐Ÿ‡ฑ๐Ÿ‡ฐ",
LR: "๐Ÿ‡ฑ๐Ÿ‡ท",
LS: "๐Ÿ‡ฑ๐Ÿ‡ธ",
LT: "๐Ÿ‡ฑ๐Ÿ‡น",
LU: "๐Ÿ‡ฑ๐Ÿ‡บ",
LV: "๐Ÿ‡ฑ๐Ÿ‡ป",
LY: "๐Ÿ‡ฑ๐Ÿ‡พ",
MA: "๐Ÿ‡ฒ๐Ÿ‡ฆ",
MC: "๐Ÿ‡ฒ๐Ÿ‡จ",
MD: "๐Ÿ‡ฒ๐Ÿ‡ฉ",
ME: "๐Ÿ‡ฒ๐Ÿ‡ช",
MF: "๐Ÿ‡ฒ๐Ÿ‡ซ",
MG: "๐Ÿ‡ฒ๐Ÿ‡ฌ",
MH: "๐Ÿ‡ฒ๐Ÿ‡ญ",
MK: "๐Ÿ‡ฒ๐Ÿ‡ฐ",
ML: "๐Ÿ‡ฒ๐Ÿ‡ฑ",
MM: "๐Ÿ‡ฒ๐Ÿ‡ฒ",
MN: "๐Ÿ‡ฒ๐Ÿ‡ณ",
MO: "๐Ÿ‡ฒ๐Ÿ‡ด",
MP: "๐Ÿ‡ฒ๐Ÿ‡ต",
MQ: "๐Ÿ‡ฒ๐Ÿ‡ถ",
MR: "๐Ÿ‡ฒ๐Ÿ‡ท",
MS: "๐Ÿ‡ฒ๐Ÿ‡ธ",
MT: "๐Ÿ‡ฒ๐Ÿ‡น",
MU: "๐Ÿ‡ฒ๐Ÿ‡บ",
MV: "๐Ÿ‡ฒ๐Ÿ‡ป",
MW: "๐Ÿ‡ฒ๐Ÿ‡ผ",
MX: "๐Ÿ‡ฒ๐Ÿ‡ฝ",
MY: "๐Ÿ‡ฒ๐Ÿ‡พ",
MZ: "๐Ÿ‡ฒ๐Ÿ‡ฟ",
NA: "๐Ÿ‡ณ๐Ÿ‡ฆ",
NC: "๐Ÿ‡ณ๐Ÿ‡จ",
NE: "๐Ÿ‡ณ๐Ÿ‡ช",
NF: "๐Ÿ‡ณ๐Ÿ‡ซ",
NG: "๐Ÿ‡ณ๐Ÿ‡ฌ",
NI: "๐Ÿ‡ณ๐Ÿ‡ฎ",
NL: "๐Ÿ‡ณ๐Ÿ‡ฑ",
NO: "๐Ÿ‡ณ๐Ÿ‡ด",
NP: "๐Ÿ‡ณ๐Ÿ‡ต",
NR: "๐Ÿ‡ณ๐Ÿ‡ท",
NU: "๐Ÿ‡ณ๐Ÿ‡บ",
NZ: "๐Ÿ‡ณ๐Ÿ‡ฟ",
OM: "๐Ÿ‡ด๐Ÿ‡ฒ",
PA: "๐Ÿ‡ต๐Ÿ‡ฆ",
PE: "๐Ÿ‡ต๐Ÿ‡ช",
PF: "๐Ÿ‡ต๐Ÿ‡ซ",
PG: "๐Ÿ‡ต๐Ÿ‡ฌ",
PH: "๐Ÿ‡ต๐Ÿ‡ญ",
PK: "๐Ÿ‡ต๐Ÿ‡ฐ",
PL: "๐Ÿ‡ต๐Ÿ‡ฑ",
PM: "๐Ÿ‡ต๐Ÿ‡ฒ",
PN: "๐Ÿ‡ต๐Ÿ‡ณ",
PR: "๐Ÿ‡ต๐Ÿ‡ท",
PS: "๐Ÿ‡ต๐Ÿ‡ธ",
PT: "๐Ÿ‡ต๐Ÿ‡น",
PW: "๐Ÿ‡ต๐Ÿ‡ผ",
PY: "๐Ÿ‡ต๐Ÿ‡พ",
QA: "๐Ÿ‡ถ๐Ÿ‡ฆ",
RE: "๐Ÿ‡ท๐Ÿ‡ช",
RO: "๐Ÿ‡ท๐Ÿ‡ด",
RS: "๐Ÿ‡ท๐Ÿ‡ธ",
RU: "๐Ÿ‡ท๐Ÿ‡บ",
RW: "๐Ÿ‡ท๐Ÿ‡ผ",
SA: "๐Ÿ‡ธ๐Ÿ‡ฆ",
SB: "๐Ÿ‡ธ๐Ÿ‡ง",
SC: "๐Ÿ‡ธ๐Ÿ‡จ",
SCOT: "๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ",
SD: "๐Ÿ‡ธ๐Ÿ‡ฉ",
SE: "๐Ÿ‡ธ๐Ÿ‡ช",
SG: "๐Ÿ‡ธ๐Ÿ‡ฌ",
SH: "๐Ÿ‡ธ๐Ÿ‡ญ",
SI: "๐Ÿ‡ธ๐Ÿ‡ฎ",
SJ: "๐Ÿ‡ธ๐Ÿ‡ฏ",
SK: "๐Ÿ‡ธ๐Ÿ‡ฐ",
SL: "๐Ÿ‡ธ๐Ÿ‡ฑ",
SM: "๐Ÿ‡ธ๐Ÿ‡ฒ",
SN: "๐Ÿ‡ธ๐Ÿ‡ณ",
SO: "๐Ÿ‡ธ๐Ÿ‡ด",
SR: "๐Ÿ‡ธ๐Ÿ‡ท",
SS: "๐Ÿ‡ธ๐Ÿ‡ธ",
ST: "๐Ÿ‡ธ๐Ÿ‡น",
SV: "๐Ÿ‡ธ๐Ÿ‡ป",
SX: "๐Ÿ‡ธ๐Ÿ‡ฝ",
SY: "๐Ÿ‡ธ๐Ÿ‡พ",
SZ: "๐Ÿ‡ธ๐Ÿ‡ฟ",
TC: "๐Ÿ‡น๐Ÿ‡จ",
TD: "๐Ÿ‡น๐Ÿ‡ฉ",
TF: "๐Ÿ‡น๐Ÿ‡ซ",
TG: "๐Ÿ‡น๐Ÿ‡ฌ",
TH: "๐Ÿ‡น๐Ÿ‡ญ",
TJ: "๐Ÿ‡น๐Ÿ‡ฏ",
TK: "๐Ÿ‡น๐Ÿ‡ฐ",
TL: "๐Ÿ‡น๐Ÿ‡ฑ",
TM: "๐Ÿ‡น๐Ÿ‡ฒ",
TN: "๐Ÿ‡น๐Ÿ‡ณ",
TO: "๐Ÿ‡น๐Ÿ‡ด",
TR: "๐Ÿ‡น๐Ÿ‡ท",
TT: "๐Ÿ‡น๐Ÿ‡น",
TV: "๐Ÿ‡น๐Ÿ‡ป",
TW: "๐Ÿ‡น๐Ÿ‡ผ",
TZ: "๐Ÿ‡น๐Ÿ‡ฟ",
UA: "๐Ÿ‡บ๐Ÿ‡ฆ",
UG: "๐Ÿ‡บ๐Ÿ‡ฌ",
UM: "๐Ÿ‡บ๐Ÿ‡ฒ",
US: "๐Ÿ‡บ๐Ÿ‡ธ",
UY: "๐Ÿ‡บ๐Ÿ‡พ",
UZ: "๐Ÿ‡บ๐Ÿ‡ฟ",
VA: "๐Ÿ‡ป๐Ÿ‡ฆ",
VC: "๐Ÿ‡ป๐Ÿ‡จ",
VE: "๐Ÿ‡ป๐Ÿ‡ช",
VG: "๐Ÿ‡ป๐Ÿ‡ฌ",
VI: "๐Ÿ‡ป๐Ÿ‡ฎ",
VN: "๐Ÿ‡ป๐Ÿ‡ณ",
VU: "๐Ÿ‡ป๐Ÿ‡บ",
WF: "๐Ÿ‡ผ๐Ÿ‡ซ",
WS: "๐Ÿ‡ผ๐Ÿ‡ธ",
YE: "๐Ÿ‡พ๐Ÿ‡ช",
YT: "๐Ÿ‡พ๐Ÿ‡น",
ZA: "๐Ÿ‡ฟ๐Ÿ‡ฆ",
ZM: "๐Ÿ‡ฟ๐Ÿ‡ฒ",
ZW: "๐Ÿ‡ฟ๐Ÿ‡ผ"
}[c])) AS Q_FLAG

```

Screenshots(DQL30): NotoColorEmojiLimited.css used on win7

Summary_A


Screenshots(DQL30): NotoColorEmojiLimited.css not used on win7

Summary_B


Related resources

Summary

Emojis

JavaScript Objects

The exercises of using FLATTEN


1 Like

Thank you thatโ€™s perfect! Just took me a while to figure it all out. This is awesome, I really appreciate it! Now itโ€™s much easier to add new types of media, etc. :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.