Upload files to ''

This commit is contained in:
Paweł Lewicki 2023-05-30 14:42:23 +02:00
parent e9dc172402
commit 9cd7ec6d23
2 changed files with 183 additions and 181 deletions

View File

@ -22,7 +22,7 @@ ggplot(map_df, aes(x = TIME_PERIOD, y = compound_interest, color = geo)) +
geo_list <- c("Belarus", "Greece", "Latvia", "Albania",
"Switzerland", "Bosnia and Herzegovina", "Ukraine",
"UK", "Turkey", "Serbia", "Kosovo", "Moldova", "North Macedonia",
"Montenegro", "cyprus", "Malta")
"Montenegro", "Cyprus", "Malta", "Georgia", "Armenia")
mapdata <- map_data("world")
mapdata1 <- left_join(mapdata, map_df, by="region", relationship = "many-to-many")
@ -32,7 +32,9 @@ mapdata2
map1 <- ggplot(mapdata2, aes(x = long, y = lat, group = group)) +
geom_polygon(aes(fill = compound_interest), color = "black") +
scale_fill_gradient(name="compound interest", low = "white", high = "black", na.value = "yellow")
#geom_text(aes(label = region), size = 3, nudge_y = 1) + # Add labels
#scale_fill_gradient(name="compound interest", low = "white", high = "black", na.value = "yellow") +
scale_fill_viridis_c(name="compound interest", option = "plasma", trans = "sqrt", na.value = "grey") + # colorblind-friendly palette
labs(title = "World Map with Compound Interest") # Set plot title
map1