# NOT RUN {
library(sf)
Greece <- gisco_get_countries(country = "EL", resolution = "1")
AirP_GC <- gisco_get_airports(country = "EL")
AirP_GC <- st_transform(AirP_GC, st_crs(Greece))
library(ggplot2)
ggplot(Greece) +
geom_sf(fill = "grey80") +
geom_sf(data = AirP_GC, color = "blue") +
labs(
title = "Airports on Greece",
shape = NULL,
color = NULL,
caption = gisco_attributions()
)
##############################
# Plot ports #
##############################
ports <- gisco_get_ports()
coast <- gisco_get_coastallines(year = 2013)
# To Equal Earth projection :)
library(sf)
coast <- st_transform(coast, 8857)
ports <- st_transform(ports, st_crs(coast))
ggplot(coast) +
geom_sf(fill = "#F6E1B9", color = "#0978AB") +
geom_sf(data = ports, fill = "red", shape = 21) +
theme_void() +
theme(
panel.background = element_rect(fill = "#C6ECFF"),
panel.grid = element_blank(),
plot.title = element_text(face = "bold", hjust = 0.5),
plot.subtitle = element_text(face = "italic", hjust = 0.5)
) +
labs(
title = "Ports Worldwide", subtitle = "Year 2013",
caption = "(c) European Union, 1995 - today"
)
# }
Run the code above in your browser using DataLab