Define requests against the /table endpoint by providing
URIs to databases, measures and fields.
The URIs can be obtained using sc_schema_db()
.
See the Custom tables article
for more details.
Arguments
- db
The uid of a database
- measures
A character vector of uids for measures. Can be either of type
MEASURE
or of typeSTAT_FUNCTION
- dimensions
A character vector of dimensions for the cube. Can be either of type
FIELD
or typeVALUESET
. Those entries are referred to asfields
in the parsed API response
Examples
sc_table_custom("str:database:detouextregsai")
#> Accomodation statistics as of 1974 according to seasons
#>
#> Database: detouextregsai (STATcube)
#> Measures: Nights spent
#> Fields: Season/Tourism Month <2>
#>
#> Request: [2022-09-02 12:21:00]
#> STATcubeR: 0.5.0
sc_table_custom(
"str:database:detouextregsai",
dimensions = "str:field:detouextregsai:F-DATA1:C-SDB_TIT-0"
)
#> Accomodation statistics as of 1974 according to seasons
#>
#> Database: detouextregsai (STATcube)
#> Measures: Nights spent
#> Fields: Season/Tourism Month <47>
#>
#> Request: [2022-09-19 14:40:09]
#> STATcubeR: 0.5.0
sc_table_custom(
db = "str:database:detouextregsai",
measures = c(
"str:statfn:detouextregsai:F-DATA1:F-ANK:SUM",
"str:measure:detouextregsai:F-DATA1:F-UEB"
),
dimensions = c(
"str:field:detouextregsai:F-DATA1:C-SDB_TIT-0",
"str:valueset:detouextregsai:F-DATA1:C-C93-2:C-C93SUM-0"
)
)
#> Accomodation statistics as of 1974 according to seasons
#>
#> Database: detouextregsai (STATcube)
#> Measures: Arrivals, Nights spent
#> Fields: Season/Tourism Month <47>, Country of origin <4>
#>
#> Request: [2022-08-29 09:52:13]
#> STATcubeR: 0.5.0