View source: R/statswales_get_pivot.R
| statswales_get_pivot | R Documentation |
Returns a cross-tabulated view of dataset data. Choose one dimension for
the columns (x) and one for the rows (y). The API stores the pivot
configuration as a reusable query.
statswales_get_pivot(
dataset_id,
x,
y,
lang = "en-gb",
page_number = 1,
page_size = 100,
filter = NULL,
options = list(use_raw_column_names = FALSE, use_reference_values = FALSE,
data_value_type = "formatted"),
sort_by = NULL
)
dataset_id |
A dataset UUID string. Use |
x |
Column name for the horizontal axis (column headers). |
y |
Column name for the vertical axis (row labels). |
lang |
Language for returned text. One of |
page_number |
Page number to return. Default |
page_size |
Rows per page. Default |
filter |
Filter criteria in the same format as |
options |
Display options in the same format as |
sort_by |
Optional sort order, in the same format as
|
A list containing the paginated pivot view returned by the API, or
NULL if the request fails.
## Not run:
datasets <- statswales_list_datasets()
id <- datasets$id[1]
filters <- statswales_get_filters(id)
pivot <- statswales_get_pivot(
id,
x = filters[[1]]$columnName,
y = filters[[2]]$columnName
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.