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" : 15,
   "total" : 15,
   "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.7,
         "n" : 27,
         "standard_error" : null,
         "lower_ci_bound" : null,
         "upper_ci_bound" : null,
         "recommend_suppress" : null,
         "not_relevant" : null,
         "date_updated" : "2014-07-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.56,
         "n" : 27,
         "standard_error" : null,
         "lower_ci_bound" : null,
         "upper_ci_bound" : null,
         "recommend_suppress" : null,
         "not_relevant" : null,
         "date_updated" : "2014-07-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" : 967,
   "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.5,
         "n" : 8,
         "standard_error" : 0.38,
         "lower_ci_bound" : 3.76,
         "upper_ci_bound" : 5.24,
         "recommend_suppress" : "N",
         "not_relevant" : "N",
         "date_updated" : "2005-12-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.19,
         "lower_ci_bound" : 3.63,
         "upper_ci_bound" : 4.37,
         "recommend_suppress" : "N",
         "not_relevant" : "N",
         "date_updated" : "2016-07-01",
         "domain_source" : "Analyst"
      },
      ...
   ]
}

In this section