Upload files to ''
This commit is contained in:
parent
e9dc172402
commit
9cd7ec6d23
@ -22,7 +22,7 @@ ggplot(map_df, aes(x = TIME_PERIOD, y = compound_interest, color = geo)) +
|
|||||||
geo_list <- c("Belarus", "Greece", "Latvia", "Albania",
|
geo_list <- c("Belarus", "Greece", "Latvia", "Albania",
|
||||||
"Switzerland", "Bosnia and Herzegovina", "Ukraine",
|
"Switzerland", "Bosnia and Herzegovina", "Ukraine",
|
||||||
"UK", "Turkey", "Serbia", "Kosovo", "Moldova", "North Macedonia",
|
"UK", "Turkey", "Serbia", "Kosovo", "Moldova", "North Macedonia",
|
||||||
"Montenegro", "cyprus", "Malta")
|
"Montenegro", "Cyprus", "Malta", "Georgia", "Armenia")
|
||||||
|
|
||||||
mapdata <- map_data("world")
|
mapdata <- map_data("world")
|
||||||
mapdata1 <- left_join(mapdata, map_df, by="region", relationship = "many-to-many")
|
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)) +
|
map1 <- ggplot(mapdata2, aes(x = long, y = lat, group = group)) +
|
||||||
geom_polygon(aes(fill = compound_interest), color = "black") +
|
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
|
map1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user