Skip to contents

statswales_get_dataset returns a dataframe from StatsWales using a dataset id.

Usage

statswales_get_dataset(id)

Arguments

id

A dataset id. Must be a single string.

Value

If the dataset id is valid, the function will return the requested dataset in a dataframe. If the id is not valid, the function will return NULL.

Examples

data <- statswales_get_dataset("LGFS0021")
#> Rows: 9617 Columns: 20
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (11): Row_ItemName_ENG_STR, Row_ItemName_WEL_STR, Row_ItemNotes_ENG_STR,...
#> dbl  (9): Data_DEC, Row_Code_DEC, Row_SortOrder_DEC, Row_Hierarchy_DEC, Auth...
#> 
#>  Use `spec()` to retrieve the full column specification for this data.
#>  Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> Dataset extracted successfully with 9617 rows and 20 columns.