library(tidyverse)
library(sf)
library(raster)
library(fasterize)
library(whitebox)
library(osmdata)
library(elevatr)
library(gifski)

Collecting Data:

basin = read_sf("https://labs.waterdata.usgs.gov/api/nldi/linked-data/nwissite/USGS-11119750/basin")
elev = elevatr::get_elev_raster(basin, z = 13) %>% 
  crop(basin) %>% 
  mask(basin)
## Warning in sp::proj4string(locations): CRS object has comment, which is lost in
## output

## Warning in sp::proj4string(locations): CRS object has comment, which is lost in
## output

## Warning in sp::proj4string(locations): CRS object has comment, which is lost in
## output
## Mosaicing & Projecting
## Note: Elevation units are in meters.
## Note: The coordinate reference system is:
##  +proj=longlat +datum=WGS84 +no_defs
elev = elev * 3.281