|
library("ggplot2") |
|
theme_set(theme_bw()) |
|
library("sf") |
|
library(tmap) |
|
library("rnaturalearth") |
|
library("rnaturalearthdata") |
|
world <- ne_countries(scale = "medium", returnclass = "sf") |
|
class(world) |
|
|
|
ggplot(data = world) + |
|
geom_sf() + |
|
coord_sf(xlim = c(-15, 35), ylim = c(35, 72), expand = FALSE)+ |
|
#al 19.80 41.28 |
|
annotate("point", x = 19.80, y =41.28, colour = "red", size = 1.1)+ |
|
#AT 4717 2777 15.30 47.97 |
|
annotate("point", x = 15.30, y =47.97, colour = "red", size = 1.1)+ |
|
#BE 3927 3099 4.39 |
|
annotate("point", x = 4.39, y =50.86, colour = "red", size = 1.1)+ |
|
#BG 5537 2285 24.87 42.58 |
|
annotate("point", x = 24.87, y =42.58, colour = "red", size = 1.1)+ |
|
#CH 4174 2673 |
|
annotate("point", x = 8.06, y =47.15, colour = "red", size = 1.1)+ |
|
#CZ 4698 2997 |
|
annotate("point", x = 15.25, y =49.96, colour = "red", size = 1.1)+ |
|
#DE 4274 3103 |
|
annotate("point", x = 9.329, y =51.036, colour = "red", size = 1.1)+ |
|
#DK 4349 3625 |
|
annotate("point", x = 10.445, y =55.728, colour = "red", size = 1.1)+ |
|
#EE 5166 4117 |
|
annotate("point", x = 24.949, y =59.349, colour = "red", size = 1.1)+ |
|
#EL 5513 1773 |
|
annotate("point", x = 23.569, y =38.082, colour = "red", size = 1.1)+ |
|
#ES 3169 2025 |
|
annotate("point", x = -3.583, y =40.389, colour = "red", size = 1.1)+ |
|
#FI 5128 4313 |
|
annotate("point", x = 25.064, y =61.139, colour = "red", size = 1.1)+ |
|
#FR 3765 2775 |
|
annotate("point", x = 2.562, y =47.836, colour = "red", size = 1.1)+ |
|
#HR 4803 2515 |
|
annotate("point", x = 16.173, y =45.567, colour = "red", size = 1.1)+ |
|
#HU 5007 2747 |
|
annotate("point", x = 19.117, y =47.455, colour = "red", size = 1.1)+ |
|
#ireland x=-7.063484&y=53.208182 |
|
annotate("point", x = -7.063, y =53.208, colour = "red", size = 1.1)+ |
|
#IT 4493 2288 |
|
annotate("point", x = 12.128, y =43.679, colour = "red", size = 1.1)+ |
|
#LI 4284 2672 |
|
annotate("point", x = 9.512, y =47.16, colour = "red", size = .6)+ |
|
|
|
# LT 5210 3632 |
|
annotate("point", x = 23.993, y =55.013, colour = "red", size = 1.1)+ |
|
#LV 5178 3843 |
|
annotate("point", x = 24.166, y =56.923, colour = "red", size = 1.1)+ |
|
#MT 4728 1437 |
|
annotate("point", x = 14.467, y =35.886, colour = "red", size = .6)+ |
|
#NL 3991 3230 |
|
annotate("point", x = 5.182, y =52.081, colour = "red", size = 1.1)+ |
|
# NO 4343 4094 |
|
annotate("point", x = 10.392, y =59.946, colour = "red", size = 1.1)+ |
|
#PL 4968 3213 |
|
annotate("point", x = 19.378, y =51.652, colour = "red", size = 1.1)+ |
|
#PT 2755 2066 |
|
annotate("point", x = -8.436, y =39.964, colour = "red", size = 1.1)+ |
|
#RO 5531 2616 |
|
annotate("point", x = 25.591, y =45.510, colour = "red", size = 1.1)+ |
|
#SE 4640 4013 |
|
annotate("point", x = 15.562, y =59.105, colour = "red", size = 1.1)+ |
|
#SI 4694 2571 |
|
annotate("point", x = 14.825, y =46.143, colour = "red", size = 1.1)+ |
|
#SK 4965 2889 |
|
annotate("point", x = 18.781, y =48.768, colour = "red", size = 1.1)+ |
|
#UK 3555 3319 |
|
annotate("point", x = -1.317, y =52.442, colour = "red", size = 1.1)+ |
|
#XK* 5214 2224 kosovo |
|
annotate("point", x = 20.878, y =42.539, colour = "red", size = 1.1)+ |
|
#all countries 4224000 2891 |
|
annotate("point", x = 8.671, y =49.124, colour = "blue", size = 1.3)+ |
|
ggtitle("Center of Population of European Countries", |
|
subtitle = "Half population is North and half East")+ |
|
theme( |
|
axis.title.x = element_blank(),plot.title = element_text(hjust = 0.5),plot.subtitle = element_text(hjust = 0.5), |
|
axis.title.y = element_blank(), axis.text.x = element_blank(), |
|
axis.text.y = element_blank(),axis.ticks = element_blank()) |
|
|
|
ggsave("europe.png", width = 15, height = 20, units = "cm") |
|
|