library(showtext)
# ============================================================================
# 0. LOAD FONT
# ============================================================================
font_add_google("Roboto Condensed", "roboto_condensed")
showtext_auto()
# ============================================================================
# 1. DATA
# ============================================================================
region_colors <- c(
"Europe" = "#2E5AAC",
"Asia" = "#C44536",
"Americas" = "#D4A843",
"Oceania" = "#3AA688",
"Mid. East" = "#E07A3E"
)
country_iso2 <- c(
"Monaco" = "mc", "San Marino" = "sm", "Japan" = "jp",
"South Korea" = "kr", "Andorra" = "ad", "Switzerland" = "ch",
"Australia" = "au", "Italy" = "it", "Singapore" = "sg",
"Spain" = "es", "Liechtenstein" = "li", "Malta" = "mt",
"Norway" = "no", "Sweden" = "se", "France" = "fr",
"UAE" = "ae", "Iceland" = "is", "Canada" = "ca",
"Ireland" = "ie", "Israel" = "il", "Portugal" = "pt",
"Qatar" = "qa", "Luxembourg" = "lu", "Netherlands" = "nl",
"Belgium" = "be", "New Zealand" = "nz", "Austria" = "at",
"Finland" = "fi", "Greece" = "gr", "Denmark" = "dk",
"U.S." = "us", "Maldives" = "mv", "Cyprus" = "cy",
"Chile" = "cl", "Costa Rica" = "cr"
)
data_2026 <- tribble(
~rank_2026, ~country_2026, ~value_2026, ~region_2026,
1, "Monaco", 88.7, "Europe",
2, "San Marino", 86.0, "Europe",
3, "Japan", 85.1, "Asia",
4, "South Korea", 84.6, "Asia",
5, "Andorra", 84.5, "Europe",
6, "Switzerland", 84.4, "Europe",
7, "Australia", 84.3, "Oceania",
8, "Italy", 84.2, "Europe",
9, "Singapore", 84.1, "Asia",
10, "Spain", 84.1, "Europe",
11, "Liechtenstein", 84.1, "Europe",
12, "Malta", 83.8, "Europe",
13, "Norway", 83.8, "Europe",
14, "Sweden", 83.7, "Europe",
15, "France", 83.7, "Europe",
16, "UAE", 83.4, "Mid. East",
17, "Iceland", 83.3, "Europe",
18, "Canada", 83.1, "Americas",
19, "Ireland", 82.9, "Europe",
20, "Israel", 82.9, "Mid. East",
21, "Portugal", 82.9, "Europe",
22, "Qatar", 82.8, "Mid. East",
23, "Luxembourg", 82.6, "Europe",
24, "Netherlands", 82.6, "Europe",
25, "Belgium", 82.6, "Europe",
26, "New Zealand", 82.5, "Oceania",
27, "Austria", 82.5, "Europe",
28, "Finland", 82.4, "Europe",
29, "Greece", 82.4, "Europe",
30, "Denmark", 82.4, "Europe",
45, "U.S.", 79.3, "Americas",
)
data_2100 <- tribble(
~rank_2100, ~country_2100, ~value_2100, ~region_2100,
1, "Monaco", 94.7, "Europe",
2, "Japan", 94.4, "Asia",
3, "San Marino", 94.0, "Europe",
4, "South Korea", 93.1, "Asia",
5, "Andorra", 93.0, "Europe",
6, "Liechtenstein", 92.9, "Europe",
7, "Spain", 92.9, "Europe",
8, "Switzerland", 92.8, "Europe",
9, "Italy", 92.8, "Europe",
10, "Singapore", 92.7, "Asia",
11, "Australia", 92.6, "Oceania",
12, "Malta", 92.3, "Europe",
13, "Sweden", 92.2, "Europe",
14, "France", 92.1, "Europe",
15, "Norway", 92.1, "Europe",
16, "Iceland", 92.0, "Europe",
17, "Portugal", 91.9, "Europe",
18, "Ireland", 91.8, "Europe",
19, "Canada", 91.7, "Americas",
20, "Maldives", 91.6, "Asia",
21, "UAE", 91.6, "Mid. East",
22, "Israel", 91.5, "Mid. East",
23, "Netherlands", 91.5, "Europe",
24, "Austria", 91.5, "Europe",
25, "Belgium", 91.4, "Europe",
26, "Greece", 91.4, "Europe",
27, "Cyprus", 91.4, "Europe",
28, "Finland", 91.3, "Europe",
29, "Chile", 91.3, "Americas",
30, "Costa Rica", 91.2, "Americas",
48, "U.S.", 89.2, "Americas"
)