Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The tabulate method in Rich Data Services is available for users to create tabulations and aggregations of their data.

Supported Functions

The tabulate method supports the following functions for the measures.

ABSAVGCOUNTMAXMINSQRTSTDDEV_POPSUMVAR_POP

Step By Step

  • To create a tabulation we will need to specify our dimensions (the topics of interest) and measures (quantities being counted). The most basic tabulation would just be a count the values for a dimension.

    Code Block
    titleBasic Tabulation
    http://localhost:8080/rds/catalog/test/view/tabulate?dims=var
    Code Block
    titleTabulation Output
     {
        "records": [
            [
                1,
                182
            ],
            [
                2,
                354
            ],
            [
                3,
                126
            ]
        ],
        "info": {
            "colCount": 2,
            "format": "MTNA",
            "includeMetadata": false,
            "limit": 20,
            "offset": 0,
            "moreRows": false
        }
    }
  • To add a measure, fill out the measure parameter with a computed variable.

    Code Block
    titleBasic Tabulation
    http://localhost:8080/rds/catalog/test/view/tabulate?dims=var&measure=average:AVG(var2)
    Code Block
    titleAverage Output
    {
        "records": [
            [
                1,
                3.1154
            ],
            [
                2,
                3.0932
            ],
            [
                3,
                2.9365
            ]
        ],
        "info": {
            "colCount": 2,
            "format": "MTNA",
            "includeMetadata": false,
            "limit": 20,
            "offset": 0,
            "moreRows": false
        }
    }