Skip to content

Querying Tabular Data

Querying tabular data happens in the /list endpoint of the tabular data controller.

This endpoint can be more easily accessed with our python SDK.

Example 1: Here, we are asking for data where the county is Hordaland and from the Year 2019, assuming we have a column called county which contains strings, and a column called Year which contains integers.

json
{
    "#AND": [
      {
        "#EQUALS": [
          "$County",
          "Hordaland"
        ]
      },
      {
        "#GREATER_THAN": [
          "$Year",
          2019
        ]
      }
    ]
}

Example 2: We can also query data based on the location of the data points. For example, we can query data points that are within a certain polygon.

json
{
    "#ST_WITHIN": [
          "$Location",
          "POLYGON((4.0 59.0, 5.0 59.0, 5.0 60.0, 4.0 60.0, 4.0 59.0))"
    ]
}
Coordinates can be filtered using two formats: Well-Known Text (WKT) or GeoJSON Format.

Check out our reference for more information on how to use query with OQS here.