Computes task-set and rating content-change metrics for each occupation
between O*NET releases. This is the single source of content metrics for
longitudinal work, so robustness measures cannot silently diverge. It is
seam-aware: comparisons that cross the v25.1 SOC-2010 to SOC-2018 change are
flagged by default so taxonomy churn is not counted as content churn. v21.0
is not a package-verified default seam; supply a custom seams row for a
channel-specific v21.0 comparison.
Usage
onet_content_change(
panel,
scale = "IM",
item = "task_id",
min_importance = NULL,
from = NULL,
to = NULL,
seams = NULL
)Arguments
- panel
A tibble from
onet_panel()(a Task Ratings panel) or the same schema. Must containonet_soc_code,release_version,release_date,soc_vintage,data_value, and theitemkey column.scale_idis required whenscaleis notNULL.- scale
Optional scale id used for the rating metrics and item membership, for example
"IM"for Importance. UseNULLto keep every scale.- item
Column that identifies the content item within an occupation. Defaults to
"task_id". Item membership drives the set metrics.- min_importance
Optional numeric floor applied to
data_valueon the selectedscale. Items below the floor, or with missingdata_value, are dropped before set membership is computed. Use it to apply an Importance floor for any channel-specific artifact a caller has external evidence for, for example near a specific release boundary.- from, to
Optional release versions selecting a single comparison. When both are supplied only that pair is returned; otherwise every adjacent release pair is compared in release-date order.
- seams
Optional data frame with
seam_typeandseam_datecolumns that overrides the default seam table returned byonet_known_seams(), which currently contains only the verified v25.1 SOC-2010 to SOC-2018 taxonomy seam. Use it to supply channel-specific or source-specific seam dates, such as a v21.0 row, when a caller has external evidence that a comparison spanning that date needs seam treatment; v21.0 is not a package-verified default seam. Supply an empty table to disable date-based seams entirely.NULLkeeps the default table, so Task Ratings output is unchanged. Cross-vintage SOC seams are always detected fromsoc_vintageregardless of this table.
Value
A tibble with one row per occupation and release pair:
n_from, n_to, n_added, n_dropped, n_retained; jaccard
(set similarity, the retained share of the item union); churn_rate
(1 - jaccard); rating_delta_l2 (the Euclidean norm of data_value
changes over retained items); cosine (cosine similarity of the
data_value vectors over the item union, missing items filled with zero);
and the seam flags seam, seam_type, and safely_comparable.
Details
Set metrics compare the item keys an occupation carries in each release.
The filtered input must contain at most one row per occupation, item, release,
and scale. Duplicate keys are rejected rather than resolved by row order.
When scale = NULL and scale_id is present, item-scale combinations define
membership so ratings from different scales are not joined to each other.
rating_delta_l2 uses only retained items, so it measures rating drift among
tasks that persist; cosine uses the union with zero fill, so it responds to
both membership turnover and rating change. Seam-crossing pairs still receive
metrics but are marked safely_comparable = FALSE; include them only in a
clearly labeled seam-inclusive row. Occupations are matched on
onet_soc_code, so cross-taxonomy pairs generally share few codes and should
be bridged with onet_crosswalk_bridge() before interpretation.
Examples
panel <- tibble::tibble(
release_version = c(rep("22.1", 3), rep("23.1", 3)),
release_date = c(rep(as.Date("2017-10-01"), 3), rep(as.Date("2018-11-01"), 3)),
soc_vintage = "2010",
onet_soc_code = "15-1132.00",
task_id = c("1", "2", "3", "1", "2", "4"),
scale_id = "IM",
data_value = c(4.0, 3.5, 2.0, 4.5, 3.5, 3.0)
)
onet_content_change(panel)
#> # A tibble: 1 × 21
#> onet_soc_code soc_code title from_release to_release from_release_date
#> <chr> <chr> <chr> <chr> <chr> <date>
#> 1 15-1132.00 15-1132 NA 22.1 23.1 2017-10-01
#> # ℹ 15 more variables: to_release_date <date>, soc_vintage_from <fct>,
#> # soc_vintage_to <fct>, n_from <int>, n_to <int>, n_added <int>,
#> # n_dropped <int>, n_retained <int>, jaccard <dbl>, churn_rate <dbl>,
#> # rating_delta_l2 <dbl>, cosine <dbl>, seam <lgl>, seam_type <chr>,
#> # safely_comparable <lgl>
