nz_height
and nz
are present in spData
package.
nz_height
- sf class dataset - Top 101 highest points in New Zealand.nz
- sf class data - Polygons representing the 16 regions of New Zealand.
Below is the plot for visualization using tmap()
Can you please help me create
- nz_raster (raster class) with cell size = 100km by 100km and each cell contains number of peaks in it
- plot nz_raster.
# load packages
library(tidyverse)
library(sf)
library(raster)
library(spData)
library(tmap)
# vector plot of peaks
tm_shape(nz) +
tm_polygons(col = "white") +
tm_shape(nz_height) +
tm_symbols(col = "red") +
tm_scale_bar()