Learn R Programming

tidyterra (version 0.7.0)

volcano2: Updated topographic information on Auckland's Maungawhau volcano

Description

Probably you already know the volcano dataset. This dataset provides updated information of Maungawhau (Mt. Eden) from Toitu Te Whenua Land Information New Zealand, the Government's agency that provides free online access to New Zealand’s most up-to-date land and seabed data.

Arguments

Format

A matrix of 174 rows and 122 columns. Each value is the corresponding altitude in meters.

See Also

volcano

Other datasets: cross_blended_hypsometric_tints_db, grass_db, hypsometric_tints_db, princess_db

Examples

Run this code

data("volcano2")
filled.contour(volcano2, color.palette = hypso.colors, asp = 1)
title(main = "volcano2 data: filled contour map")

# Geo-tag
# Empty raster

volcano2_raster <- terra::rast(volcano2)
terra::crs(volcano2_raster) <- pull_crs(2193)
terra::ext(volcano2_raster) <- c(1756968, 1757576, 5917000, 5917872)
names(volcano2_raster) <- "volcano2"

library(ggplot2)

ggplot() +
  geom_spatraster(data = volcano2_raster) +
  scale_fill_hypso_c() +
  labs(
    title = "volcano2 SpatRaster",
    subtitle = "Georeferenced",
    fill = "Elevation (m)"
  )

Run the code above in your browser using DataLab