Obtain a URL pointing to a specific dataset in the desired file type.

sal_get_export_link(x, type = c("json", "csv", "geojson", "xls", "shp",
  "ov2"))

# S3 method for character
sal_get_export_link(dataset_id, type = c("json",
  "csv", "geojson", "xls", "shp", "ov2"))

# S3 method for metadata
sal_get_export_link(x, type = c("json", "csv",
  "geojson", "xls", "shp", "ov2"))

Methods (by class)

  • character: Method to obtain a an export link from a character representing a dataset_id.

  • metadata: Method to obtain a an export link from a metadata object.

Examples

library(salinasr) meta <- sal_get_metadata("bikeways") meta %>% sal_get_export_link()
#> [1] "https://cityofsalinas.opendatasoft.com/api/v2/catalog/datasets/bikeways/exports/json"