The function takes data frame generated by one of the functions that sourced data from statistics.gov.scot and returns pre-processed data set with the following changes.

pre_process_data(x, clean_URI_strings = TRUE, remove_cols = TRUE,
  clean_column_names = TRUE)

Arguments

x

A data frame, usually obtained via get_geography_data or other data sourcing function.

clean_URI_strings

Defaults to TRUE; removes initial part of URI ex. http://purl.org/linked-data/cube# from an URI string.

remove_cols

Removes redundant columns, such as columns with value URI only. Defaults to TRUE.

clean_column_names

Defaults to TRUE applies sensible name cleaning to provided columns. For instance, column unit_of_measure.value will become unit_of_measure.

Value

A data frame.

Examples

# NOT RUN {
pre_process_data(x = get_geography_data(data_set = "recorded-crime",
                                        geography = "Glasgow City",
                                        measure = "count"))
# }