Compare occupational skills and knowledge in Python

Compare critical thinking and transportation knowledge for truck drivers, stockers and packers, using original ratings, quality flags and update months.

Compare requirements across logistics occupations

You are researching training needs for truck drivers, stockers and hand packers. Employment and wage data tell you about the jobs; this reference adds the skills and knowledge associated with each occupation. The example compares critical thinking and transportation knowledge, keeping their importance and required level separate.

The optional input.csv contains three genuine occupation-code selections. The same selections appear in the Python list below. The ratings are published O*NET® data; no inventory, workers or observations are invented.

occupation_ratings.csv is a genuine subset of the paid main table, containing every skill and knowledge rating for these three occupations: all 68 descriptors on both scales. soc_relationships.csv supplies their corresponding publisher-defined SOC relationships. Save both files in your working folder. The full $29 reference contains ratings for 910 occupations, definitions, scale anchors, occupation coverage and the full relationship table.

Code example

This standard-library code runs in a notebook, IPython or a Python script. It selects two descriptors for each occupation, screens the source flags, and prints importance, level and update month.

Paths are relative to your working folder; use from pathlib import Path; print(Path.cwd()) to check it, or supply full paths.

Python 3.10+ · Jupyter, IPython or a script
import csv
from pathlib import Path

# Genuine occupation selections, also supplied in input.csv on the guide page.
selections = [
    {"onet_soc_code": "53-3032.00"},  # Heavy and tractor-trailer truck drivers
    {"onet_soc_code": "53-7065.00"},  # Stockers and order fillers
    {"onet_soc_code": "53-7064.00"},  # Packers and packagers, hand
]
data_dir = Path(".")  # Folder containing the sample files or extracted paid CSVs.
selected_codes = {row["onet_soc_code"] for row in selections}
with (data_dir / "occupation_ratings.csv").open(newline="", encoding="utf-8") as stream:
    ratings = {
        (row["onet_soc_code"], row["element_id"], row["scale_id"]): row
        for row in csv.DictReader(stream)
        if row["onet_soc_code"] in selected_codes
    }
with (data_dir / "soc_relationships.csv").open(newline="", encoding="utf-8") as stream:
    relationships = {
        row["onet_soc_code"]: row for row in csv.DictReader(stream)
        if row["onet_soc_code"] in selected_codes
    }

results = []
for selection in selections:
    code = selection["onet_soc_code"]
    for element in ["2.A.2.a", "2.C.10"]:  # Critical Thinking and Transportation
        importance = ratings[(code, element, "IM")]
        level = ratings[(code, element, "LV")]
        # Use both quality flags; missing precision information is not an all-clear.
        status = "available" if all(
            row["comparison_status"] == "available" for row in [importance, level]
        ) else "review_source_flags"
        result = {
            "onet_soc_code": code,
            "soc_2018_code": relationships[code]["soc_2018_code"],
            "occupation_title": importance["occupation_title"],
            "element_name": importance["element_name"],
            "importance": importance["data_value"] if status == "available" else "",
            "level": level["data_value"] if status == "available" else "",
            "updated_month": importance["updated_month"],
            "comparison_status": status,
        }
        results.append(result)
        print(f'{code} | {result["element_name"]}: importance {result["importance"]}/5; '
              f'level {result["level"]}/7 | updated {result["updated_month"]} | {status}')

Set data_dir to the folder holding both CSVs. Replace selections with other O*NET-SOC codes from the full product, or read that column from your own CSV. Keep codes as text, including the decimal suffix. The two element values identify Critical Thinking and Transportation; descriptors.csv in the full download supplies their definitions.

Analysis of the output

