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")
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
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())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.