Created
June 29, 2015 13:42
-
-
Save jlehtoma/6d537150c2315edb5832 to your computer and use it in GitHub Desktop.
Map Europe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages(c("maptools", "rworldmap", "rworldxtra")) | |
# Load required packages | |
library(maptools) | |
library(rworldmap) | |
# Define LAEA projection for Europe | |
crs.laea <- CRS("+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs") # Lambert Azimuthal Equal Area | |
# Grab the whole world, NOTE that you will also need package rworldextra | |
world.wgs84 <- getMap(resolution = "high") | |
world.laea <- spTransform(world.wgs84, crs.laea) | |
world.laea@data$border <- "darkgrey" | |
world.laea@data[which(world.laea@data$ne_10m_adm == "FIN"),]$border = "black" | |
plot(world.laea, xlim = c(3000000, 5700000), ylim = c(2100000, 5350000), | |
border = world.laea@data$border, axes = TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment