#' Reads geojson stations file, restricts to french Alps and writes .rda file
#'
#' @return
use_nivo_stations <- function() {
nivo_stations <- geojsonsf::geojson_sf(
"https://donneespubliques.meteofrance.fr/donnees_libres/Txt/Nivo/postesNivo.json")
nivo_stations <- nivo_stations[, c("ID", "Nom", "Altitude", "geometry")] %>%
dplyr::rename(station = ID,
nom = Nom,
altitude = Altitude) %>%
dplyr::mutate(station = readr::parse_integer(station),
altitude = readr::parse_integer(altitude)) %>%
restrict_to_french_alps()
usethis::use_data(nivo_stations, overwrite = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.