Skip navigation

Reference Manual

Filter and sort examples

As documented in the Data rows service, multiple filter and sort parameters may be used to refine the data results from a table. This section combines these parameters for specific use cases. After each example, you may click the “Interactive demo” link to edit and customize the query yourself.

For more information about the content domains and rating scales available in the O*NET Database, see the O*NET Data Dictionary.

Example 1: Most important knowledge areas for architects

  • knowledge data table
  • filter=onetsoc_code.eq.17-1011.00 — to limit results to the occupation “Architects, Except Landscape and Naval”
  • filter=scale_id.eq.IM — to examine Importance ratings specifically
  • filter=data_value.gte.3 — to return Content Model descriptors scoring 50% or higher on the 1-to-5 Importance scale
  • sort=data_value.descending — to return the highest-rated descriptors first
  • sort=element_name — in case of tied ratings, return descriptors in alphabetical order
JSON XML
{
   "info" : "https://services.onetcenter.org/ws/database/info/knowledge",
   "start" : 1,
   "end" : 18,
   "total" : 18,
   "table_id" : "knowledge",
   "filter" : [
      "onetsoc_code.eq.17-1011.00",
      "scale_id.eq.IM",
      "data_value.gte.3"
   ],
   "sort" : [
      "data_value.descending",
      "element_name.ascending"
   ],
   "row" : [
      {
         "onetsoc_code" : "17-1011.00",
         "title" : "Architects, Except Landscape and Naval",
         "element_id" : "2.C.3.c",
         "element_name" : "Design",
         "scale_id" : "IM",
         "scale_name" : "Importance",
         "data_value" : 4.9,
         "n" : 20,
         "standard_error" : null,
         "lower_ci_bound" : null,
         "upper_ci_bound" : null,
         "recommend_suppress" : null,
         "not_relevant" : null,
         "date_updated" : "2021-08-01",
         "domain_source" : "Occupational Expert"
      },
      {
         "onetsoc_code" : "17-1011.00",
         "title" : "Architects, Except Landscape and Naval",
         "element_id" : "2.C.3.d",
         "element_name" : "Building and Construction",
         "scale_id" : "IM",
         "scale_name" : "Importance",
         "data_value" : 4.81,
         "n" : 21,
         "standard_error" : null,
         "lower_ci_bound" : null,
         "upper_ci_bound" : null,
         "recommend_suppress" : null,
         "not_relevant" : null,
         "date_updated" : "2021-08-01",
         "domain_source" : "Occupational Expert"
      },
      ...
   ]
}

Example 2: Occupations requiring the most physical stamina

  • abilities data table
  • filter=element_id.eq.1.A.3.b.1 — to limit results to the “Stamina” Content Model descriptor
  • filter=scale_id.eq.LV — to examine Level ratings specifically
  • sort=data_value.descending — to return the highest-rated occupations first
  • start=1&end=5 — to return the top five occupations
JSON XML
{
   "info" : "https://services.onetcenter.org/ws/database/info/abilities",
   "start" : 1,
   "end" : 5,
   "total" : 873,
   "link" : [
      {
         "href" : "https://services.onetcenter.org/ws/database/rows/abilities?filter=element_id.eq.1.A.3.b.1&filter=scale_id.eq.LV&sort=data_value.descending&start=6&end=10",
         "rel" : "next"
      }
   ],
   "table_id" : "abilities",
   "filter" : [
      "element_id.eq.1.A.3.b.1",
      "scale_id.eq.LV"
   ],
   "sort" : [
      "data_value.descending"
   ],
   "row" : [
      {
         "onetsoc_code" : "27-2031.00",
         "title" : "Dancers",
         "element_id" : "1.A.3.b.1",
         "element_name" : "Stamina",
         "scale_id" : "LV",
         "scale_name" : "Level",
         "data_value" : 4.62,
         "n" : 8,
         "standard_error" : 0.183,
         "lower_ci_bound" : 4.2664,
         "upper_ci_bound" : 4.9836,
         "recommend_suppress" : "N",
         "not_relevant" : "N",
         "date_updated" : "2019-08-01",
         "domain_source" : "Analyst"
      },
      {
         "onetsoc_code" : "27-2021.00",
         "title" : "Athletes and Sports Competitors",
         "element_id" : "1.A.3.b.1",
         "element_name" : "Stamina",
         "scale_id" : "LV",
         "scale_name" : "Level",
         "data_value" : 4,
         "n" : 8,
         "standard_error" : 0.189,
         "lower_ci_bound" : 3.6296,
         "upper_ci_bound" : 4.3704,
         "recommend_suppress" : "N",
         "not_relevant" : "N",
         "date_updated" : "2016-07-01",
         "domain_source" : "Analyst"
      },
      ...
   ]
}

In this section