The function fetches statistical data for a selected geography framework from: statistics.gov.scot for a selected period for a chosen indicator.
get_geography_data(data_set, geography, period, measure = "count", pre_process_results = FALSE, ...)
data_set | Required. A character scalar with the name of indicator to be sourced from the statistics.gov.scot. |
---|---|
geography | Required. A character vector corresponding to geographies for which to derive the data or URI corresponding to a specific geography. |
period | Optional. A character vector corresponding to period(s)
for which the data should be sourced. This has to correspond to the
available periods. For instance |
measure | Required. A character scalar pertaining to measure to be sources, usually count or ratio. Defaults to count. |
pre_process_results | A logical, defaults to |
... | Options passed to |
A data frame.
The following function attempts to source all data available for
specific geographies for the provided period periods. Colloquial
geography names are matched with URI values in
Standard Geography Code Register. A well known locality name like
Edinburgh may match multiple URIs. Have a look at
available_data_sets
documentations to
explore data available in the package and
get_available_datasets
function to get most
recent list.
# NOT RUN { get_geography_data(data_set = "alcohol-related-discharge", geography = "East Lothian") # }