53-3032.00 | Critical Thinking: importance 3.00/5; level 2.88/7 | updated 2022-08 | available
53-3032.00 | Transportation: importance 4.02/5; level 3.85/7 | updated 2022-08 | available
53-7065.00 | Critical Thinking: importance 2.75/5; level 2.25/7 | updated 2026-08 | available
53-7065.00 | Transportation: importance 2.14/5; level 1.92/7 | updated 2026-08 | available
53-7064.00 | Critical Thinking: importance 2.75/5; level 2.00/7 | updated 2020-08 | available
53-7064.00 | Transportation: importance 2.36/5; level 1.65/7 | updated 2020-08 | available

Transportation knowledge has an importance rating of 4.02 for heavy truck drivers, compared with 2.14 for stockers and 2.36 for hand packers. That supports using transportation knowledge as a subject to investigate when planning training for truck-driving roles. It does not establish the competence of a particular worker or prescribe a hiring threshold.

The level rating answers a different question: the complexity of knowledge required. Truck drivers have a transportation level of 3.85 on the 0–7 scale. This is not interchangeable with the importance score on the 1–5 scale. The full file supplies descriptor-specific examples for interpreting level values; the same number does not necessarily mean the same complexity across unrelated descriptors.

Critical-thinking importance is 3.00 for truck drivers and 2.75 for the other two occupations. These are descriptive comparisons, not tests of statistically significant differences. The source includes confidence information where available. The three occupations also have different update months—2022-08, 2026-08 and 2020-08—within the same database edition.

Quality flags and occupation relationships

All six selected comparisons pass the example's screen. Elsewhere in the file, a low-precision flag, a non-relevant level rating or missing precision information can require review. The code preserves those rows and prints a review status rather than presenting the flagged score as an ordinary comparison. The original flags, sample sizes, standard errors and confidence bounds remain in the CSV.

The SOC relationship for each selected occupation is one-to-one within the publisher's taxonomy. That is not true across the whole reference: 76 SOC codes have multiple O*NET titles. Use the relationship table before connecting a wage or outlook dataset, and retain all matches. Do not silently average skill ratings or repeat a SOC employment total across several titles and then add it up. BLS also publishes some special combined occupation codes that need a separate directory review.

Using the full dataset

Extract the purchased ZIP and point data_dir to its CSVs. The main key is onet_soc_code + element_id + scale_id. It contains 123,760 ratings for 910 occupations across 10 essential skills, 25 transferable skills and 33 knowledge areas. There are seven CSV tables, field dictionaries, source and preparation identities, checksums and this example.

occupations.csv lists all 1,016 database titles and descriptions, explicitly identifying the 106 without ratings in these selected domains. descriptors.csv, scales.csv and level_anchors.csv explain the measured concepts. soc_relationships.csv retains the official links to SOC 2018, and source_record_status.csv accounts for each selected source data record. Missing ratings are not zero requirements.

For a broader occupational comparison, use the pay, outlook and skills selection page. Those products are separate purchases with different source periods and populations. This reference does not include wages, job postings, forecasts, candidate assessments or local skill estimates.

Sources and versions

This product includes information from the O*NET 31.0 Database and O*NET-SOC Taxonomy by the U.S. Department of Labor, Employment and Training Administration (USDOL/ETA), used under the CC BY 4.0 license. O*NET® is a trademark of USDOL/ETA. ACD has modified some of this information; USDOL/ETA has not approved, endorsed, or tested these modifications.

O*NET 31.0 was released in August 2026. ACD retained the files on November 1, 2026 UTC. Individual rating update months range from December 2005 to August 2026; they are neither fieldwork dates nor a historical series. ACD combines the three rating domains, documents flags, normalizes month formatting and adds coverage and relationship checks without altering the original scores. See the preparation record and the download's LICENSE_AND_CHANGES.md.

Original source downloads are free. The $29 purchase covers ACD's preparation, documentation and delivery of this fixed edition, with processing improvements and documented publisher error corrections included. New source editions may be sold separately; CC BY 4.0 reuse rights remain intact.

Example checked November 1, 2026 against both these samples and the complete purchased files. Source and processing records, sample checksums · Expected result CSV. Independent preparation; no agency endorsement.