Rendered version here
ne_countries() dataset, imported above?A:
library(rnaturalearth)
library(sf)
## Linking to GEOS 3.12.2, GDAL 3.11.4, PROJ 9.4.1; sf_use_s2() is TRUE
ne_countries() |> st_crs()
## Coordinate Reference System:
## User input: WGS 84
## wkt:
## GEOGCRS["WGS 84",
## DATUM["World Geodetic System 1984",
## ELLIPSOID["WGS 84",6378137,298.257223563,
## LENGTHUNIT["metre",1]]],
## PRIMEM["Greenwich",0,
## ANGLEUNIT["degree",0.0174532925199433]],
## CS[ellipsoidal,2],
## AXIS["latitude",north,
## ORDER[1],
## ANGLEUNIT["degree",0.0174532925199433]],
## AXIS["longitude",east,
## ORDER[2],
## ANGLEUNIT["degree",0.0174532925199433]],
## ID["EPSG",4326]]
This means: a geographic coordinate system (axis units are degrees), and referenced to the WGS84 ellipsoid.
2/3. Look up the “Equidistant Cylindrical (Plate Carrée)” projection on the https://proj.org website. Why is this projection called The simplest of all projections?
A: it is the simplest because latitude and longitude are essentially taken as y and x, possibly after a linear transform.
plate_carree = st_crs("+proj=eqc")
ne_countries() |> st_transform(plate_carree) -> ne.pc
plot(ne.pc["sovereignt"], axes = TRUE)
eck4 = st_crs("+proj=eck4")
ne_countries() |> st_transform(eck4) -> ne.e4
plot(ne.e4["sovereignt"], axes = TRUE)
ortho = st_crs("+proj=ortho")
ne_countries() |> st_transform(ortho) -> ne.or
plot(ne.or["sovereignt"], axes = TRUE)
What went wrong? Some countries are missing, in particular those which appear only partially in this projection. See here for an example where this problem has been addressed. R is not a GIS!