Dimensions

You can add Dimensions to your data items by adding key-value attributes.

In the example below, we’ve split the metric based on the Dimension ‘Channel’

  • cURL
  • PHP
  • JavaScript
  • Java
  • Go
  • Python
  • C#

curl https://push.databox.com/data \
-u <your_token>: \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.databox.v2+json' \
-d '[
      {
        "key": "sales",
        "value": 8300,
        "attributes": [{"key": "channel", "value": "online"}]
      },
      {
        "key:": "sales",
        "value": 4000,
        "attributes": [{"key": "channel", "value": "retail"}]
      },
      {
        "key" : "sales"
        "value": 1230,
        "attributes": [{"key": "channel", "value": "in-person"}]
      },
     {
        "key": "costs", 
        "value": 4567,
        "attributes": [{"key": "channel", "value": "in-person"}]
     }
  ]'

In Databox, you can filter and visualize your data for specific dimensions. That means you could view only retail sales, or compare sales across different channels. You can add as many dimensions as you’d like to each metric.

Next step: Units