Geovisualization Developer's Guide

Dataset Sample

The dataset sample response body is a JSON object returned by the Geovisualization REST API in response to a request for sample data from a dataset.

Table 1. Dataset Sample Response Elements
Element Data Type Description
columns Array A list of column names represented as strings. For example:
columns: [
              "lat",
              "lon",
              "avgtemp",
              "state"
]
dataset String The unique ID of the dataset
kind String Type of response: the value is datalens#dataset_sample when the request is successful
rows Array An array of lists. Each list represents one row of the data. The actual content depends on the dataset.
status String The status of the request

The code example below illustrates a typical response to a successful dataset sample request.

{
  "kind": "datalens#dataset_sample",
  "status": "OK",
  "rows": [
    [
      "country",
      "test",
      -29.69415,
      -52.39821
    ],
    [
      "Belgium",
      "One",
      50.84839,
      4.34969
    ],
    [
      "Germany",
      "Two",
      52.51607,
      13.37699
    ],
    [
      "France",
      "Three",
      48.85693,
      2.3412
    ]
  ],
  "columns": [
    "column_1",
    "column_2",
    "lat",
    "lon"
  ],
  "dataset": "87354ed28a66441385942f62e94282ea"
}