R/polygons_as_sf.R

Defines functions polygons_as_sf

Documented in polygons_as_sf

#' Download Geo JSON polygons and return as single simple features (sf)
#' dataframe
#'
#' @param x Character vector of URLs to GeoJSON polygons.
#'
#' @return sf (simple features) geographically aware dataframe.
#' @export
#'
#' @examples
polygons_as_sf <- function(x){
  x <- lapply(x, sf::st_read, quiet = TRUE)
  dplyr::bind_rows(x)
}
DavidASmith/eaflood documentation built on April 5, 2022, 4:29 a.m.