drb348 commited on
Commit
e668350
·
verified ·
1 Parent(s): d61ea08

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +268 -0
README.md ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: us-government-public-domain
4
+ license_link: https://www.usa.gov/government-works
5
+ language:
6
+ - en
7
+ size_categories:
8
+ - 1M<n<10M
9
+ task_categories:
10
+ - tabular-classification
11
+ pretty_name: "OPM FedScope Federal Employment — February 2026 (Part 1 of 3)"
12
+ tags:
13
+ - government
14
+ - federal-workforce
15
+ - foia
16
+ - sampling-frame
17
+ - opm
18
+ - fedscope
19
+ configs:
20
+ - config_name: default
21
+ data_files:
22
+ - split: train
23
+ path: "employment_202602_part1.parquet"
24
+ ---
25
+
26
+ # OPM FedScope Federal Employment — February 2026 (Part 1 of 3)
27
+
28
+ ## Why this dataset exists
29
+
30
+ We are building **FOIA requests** for federal agencies. To do that responsibly we need to
31
+ identify and sample the **custodians of records** likely to hold the documents we want —
32
+ i.e. the actual federal employees whose mailboxes, drives, and chat logs are responsive.
33
+
34
+ A naive list of senior officials over-samples the small visible top of an agency and
35
+ misses the bulk of work, which sits in the GS‑13/14/15 mass and the technical career
36
+ series. To get a defensible sample we want **stratification weights anchored in real
37
+ employment data**, so the FOIA targets reflect the actual distribution of staff across
38
+ sub-agencies, occupational series, pay plans, and locations.
39
+
40
+ This dataset is that anchor: OPM's record-level (PII-redacted) federal civilian
41
+ employment snapshot for **February 28, 2026** — every row is one employee.
42
+
43
+ > **Scope:** This file is **part 1 of 3** of OPM's Feb‑2026 Employment release. OPM
44
+ > splits the full ~6M‑row monthly snapshot into three roughly equal text files for
45
+ > distribution; this repo currently contains part 1 only (~2.03M rows, ~1.5 GB raw,
46
+ > compressed to 54 MB Parquet). Parts 2 and 3 are on the OPM site at
47
+ > [data.opm.gov/explore-data/data/data-downloads](https://data.opm.gov/explore-data/data/data-downloads).
48
+
49
+ ## What's in here
50
+
51
+ - `employment_202602_part1.parquet` — Snappy-ZSTD Parquet, **2,028,138 rows × 61 columns**, all string typed.
52
+ - `employment_202602_1_2026-05-04.txt` is the original pipe-delimited source from OPM (not uploaded; reproducible from OPM).
53
+
54
+ ### Schema (61 columns, all from OPM's published dictionary)
55
+
56
+ Identifiers / org:
57
+ `agency`, `agency_code`, `agency_subelement`, `agency_subelement_code`,
58
+ `cfo_act_agency_indicator`, `personnel_office_identifier_code`
59
+
60
+ Position:
61
+ `occupational_category` (P/A/T/C/B), `occupational_category_code`,
62
+ `occupational_group`, `occupational_group_code`,
63
+ `occupational_series`, `occupational_series_code`,
64
+ `pay_plan`, `pay_plan_code`, `grade`, `step_or_rate_type`, `step_or_rate_type_code`,
65
+ `position_occupied`, `position_occupied_code`,
66
+ `supervisory_status`, `supervisory_status_code`,
67
+ `appointment_type`, `appointment_type_code`,
68
+ `tenure`, `tenure_code`, `work_schedule`, `work_schedule_code`,
69
+ `flsa_category`, `flsa_category_code`,
70
+ `bargaining_unit`, `bargaining_unit_code`, `bargaining_unit_status`,
71
+ `nsftp_indicator`, `stem_occupation`, `stem_occupation_type`
72
+
73
+ Person attributes (coarse, no PII):
74
+ `age_bracket`, `length_of_service_years`, `education_level`, `education_level_bracket`,
75
+ `education_level_code`, `veteran_indicator`
76
+
77
+ Compensation (often `REDACTED`):
78
+ `annualized_adjusted_basic_pay`, `pay_basis`, `pay_basis_code`
79
+
80
+ Location:
81
+ `duty_station_code`, `duty_station_country`, `duty_station_country_code`,
82
+ `duty_station_county`, `duty_station_county_code`,
83
+ `duty_station_state`, `duty_station_state_abbreviation`,
84
+ `duty_station_state_country_territory_code`,
85
+ `core_based_statistical_area`, `core_based_statistical_area_code`,
86
+ `consolidated_statistical_area`, `consolidated_statistical_area_code`,
87
+ `locality_pay_area`, `locality_pay_area_code`,
88
+ `service_computation_date_leave`
89
+
90
+ Snapshot key:
91
+ `snapshot_yyyymm` (always `202602` here), `count` (always `1`)
92
+
93
+ ### What this dataset will **not** give you
94
+
95
+ - **Free-text position titles** (e.g. "Chief of Staff", "Senior Advisor for Policy") — OPM strips these. Closest proxy is `occupational_series` (job family).
96
+ - **Personally identifiable information** — no names, no employee IDs.
97
+ - **Sub-office / front-office breakdown** — granularity stops at `agency_subelement` (e.g. all of "Office of the Secretary of the Interior" is one `IN01` bucket regardless of which office an employee actually sits in).
98
+ - **Adjusted basic pay** for many records (~122K of 418K Feb‑2026 VA records are null per OPM's release notes; redactions also common elsewhere).
99
+
100
+ For the named-position layer (Secretary, Deputy Secretary, Assistant Secretaries,
101
+ Schedule C / SES non-career, etc.) supplement this with the
102
+ [Plum Book](https://www.govinfo.gov/app/collection/plumbook), the agency org chart, and
103
+ SES/SL/ST listings.
104
+
105
+ ---
106
+
107
+ ## Recipe: building a FOIA custodian sampling frame with SQL
108
+
109
+ All examples use **DuckDB** against the Parquet file. Install with `pip install duckdb`
110
+ (or `uv run --with duckdb python ...`).
111
+
112
+ ```python
113
+ import duckdb
114
+ con = duckdb.connect()
115
+ con.execute("CREATE VIEW emp AS SELECT * FROM 'employment_202602_part1.parquet'")
116
+ ```
117
+
118
+ If you prefer the CLI:
119
+ ```bash
120
+ duckdb -c "SELECT count(*) FROM 'employment_202602_part1.parquet'"
121
+ ```
122
+
123
+ ### 1. Pick the agency you're FOIA'ing
124
+
125
+ ```sql
126
+ -- Find every subelement under DOI
127
+ SELECT DISTINCT agency_subelement, agency_subelement_code
128
+ FROM emp
129
+ WHERE agency_code = 'IN'
130
+ ORDER BY agency_subelement;
131
+ ```
132
+
133
+ For DOI you'll see 14 subelements: `IN01` Office of the Secretary, `IN05` BLM, `IN06`
134
+ Indian Affairs, `IN07` Reclamation, `IN08` USGS, `IN10` NPS, `IN15` FWS, `IN21`
135
+ Solicitor, `IN22` OSMRE, `IN24` OIG, `IN26` BSEE, `IN27` BOEM, `IN28` BIE, `IN29` BTFA.
136
+
137
+ ### 2. Get the headcount-per-subelement denominator (top of the stratification tree)
138
+
139
+ ```sql
140
+ SELECT agency_subelement_code,
141
+ agency_subelement,
142
+ count(*) AS employees,
143
+ round(100.0 * count(*) / sum(count(*)) OVER (), 2) AS pct_of_agency
144
+ FROM emp
145
+ WHERE agency_code = 'IN'
146
+ GROUP BY agency_subelement_code, agency_subelement
147
+ ORDER BY employees DESC;
148
+ ```
149
+
150
+ Use the `pct_of_agency` column directly as your sub-agency sampling weight.
151
+
152
+ ### 3. Within a subelement, stratify by tier and job family
153
+
154
+ A reasonable **Tier** proxy from `pay_plan_code` and `grade`:
155
+
156
+ | pay_plan_code | tier |
157
+ |---|---|
158
+ | `EX` | Presidentially appointed (PAS) |
159
+ | `ES` | SES |
160
+ | `SL`, `ST` | Senior Level / Senior Scientific |
161
+ | `GS` (grade ≥ 14), `GL` (≥ 14) | Senior career |
162
+ | `GS` (grade 12‑13) | Mid career |
163
+ | `GS` (grade ≤ 11), `WG`, `WS`, `WL`, `WD` | Rank-and-file |
164
+ | else | Other |
165
+
166
+ ```sql
167
+ WITH tiered AS (
168
+ SELECT *,
169
+ CASE
170
+ WHEN pay_plan_code = 'EX' THEN 'PAS'
171
+ WHEN pay_plan_code = 'ES' THEN 'SES'
172
+ WHEN pay_plan_code IN ('SL','ST') THEN 'SL_ST'
173
+ WHEN pay_plan_code IN ('GS','GL') AND TRY_CAST(grade AS INT) >= 14 THEN 'Senior_career'
174
+ WHEN pay_plan_code IN ('GS','GL') AND TRY_CAST(grade AS INT) BETWEEN 12 AND 13 THEN 'Mid_career'
175
+ WHEN pay_plan_code IN ('GS','GL') AND TRY_CAST(grade AS INT) <= 11 THEN 'Rank_and_file'
176
+ WHEN pay_plan_code IN ('WG','WS','WL','WD') THEN 'Rank_and_file'
177
+ ELSE 'Other'
178
+ END AS tier
179
+ FROM emp
180
+ WHERE agency_subelement_code = 'IN01' -- swap to whatever you're FOIA'ing
181
+ )
182
+ SELECT tier,
183
+ occupational_series_code,
184
+ occupational_series,
185
+ count(*) AS employees,
186
+ round(100.0 * count(*) / sum(count(*)) OVER (PARTITION BY tier), 2) AS pct_within_tier
187
+ FROM tiered
188
+ GROUP BY tier, occupational_series_code, occupational_series
189
+ ORDER BY tier, employees DESC;
190
+ ```
191
+
192
+ ### 4. Build your sampling frame as a single tidy table
193
+
194
+ ```sql
195
+ COPY (
196
+ SELECT
197
+ agency_code,
198
+ agency_subelement_code AS office_code,
199
+ agency_subelement AS office,
200
+ pay_plan_code,
201
+ grade,
202
+ occupational_category_code,
203
+ occupational_series_code AS series_code,
204
+ occupational_series AS series,
205
+ duty_station_state_abbreviation AS state,
206
+ count(*) AS employees
207
+ FROM emp
208
+ WHERE agency_code = 'IN'
209
+ GROUP BY ALL
210
+ ) TO 'doi_sampling_frame.parquet' (FORMAT PARQUET);
211
+ ```
212
+
213
+ Now you can allocate FOIA-custodian sample slots proportional to `employees` (or any
214
+ weighted scheme — e.g. over-sample SES tiers, then use this frame to generate quotas for
215
+ the GS‑13/14/15 mass).
216
+
217
+ ### 5. Sanity-check the frame against what OPM publishes
218
+
219
+ ```sql
220
+ SELECT count(*) AS rows, sum(count(*)) OVER () AS employees
221
+ FROM emp WHERE agency_code = 'IN';
222
+ ```
223
+
224
+ `employees` should match OPM's published DOI total for Feb 2026 (within whatever rows
225
+ fell into parts 2 or 3 of the release — see the scope note above).
226
+
227
+ ---
228
+
229
+ ## Recreating this file from OPM
230
+
231
+ 1. Visit <https://data.opm.gov/explore-data/data/data-downloads>.
232
+ 2. Click **DOWNLOAD** under "Federal Employment Raw Data (February 2026)". Note: this is
233
+ a Blazor Server app that streams the file over WebSocket; large transfers may
234
+ disconnect under headless automation. Real browsers work.
235
+ 3. The download is a `.txt` file with `|` delimiters and a header row, named
236
+ `employment_202602_<part>_<download-date>.txt`.
237
+
238
+ To regenerate the Parquet:
239
+ ```bash
240
+ uv run --with duckdb python -c "
241
+ import duckdb
242
+ duckdb.sql('''
243
+ COPY (SELECT * FROM read_csv(\"employment_202602_1_*.txt\",
244
+ delim=\"|\", header=true, all_varchar=true))
245
+ TO \"employment_202602_part1.parquet\" (FORMAT PARQUET, COMPRESSION ZSTD)
246
+ ''')
247
+ "
248
+ ```
249
+
250
+ ## Provenance & license
251
+
252
+ - **Source:** U.S. Office of Personnel Management, Enterprise Human Resources
253
+ Integration (EHRI) Status snapshot, published via
254
+ [data.opm.gov](https://data.opm.gov/).
255
+ - **Coverage:** Federal civilian workforce snapshot as of **2026-02-28**, published
256
+ **2026-03-30**, version 1.
257
+ - **PII:** OPM redacts personal identifiers and many compensation values. No employee
258
+ names, no employee IDs.
259
+ - **License:** U.S. federal government work — public domain in the U.S. under
260
+ [17 U.S.C. § 105](https://www.usa.gov/government-works). Not endorsed by or affiliated with OPM.
261
+
262
+ ## Citation
263
+
264
+ ```
265
+ U.S. Office of Personnel Management (2026). Federal Employment Raw Data — February 2026.
266
+ Enterprise Human Resources Integration (EHRI) Status dataset.
267
+ https://data.opm.gov/explore-data/data/data-downloads
268
+ ```