library(magrittr)
# install.packages('FedData') load("~/Rpackages/scsf/data/boundary.rda")
## retrieve the Watershed Boundary Dataset wbd0 <-FedData::get_wbd(template = boundary, label='sc')
wbd0 %>% ggplot2::ggplot() + ggplot2::geom_sf()
wbd1 <- wbd0 %>% sf::st_transform(sf::st_crs(boundary)) %>% sf::st_filter(boundary)
wbd1 %>% ggplot2::ggplot() + ggplot2::geom_sf()
wbd <- wbd1 usethis::use_data(wbd, overwrite=T)
load("~/Rpackages/scsf/data/wbd.rda") huc10 <- wbd %>% dplyr::mutate(huc10 = stringr::str_sub(huc12, 1, 10)) %>% dplyr::select(huc10, areaacres) %>% dplyr::group_by(huc10) %>% dplyr::summarise(areaacres=sum(areaacres))
huc10 %>% ggplot2::ggplot() + ggplot2::geom_sf()
usethis::use_data(huc10, overwrite=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.