Skip to content

Instantly share code, notes, and snippets.

@jlehtoma
Created June 29, 2015 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlehtoma/6d537150c2315edb5832 to your computer and use it in GitHub Desktop.
Save jlehtoma/6d537150c2315edb5832 to your computer and use it in GitHub Desktop.
Map Europe
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