R/data_utils.R

Defines functions restrict_to_french_alps

Documented in restrict_to_french_alps

#' Restrict data to the french Alps
#'
#' @param x tibble
#'
#' @return tibble
#'
#' @export
restrict_to_french_alps <- function(x) {
  regions_sf <- dplyr::bind_rows(
    geojsonsf::geojson_sf("data-raw/paca.geojson"),
    geojsonsf::geojson_sf("data-raw/ara.geojson"))
  sf::st_filter(x, regions_sf, .predicate = sf::st_within)
}
vadmbertr/bonski.data documentation built on Dec. 23, 2021, 2:06 p.m.