Nason commited on
Commit
08d877c
·
verified ·
1 Parent(s): d0e84ba

Align reader guide with established datapond documentation

Browse files
Files changed (1) hide show
  1. README.md +211 -42
README.md CHANGED
@@ -1,70 +1,239 @@
1
  ---
2
  license: cc-by-4.0
 
3
  pretty_name: O*NET 31.0 Occupations, Skills and Work Context
4
- tags: [onet, occupations, skills, labor, work-context, duckdb]
5
- size_categories: [100K<n<1M]
 
 
 
 
 
 
 
6
  ---
7
 
8
- # O*NET® 31.0 occupations, skills and work context
9
 
10
- A version-pinned subset of the [O*NET 31.0 Database](https://www.onetcenter.org/database.html): **468,857 rows in 12 data tables**, three convenience views, and an 89-column dictionary. The DuckDB file is **11,284,480 bytes**.
11
 
12
- Use it to explore occupational skill requirements, physical demands and reported disease/infection exposure. It describes occupations, not individual health, illness incidence, wages or employment counts. It is one mixed-date release snapshot, not an annual panel or evidence of causal effects.
13
 
14
- | Table | Rows |
15
- |---|---:|
16
- | occupation_data | 1,016 |
17
- | job_titles | 54,269 |
18
- | sample_of_reported_titles | 8,189 |
19
- | essential_skills | 18,200 |
20
- | transferable_skills | 45,500 |
21
- | work_context | 305,389 |
22
- | content_model_reference | 3,006 |
23
- | scales_reference | 33 |
24
- | level_scale_anchors | 483 |
25
- | work_context_categories | 281 |
26
- | occupation_level_metadata | 32,280 |
27
- | survey_booklet_locations | 211 |
28
 
29
- ## Query directly
30
 
31
- With DuckDB and an available httpfs extension:
 
 
32
 
33
  ```sql
 
 
 
 
34
  LOAD httpfs;
35
- ATTACH 'https://huggingface.co/datasets/Nason/onet-database/resolve/main/onet.duckdb'
36
- AS onet (READ_ONLY);
37
- SELECT onet_soc_code,title,data_value AS mean_exposure,
38
- lower_ci_bound,upper_ci_bound,n,update_date,domain_source
39
  FROM onet.v_work_context_means
40
- WHERE element_id='4.C.2.c.1.b' AND scale_id='CX'
41
- AND recommend_suppress='N'
42
- ORDER BY data_value DESC,onet_soc_code LIMIT 15;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  ```
44
 
45
- Pin the Hugging Face commit in place of `main` for reproducibility. Registry inclusion is a separate PR; `datapond.connect('onet')` and R `dp_connect('onet')` require that entry or a local registry override.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- ## Interpretation
48
 
49
- Retain full O*NET-SOC codes and every part of each table's grain. Joining titles, skills and contexts without preselection or aggregation multiplies rows. SOC crosswalks are not necessarily one-to-one; there is no supplied QCEW, ATUS or NAICS crosswalk.
50
 
51
- `IM` (1–5 importance) and `LV` (0–7 level) are different scales. Work-context `CX` and `CT` are native means; `CXP` and `CTP` are percentages of three/five response categories. Never pool them. `v_work_context_means` has 51,927 rows for 911 occupations; category distributions cover 902 occupations and have 253,462 rows in `v_work_context_percentages`. Missing distributions are not imputed. `v_skills` combines disjoint essential/transferable domains with an explicit domain label.
52
 
53
- Low-precision `recommend_suppress='Y'` and not-relevant flags remain intact, along with all ratings, sample sizes, standard errors and confidence bounds. A missing flag is not an explicit `N`. Examples rank only explicit unsuppressed ratings. Sample size is not national employment, and ratings from different source methods or update months should not be treated as independent population observations.
54
 
55
- Update dates retain original `MM/YYYY` precision. Selected rating update months run December 2005–August 2026; skill months run June 2010–August 2026. This does not imply uniform annual measurement. Scale dictionaries and category/anchor labels accompany the ratings. Other 31.0 domains are omitted.
56
 
57
- ## Provenance and validation
58
 
59
- Artifact SHA-256: `b7908bb82e50d4aa0310a6400e2193e2b11946a9d663ff2c8f1171037585c11b`.
60
- Source ZIP SHA-256: `55033fc68b4c13ec23e7f74dc6378660f6e854e75d55d6e333ae0a761d3987cd`.
 
61
 
62
- [sources-31.0.json](sources-31.0.json) contains pinned source identities, build proof, runtime identity and the independent review's scope. Every typed cell was compared against Python CSV/Decimal reads of the original ZIP both before checkpoint and after read-only reopen. Counts, schemas, keys, references, scales, flags, codelists, category sums and dictionary statistics were checked; 27 regressions passed, including an injected supervisor failure and both worker-exit races. A second build reproduced typed fingerprints and dictionary bytes. Localhost HTTP checks passed in installed Python and R clients; these do not by themselves establish public-host verification.
63
 
64
- The final independent Claude review examined supplied code and test evidence, not independently rerun computations. See the [source repository](https://github.com/ian-nason/onet-database) for scripts, detailed limitations, physical-demands/skills examples and audit records; [DICTIONARY.md](DICTIONARY.md) describes every field. O*NET publishes quarterly; this derivative uses manual, version-pinned rebuilds.
65
 
66
- ## Attribution and changes
 
67
 
68
- This product uses the **O*NET 31.0 Database**, produced by the **U.S. Department of Labor, Employment and Training Administration (USDOL/ETA)** and developed by the National Center for O*NET Development, under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). [Official database license](https://www.onetcenter.org/license_db.html). O*NET® is a trademark of USDOL/ETA.
69
 
70
- Datapond selected 12 files, renamed columns to snake_case (`Date` to `update_date`), converted numeric fields to exact SQL types and source empty fields to NULL, and added views, metadata, dictionary, validation and examples. No nonblank source text, ratings, flags or update tokens were revised, rescaled, imputed or suppressed. USDOL/ETA has not approved, endorsed or tested these modifications. Other O*NET products and career exploration tools are outside this subset and license statement. Cite release 31.0, USDOL/ETA, CC BY 4.0 and the artifact hash.
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ license_link: https://www.onetcenter.org/license_db.html
4
  pretty_name: O*NET 31.0 Occupations, Skills and Work Context
5
+ tags:
6
+ - onet
7
+ - occupations
8
+ - skills
9
+ - work-context
10
+ - labor
11
+ - duckdb
12
+ size_categories:
13
+ - 100K<n<1M
14
  ---
15
 
16
+ # O*NET 31.0 Occupations, Skills and Work Context
17
 
18
+ A version-pinned, queryable DuckDB subset of the [O*NET 31.0 Database](https://www.onetcenter.org/database.html): **468,857 rows across 12 tables (89 columns)**, three convenience views, datapond metadata and a column dictionary.
19
 
20
+ Use it for descriptive questions about what occupations require and what their work is like: skill importance and level, how often workers stand, bend or are exposed to disease, and the alternate titles an occupation goes by. It does not contain wages, employment counts, health outcomes or any person-level records.
21
 
22
+ Built with [onet-database](https://github.com/ian-nason/onet-database). Published to Hugging Face on 2026-10-18. The datapond registry entry is a draft pull request, so `datapond.connect('onet')` does not resolve this database until it is merged; the direct URL below works now.
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ [Quick start](#quick-start) · [Tables](#tables) · [Views](#pre-built-views) · [Examples](#example-queries) · [Caveats](#researcher-caveats) · [Source](#data-source-and-version) · [License](#license-and-attribution) · [Changelog](#changelog)
25
 
26
+ ## Quick Start
27
+
28
+ ### DuckDB CLI
29
 
30
  ```sql
31
+ SET memory_limit = '128MiB';
32
+ SET threads = 1;
33
+ SET max_temp_directory_size = '0B';
34
+ INSTALL httpfs;
35
  LOAD httpfs;
36
+ ATTACH 'https://huggingface.co/datasets/Nason/onet-database/resolve/d0e84bacef02d4477423edbf7468cc3ec8fb79c2/onet.duckdb' AS onet (READ_ONLY);
37
+
38
+ -- Occupations with the highest mean reported exposure to disease or infection
39
+ SELECT onet_soc_code, title, data_value AS mean_exposure, lower_ci_bound, upper_ci_bound, n, update_date
40
  FROM onet.v_work_context_means
41
+ WHERE element_id = '4.C.2.c.1.b' AND scale_id = 'CX' AND recommend_suppress = 'N'
42
+ ORDER BY data_value DESC, onet_soc_code
43
+ LIMIT 15;
44
+ ```
45
+
46
+ The database is 11 MB. DuckDB fetches byte ranges as needed; transfer volume depends on the query. The examples use this immutable artifact URL:
47
+
48
+ ```
49
+ https://huggingface.co/datasets/Nason/onet-database/resolve/d0e84bacef02d4477423edbf7468cc3ec8fb79c2/onet.duckdb
50
+ ```
51
+
52
+ ### Python (duckdb)
53
+
54
+ ```python
55
+ import duckdb
56
+ con = duckdb.connect(config={"memory_limit": "128MiB", "threads": "1", "max_temp_directory_size": "0B"})
57
+ con.sql("INSTALL httpfs; LOAD httpfs;")
58
+ con.sql("ATTACH 'https://huggingface.co/datasets/Nason/onet-database/resolve/d0e84bacef02d4477423edbf7468cc3ec8fb79c2/onet.duckdb' AS onet (READ_ONLY)")
59
+ con.sql("SELECT * FROM onet._metadata").show()
60
+ con.sql("""
61
+ SELECT skill_domain, element_name, data_value AS importance, lower_ci_bound, upper_ci_bound
62
+ FROM onet.v_skills
63
+ WHERE onet_soc_code = '29-1141.00' AND scale_id = 'IM' AND recommend_suppress = 'N'
64
+ ORDER BY data_value DESC, element_id LIMIT 10
65
+ """).show()
66
+ con.close()
67
+ ```
68
+
69
+ ### R (DBI + duckdb)
70
+
71
+ ```r
72
+ library(DBI)
73
+ con <- dbConnect(duckdb::duckdb(config = list(memory_limit = "128MiB", threads = "1", max_temp_directory_size = "0B")))
74
+ dbExecute(con, "INSTALL httpfs")
75
+ dbExecute(con, "LOAD httpfs")
76
+ dbExecute(con, "ATTACH 'https://huggingface.co/datasets/Nason/onet-database/resolve/d0e84bacef02d4477423edbf7468cc3ec8fb79c2/onet.duckdb' AS onet (READ_ONLY)")
77
+ dbGetQuery(con, "SELECT onet_soc_code, title FROM onet.occupation_data ORDER BY onet_soc_code LIMIT 5")
78
+ dbDisconnect(con, shutdown = TRUE)
79
+ ```
80
+
81
+ In the tested R DuckDB 1.5.5 configuration, BIGINT and DECIMAL results are exposed as doubles. Counts here are exactly representable; decimal ratings and confidence bounds may be approximate in R even though the stored DECIMAL values are exact.
82
+
83
+ ### datapond package (after catalog integration)
84
+
85
+ The public default catalog does not yet include `onet`. After its registry entry is merged, these examples use the package's normal discovery and connection API:
86
+
87
+ ```python
88
+ import datapond
89
+ print(datapond.list())
90
+ datapond.describe('onet', table='work_context')
91
+ con = datapond.connect('onet')
92
+ con.sql('SELECT onet_soc_code, title FROM occupation_data ORDER BY onet_soc_code LIMIT 5').show()
93
+ con.close()
94
  ```
95
 
96
+ ```r
97
+ library(datapond)
98
+ dp_list()
99
+ con <- dp_connect('onet')
100
+ dp_describe(con, table = 'work_context')
101
+ DBI::dbGetQuery(con, "SELECT onet_soc_code, title FROM occupation_data ORDER BY onet_soc_code LIMIT 5")
102
+ dp_disconnect(con)
103
+ ```
104
+
105
+ For repeated scans, after catalog integration, download once and connect locally:
106
+
107
+ ```python
108
+ import datapond
109
+ datapond.download('onet')
110
+ con = datapond.connect('onet', local=True)
111
+ con.sql('SELECT onet_soc_code, title FROM occupation_data ORDER BY onet_soc_code LIMIT 5').show()
112
+ con.close()
113
+ ```
114
+
115
+ ```r
116
+ library(datapond)
117
+ dp_download('onet')
118
+ con <- dp_connect('onet', local = TRUE)
119
+ DBI::dbGetQuery(con, "SELECT onet_soc_code, title FROM occupation_data ORDER BY onet_soc_code LIMIT 5")
120
+ dp_disconnect(con)
121
+ ```
122
+
123
+ Verify the recorded artifact SHA-256 after downloading. In tested Python 0.1.1, the optional Hugging Face download path follows the default branch rather than the pinned URL; see [consumer verification](https://github.com/ian-nason/onet-database/blob/main/docs/CONSUMERS.md) for the tested configuration.
124
+
125
+ Package checks use an isolated candidate registry; default-catalog discovery remains pending. See [consumer verification](https://github.com/ian-nason/onet-database/blob/main/docs/CONSUMERS.md) for exact client versions, paths, resource limits and download behavior. The direct URL examples above work independently of the catalog. The SQL examples below use the `onet` catalog alias from the direct-URL quick start.
126
+
127
+
128
+ ## Tables
129
+
130
+ | Table | Description | Rows | Columns |
131
+ |---|---|---:|---:|
132
+ | `work_context` | Work-context scale means and separate response-category percentages; never pool scales/categories | 305,389 | 16 |
133
+ | `job_titles` | Alternate job titles and original source codes; many titles per occupation | 54,269 | 5 |
134
+ | `transferable_skills` | Transferable-skill importance and level ratings with uncertainty, flags and update month | 45,500 | 15 |
135
+ | `occupation_level_metadata` | Collection modes, response rates and demographics; not population microdata | 32,280 | 7 |
136
+ | `essential_skills` | Essential-skill importance and level ratings with uncertainty, flags and update month | 18,200 | 15 |
137
+ | `sample_of_reported_titles` | Sample job titles reported by workers, with My Next Move display flag | 8,189 | 4 |
138
+ | `content_model_reference` | Definitions of content-model elements, including hierarchy nodes beyond this subset | 3,006 | 3 |
139
+ | `occupation_data` | O*NET-SOC 2019 occupation codes, titles and descriptions; one row per occupation | 1,016 | 3 |
140
+ | `level_scale_anchors` | Illustrative descriptions for points on level scales; includes other O*NET domains | 483 | 6 |
141
+ | `work_context_categories` | Labels keyed by element, scale and category for work-context response distributions | 281 | 6 |
142
+ | `survey_booklet_locations` | Survey question identifiers keyed by element and scale; includes other domains | 211 | 5 |
143
+ | `scales_reference` | Scale labels and native minimum/maximum values; no cross-scale normalization | 33 | 4 |
144
+
145
+ Skill coverage is 910 occupations with 10 essential and 25 transferable elements. Work-context coverage is 911 occupations and 57 elements; distributions cover 902. The 1,016 occupation records are not all rated in each domain. Other 31.0 files (abilities, knowledge, software skills, tasks, crosswalks) are not loaded. `_metadata` has one row per data table; `_columns` carries original headers and descriptions.
146
+
147
+ ## Pre-built Views
148
+
149
+ | View | What it does |
150
+ |---|---|
151
+ | `v_skills` | Union of `essential_skills` and `transferable_skills` with a `skill_domain` column; the two domains are disjoint |
152
+ | `v_work_context_means` | `work_context` rows with no category: the CX (1 to 5) and CT (1 to 3) means |
153
+ | `v_work_context_percentages` | CXP and CTP category percentages joined to their labels on the full `(element_id, scale_id, category)` key |
154
+
155
+ No view drops suppressed or low-precision ratings; filter on `recommend_suppress` yourself. Views are not counted in the row and table totals above.
156
+
157
+ ## Example Queries
158
+
159
+ Physical demands of registered nurses, one native mean per element:
160
+
161
+ ```sql
162
+ SELECT element_name, data_value, n, standard_error, recommend_suppress, update_date
163
+ FROM onet.v_work_context_means
164
+ WHERE onet_soc_code = '29-1141.00' AND scale_id = 'CX'
165
+ AND element_id IN ('4.C.2.d.1.b', '4.C.2.d.1.d', '4.C.2.d.1.h')
166
+ ORDER BY element_id;
167
+ ```
168
+
169
+ How nurses' standing time is distributed across response categories (percent of ratings, not of U.S. nurses):
170
+
171
+ ```sql
172
+ SELECT category, category_description, data_value AS response_percent, recommend_suppress, update_date
173
+ FROM onet.v_work_context_percentages
174
+ WHERE onet_soc_code = '29-1141.00' AND element_id = '4.C.2.d.1.b' AND scale_id = 'CXP'
175
+ ORDER BY category;
176
+ ```
177
+
178
+ Compare one skill with one context rating without a many-to-many join:
179
+
180
+ ```sql
181
+ WITH skill AS (
182
+ SELECT onet_soc_code, title, data_value AS social_perceptiveness_importance
183
+ FROM onet.transferable_skills
184
+ WHERE element_id = '2.B.1.a' AND scale_id = 'IM' AND recommend_suppress = 'N'
185
+ ), exposure AS (
186
+ SELECT onet_soc_code, data_value AS disease_exposure
187
+ FROM onet.v_work_context_means
188
+ WHERE element_id = '4.C.2.c.1.b' AND scale_id = 'CX' AND recommend_suppress = 'N'
189
+ )
190
+ SELECT * FROM skill JOIN exposure USING (onet_soc_code)
191
+ ORDER BY disease_exposure DESC, onet_soc_code LIMIT 20;
192
+ ```
193
+
194
+ The full set is in [examples.sql](https://github.com/ian-nason/onet-database/blob/main/examples.sql); saved results are bound to the artifact hash.
195
+
196
+ ## Researcher Caveats
197
+
198
+ 1. **Scales are not interchangeable.** `IM` is importance (1 to 5), `LV` is level (0 to 7), `CX` is a 1 to 5 mean, `CT` a 1 to 3 mean, and `CXP`/`CTP` are category percentages (0 to 100). Never pool `data_value` across scales; use `scales_reference`, `level_scale_anchors` and `work_context_categories` for meaning.
199
+ 2. **Suppression and relevance flags.** `recommend_suppress='Y'` marks low precision; values are retained exactly. For rankings require an explicit `'N'`, which also excludes rows where the flag is missing. `not_relevant='Y'` is a separate flag; a missing value is not an explicit `'N'`.
200
+ 3. **Uncertainty is per rating.** `n` is the rating sample size, not employment. Standard errors and confidence bounds come from the analyst, incumbent, occupational-expert or transition methods documented by O*NET; do not pool ratings as if independent. See the official [analyst](https://www.onetcenter.org/dictionary/31.0/csv/appendix_analyst.html) and [incumbent/expert](https://www.onetcenter.org/dictionary/31.0/csv/appendix_incumbent.html) notes.
201
+ 4. **One snapshot, not a panel.** `update_date` keeps the source `MM/YYYY` string; selected ratings span December 2005 to August 2026 and skills span June 2010 to August 2026. Parsing with `strptime(update_date, '%m/%Y')` is for ordering only.
202
+ 5. **O*NET-SOC codes are ten characters.** Several detailed occupations share a six-digit SOC parent, so a crosswalk is not necessarily one-to-one. No SOC, NAICS, QCEW or ATUS crosswalk is included.
203
+ 6. **Grain multiplies.** An occupation has many titles, skills and context rows. Select or aggregate each table to one row per occupation before joining, as the comparison example does.
204
+ 7. **Percentages describe ratings.** Category percentages sum to about 100 after source rounding and are not worker counts. Exposure scores describe reported work context, not infection incidence or individual risk.
205
+
206
+ ## Data Source and Version
207
+
208
+ O*NET 31.0 Database, U.S. Department of Labor, Employment and Training Administration, developed by the National Center for O*NET Development. The pinned source ZIP is 16,237,378 bytes, SHA-256 `55033fc68b4c13ec23e7f74dc6378660f6e854e75d55d6e333ae0a761d3987cd`; 12 of its files are loaded. O*NET publishes quarterly with a primary third-quarter update; this repository does not promise an automatic refresh.
209
+
210
+ Artifact: `onet.duckdb`, 11,284,480 bytes, SHA-256 `b7908bb82e50d4aa0310a6400e2193e2b11946a9d663ff2c8f1171037585c11b`, dataset commit `d0e84bacef02d4477423edbf7468cc3ec8fb79c2`.
211
 
212
+ ## License and Attribution
213
 
214
+ This product uses the **O*NET 31.0 Database**, produced by the **U.S. Department of Labor, Employment and Training Administration (USDOL/ETA)** and developed by the National Center for O*NET Development, under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/). See the [official database license](https://www.onetcenter.org/license_db.html). O*NET® is a trademark of USDOL/ETA.
215
 
216
+ Datapond has modified the representation: selected 12 files; renamed columns to snake_case (`Date` → `update_date`); converted exact decimal/integer fields and empty fields to SQL types/NULL; added three views, metadata, dictionary, validation and examples. No source ratings, occupation titles, date tokens, flags or nonblank text values were revised, rescaled, imputed or suppressed. USDOL/ETA has not approved, endorsed or tested these modifications. The scripts and documentation describe every transformation. The database content license is CC BY 4.0; no public-domain claim is made. O*NET career exploration tools are outside this subset and this license statement.
217
 
218
+ For citation, include O*NET release 31.0, USDOL/ETA, the CC BY 4.0 license link, this derivative's artifact SHA-256 and the recorded build date. Public-host verification is recorded in [PUBLICATION.md](https://github.com/ian-nason/onet-database/blob/main/PUBLICATION.md); catalog integration remains pending.
219
 
220
+ ## GitHub, Dictionary and Website
221
 
222
+ [Detailed researcher guide](https://github.com/ian-nason/onet-database/blob/main/docs/RESEARCHER-GUIDE.md) · [Build and update instructions](https://github.com/ian-nason/onet-database/blob/main/docs/REPRODUCE.md) · [Verified publication](https://github.com/ian-nason/onet-database/blob/main/PUBLICATION.md)
223
 
224
+ - Source, build scripts, tests and evidence: [github.com/ian-nason/onet-database](https://github.com/ian-nason/onet-database)
225
+ - Column dictionary (every column, original header, type, NULL share, join hint): [DICTIONARY.md](https://github.com/ian-nason/onet-database/blob/main/DICTIONARY.md)
226
+ - Catalog: [datapond registry](https://github.com/datapond-db/registry); the entry for `onet` is a draft pull request and the database will appear on the [datapond website](https://datapond-db.github.io/website/) once it is merged.
227
 
228
+ ## Changelog
229
 
230
+ ### 2026-10-18 — Documentation refresh
231
 
232
+ - Added Python/R quick starts, table descriptions and column counts, view guidance, navigation, and clearer researcher caveats.
233
+ - Database bytes, schema, source locks and validated query results are unchanged. Catalog integration remains pending.
234
 
235
+ ### 2026-10-18 — Initial release
236
 
237
+ - O*NET 31.0 subset: 468,857 rows across 12 tables (89 columns) and 3 views. Artifact 11,284,480 bytes, SHA-256 `b7908bb8…85c11b`, commit `d0e84bac`.
238
+ - Every typed cell verified against an independent read of the pinned source ZIP; public immutable URL, HTTP range requests and the installed Python and R clients tested after upload.
239
+ - Registry entry opened as a draft pull request; catalog integration pending.