Import a dataset as a tibble or sf tibble.

sal_get_dataset(metadata, prioritize_cache = TRUE,
  cache_dir = "~/salinasr-cache", ...)

Arguments

metadata

A metadata object as obtained by sal_get_metadata().

prioritize_cache

logical, whether to prioritize cached data and avoid unnecessary API calls.
Default: TRUE

cache_dir

character, path to the directory in which data is cached.
Defailt: "~/salinasr-cache"

...

Additional arguments to be passed to or from methods.

Value

tibble::tibble, which will also be an sf::st_sf object if metadata refers to data marked as having "geo" features.

References

https://cityofsalinas.opendatasoft.com/explore/

Examples

library(salinasr) library(ggplot2) bikeways_sf <- sal_get_metadata("bikeways") %>% sal_get_dataset() bikeways_sf %>% ggplot() + geom_sf()