Describe a dataset's variables.

sal_describe_dataset(x)

# S3 method for tbl_df
sal_describe_dataset(x)

# S3 method for character
sal_describe_dataset(x)

# S3 method for metadata
sal_describe_dataset(x)

Arguments

x

A character describing a dataset_id, a tibble as obtained by sal_get_dataset() or a metadata object as obtained by sal_get_metadata().

Value

tibble::tibble with columns:

name

names of variables

label

(hopefully) helpful clarification of variables' names

type

original data type of variables

Methods (by class)

  • tbl_df: Method to obtain description from a tibble::tibble

  • character: Method to obtain description from a character.

  • metadata: Method to obtain description from a metadata object obtained by sal_get_metadata().

Examples

library(salinasr) sal_get_metadata("bikeways") %>% sal_get_dataset() %>% sal_describe_dataset()
#> $title #> [1] "Bikeways" #> #> $dataset_id #> [1] "bikeways" #> #> $data_processed #> [1] "2018-08-05T09:02:20+00:00" #> #> $geospatial #> [1] TRUE #> #> $variables #> # A tibble: 11 x 3 #> name label type #> <chr> <chr> <chr> #> 1 objectid OBJECTID int #> 2 name Bike path Name text #> 3 class Class text #> 4 start Starting Street text #> 5 end Ending Street text #> 6 feet Length (ft) double #> 7 miles Length (miles) double #> 8 juris Jurisdiction text #> 9 shape_length Shape_Length double #> 10 geo_shape geo_shape geo_shape #> 11 geo_point_2d geo_point_2d geo_point_2d #>