knitr::opts_chunk$set(
  comment = "#>", echo=T, warning=F, message=F,
  fig.width=9, fig.height=6
)
library(dplyr); library(ggplot2); library(sf)
# Load shapefile of Europe
data("europe", package="edc")

General information

Data Analysis

Here, I perform a first analysis of the SRTM elevation Data for Europe.

The elevation data for Europe (srtm_csi_eur_900m.rda, srtm_csi_eur_p11deg.rda, srtm_csi_eur_p44deg.rda), which I use here, can be downloaded from https://github.com/RS-eco/edc/blob/main/data/.

The code for how the elevation data was created can be found here: https://github.com/RS-eco/edc/blob/main/data-raw/srtm_eur.R

Elevation of Europe

data("srtm_csi_eur_p11deg", package="edc")

# Plot individual variable from long format
srtm_csi_eur_p11deg %>% ggplot() + 
  geom_tile(aes (x=x, y=y, fill=alt_mean)) +
  geom_sf(data=europe, fill="NA") + 
  scale_fill_gradientn(name="Elevation (m)", colors=terrain.colors(255)) + 
  coord_sf(expand=F) + theme_bw() + labs(x="", y="")
rm(srtm_csi_eur_p11deg); invisible(gc())
data("srtm_csi_eur_p44deg", package="edc")

# Plot individual variable from long format
srtm_csi_eur_p44deg %>% ggplot() + 
  geom_tile(aes (x=x, y=y, fill=alt_mean)) +
  geom_sf(data=europe, fill="NA") + 
  scale_fill_gradientn(name="Elevation (m)", colors=terrain.colors(255)) + 
  coord_sf(expand=F) + theme_bw() + labs(x="", y="")
rm(srtm_csi_eur_p44deg); invisible(gc())


RS-eco/edc documentation built on Jan. 29, 2023, 5:26 a.m.