Visualizing Innovation

Maps

Dr. Matthias Schnetzer

December 4, 2023

Projections

Choose a map projection! For instance, {giscoR} by Eurostat provides maps in the following three projections. Check coordinates for axis limits at https://epsg.io.

The {sf} package

The sf (simple features) package deals with spatial geometries. These features have a geometry describing where on Earth the feature is located, and they have attributes, which describe other properties.

Plot a map

library(giscoR)
europe <- gisco_get_countries(region = "Europe", resolution = "10", epsg = 3035)
europe |> select(CNTR_ID, NAME_ENGL, geometry) |> slice_head(n = 3)
europe |> ggplot() + 
  geom_sf(fill = "midnightblue", linewidth = .1, color = "white") + 
  coord_sf(xlim = c(2377294, 7453440), ylim = c(1313597, 5628510), expand = F)
Simple feature collection with 3 features and 2 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 3616945 ymin: 1898784 xmax: 5257241 ymax: 2890133
Projected CRS: ETRS89-extended / LAEA Europe
  CNTR_ID NAME_ENGL                       geometry
1      AD   Andorra POLYGON ((3640254 2192873, ...
2      AL   Albania POLYGON ((5148385 2216599, ...
3      AT   Austria POLYGON ((4832035 2857837, ...