sal_get_dataset: Import a dataset as a 'tibble' or 'sf' 'tibble'.

Description Usage Arguments Value Author(s) References Examples

View source: R/dataset.R

Description

Import a dataset as a tibble or sf tibble.

Usage

1
2
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.

Author(s)

Brendan Knapp brendan.g.knapp@gmail.com

References

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

Examples

1
2
3
4
5
6
7
8
9
library(salinasr)
library(ggplot2)

bikeways_sf <- sal_get_metadata("bikeways") %>% 
  sal_get_dataset()

bikeways_sf %>% 
  ggplot() +
  geom_sf()

knapply/salinasr documentation built on May 27, 2019, 2:09 p.m.