Technical writing
OPM FedScope: The Federal Database Behind 2.1 Million US Government Workers
The federal government employs more than 2.1 million civilian workers across hundreds of agencies, departments, and components of the executive branch. The Office of Personnel Management maintains the authoritative database of every one of those positions — updated each pay period — and publishes quarterly aggregate snapshots through its FedScope system. Those snapshots reveal grade distributions, pay levels, demographic composition, occupation series, and hiring and separation rates across the entire workforce. The 2025 DOGE workforce reductions made FedScope the primary public window into what was actually happening to the size and shape of the federal government.
This article covers the scale and agency structure of the federal civilian workforce, the General Schedule and other pay systems, the dimensions available in FedScope data, hiring and separation trends including the FERS and CSRS retirement systems, federal telework data and the return-to-office conflict, the DOGE 2025 workforce reductions, workforce demographics, how to access OPM data, and a Python example for analyzing GS grade distributions and SES density by agency.
Scale and agency structure
The federal civilian workforce tracked by OPM consists of approximately 2.1 to 2.3 million executive branch civilian employees. This figure excludes uniformed military personnel (about 1.3 million active duty), United States Postal Service workers (650,000+, a separate entity not covered by the Central Personnel Data File), legislative branch employees (Congress, GAO, Library of Congress, and related offices), and judicial branch employees (federal courts, public defenders, and probation officers). The CPDF covers only the executive branch civilian workforce.
The Department of Defense is the largest single employer in the executive branch, with roughly 750,000 civilian employees spread across the Army, Navy, Air Force, Marine Corps, Defense Logistics Agency, Defense Intelligence Agency, and dozens of other defense components. These are the civilians who work alongside uniformed military: engineers, logistics specialists, IT professionals, analysts, and support staff at military installations worldwide. The Department of Veterans Affairs is the second-largest employer at approximately 400,000 employees, the majority of whom are health care workers at VA medical centers. The Department of Homeland Security employs roughly 250,000 civilians across CBP, ICE, TSA, FEMA, the Secret Service, the Coast Guard civilian component, and USCIS.
Other major departments: the Department of Justice at around 120,000 employees (FBI, DEA, BOP, ATF, U.S. Marshals, and U.S. Attorneys); HHS at roughly 90,000 (CDC, FDA, NIH, and CMS); Treasury at around 90,000 (where IRS accounts for the large majority, alongside FinCEN, OCC, and the Mint). The Social Security Administration, an independent agency, employs approximately 60,000. Independent regulatory agencies — the SEC, FTC, CFTC, FERC, FCC, NLRB, and others — account for a combined 50,000 to 75,000 positions.
OPM manages human resources policy for all of these agencies. Its Central Personnel Data File is updated each biweekly pay period to reflect personnel actions: new hires, promotions, transfers, step increases, separations, and retirements. The public FedScope interface at fedscope.opm.gov gives analysts access to aggregate snapshots of this data — quarterly employment cubes that can be sliced by agency, occupation, grade, pay plan, location, and demographics — without exposing individual employee records, which are protected under the Privacy Act of 1974.
The General Schedule pay system
The General Schedule covers approximately 70 percent of federal civilian employees. It consists of 15 grades (GS-1 through GS-15), each divided into 10 steps. Progression through steps within a grade is automatic, based on time-in-grade and satisfactory performance: one year at steps 1 through 3, two years at steps 4 through 6, and three years at steps 7 through 9 before advancement to the next step. Movement between grades requires a competitive appointment or a promotion action.
The 2024 GS base pay rates (before locality adjustment):
| Grade | Step 1 | Step 10 |
|---|---|---|
| GS-1 | $22,270 | $28,452 |
| GS-5 | $37,696 | $48,985 |
| GS-7 | $46,696 | $60,705 |
| GS-9 | $57,118 | $74,250 |
| GS-11 | $68,405 | $88,926 |
| GS-13 | $99,908 | $129,878 |
| GS-14 | $118,079 | $153,501 |
| GS-15 | $138,868 | $163,964 |
Base pay is supplemented by locality pay, which adjusts total compensation upward for 34 designated metropolitan areas and a “Rest of U.S.” rate that applies everywhere else. The Washington–Baltimore–Arlington locality area receives the highest adjustment: 33.26 percent above base pay in 2024. A GS-15 Step 10 employee in the DC area therefore earns a total salary of approximately $217,562. Locality pay is included in retirement benefit calculations under FERS. The “Rest of U.S.” locality adjustment in 2024 is 16.82 percent, meaning even federal employees stationed well outside major metropolitan areas receive a substantial premium above the base rates published in the statutory table.
Above GS-15 sits the Senior Executive Service. Approximately 9,000 SES positions exist across the executive branch — these are the career civil service equivalents of political appointees: deputy assistant secretaries, bureau directors, regional administrators, and program executives. SES pay in 2024 ranges from approximately $155,000 to $235,000 depending on agency, performance, and whether the agency holds a certified performance appraisal system. Agencies with OPM-certified systems can pay SES members up to the Vice President's salary ($235,000 in 2024); agencies without certification are capped at $212,100.
Other pay systems serve specific worker populations. The Federal Wage System covers blue-collar trade, craft, and labor occupations — machinists, electricians, mechanics, painters, and equipment operators — at rates set to match prevailing wages in each local labor market. Law enforcement officers including FBI agents, DEA agents, CBP officers, and Secret Service agents receive enhanced pay tables plus Law Enforcement Availability Pay (LEAP), a 25 percent premium compensating for unscheduled overtime inherent in criminal investigation. VA physicians and dentists operate under separate pay plans with critical pay authority that allows salaries well above the GS maximum to compete with private practice.
FedScope data dimensions
FedScope at fedscope.opm.gov provides a browser-based cube interface for exploring workforce data across the following dimensions. The interface supports quarterly snapshots going back to the late 1990s; historical data to 1988 is available in some dimensions.
| Dimension | Values and notes |
|---|---|
| Agency | 3-digit OPM agency code plus sub-agency code. Examples: AF=Air Force, VA=Veterans Affairs, HE=HHS, HS=DHS. Sub-agencies allow drilling to bureau level: within HHS, CDC, FDA, and NIH each have distinct sub-agency codes. |
| Occupation | 4-digit OPM occupational series. Key series: 0343 (Management and Program Analysis), 0501 (Financial Administration), 1811 (Criminal Investigation), 2210 (IT Management), 0905 (Attorney), 0110 (Economist), 0401 (Biological Sciences), 0610 (Nurse). |
| Location | State and county. Roughly 30 percent of all federal civilian employees work in the Washington DC metro area (DC, Maryland, Virginia). The next largest concentrations are California and Texas. |
| Pay Plan | GS (General Schedule), SES (Senior Executive Service), WG (Federal Wage System), ES (SES equivalent), EX (Executive Schedule — Cabinet secretaries and deputies), AL (Administrative Law Judges), and others. |
| Grade | GS-1 through GS-15 for GS employees; SES is reported separately. FedScope also provides a GS-equivalent grade for cross-pay-plan comparisons. |
| Work Schedule | Full-time, Part-time, Intermittent, Seasonal. Part-time and intermittent appointments are relatively rare in the federal workforce compared to the private sector. |
| Type of Appointment | Permanent (the largest category by far), Term (time-limited, typically 1–4 years), Temporary (not to exceed 1 year), Senior Executive. Competitive service vs. excepted service is a related dimension. |
| Supervisory Status | Non-supervisor, Team leader, Supervisor, Manager, Executive. Supervisors account for roughly 10–12 percent of the federal workforce; managers another 6–8 percent. |
| Education Level | Less than high school through doctoral degree. The federal workforce is substantially better educated than the private-sector workforce overall; roughly 65 percent hold a bachelor's degree or higher. |
| Age Group | 5-year age brackets. The federal workforce is older than the private-sector workforce on average, with a median age in the mid-40s. Agencies with large law enforcement components tend to skew younger; regulatory and policy-heavy agencies older. |
| Length of Service | Years of federal service, grouped in ranges. Relevant to retirement eligibility: FERS requires 5 years for any vested pension, 20 years at age 60 for a reduced pension, or 30 years at the minimum retirement age for an unreduced pension. |
| Race / National Origin | White, Black/African American, Asian, Native Hawaiian/Pacific Islander, American Indian/Alaska Native, Two or more races. Hispanic/Latino is reported separately as an ethnicity field rather than a race category. |
| Gender | Male/Female. Women represent approximately 44 percent of the federal civilian workforce overall, but are underrepresented at GS-15 and SES levels. |
| Veterans Status | Non-veteran, Non-disabled veteran, Disabled veteran (less than 30% disability rating), 30% or more disabled veteran. Veterans receive hiring preference in competitive service examinations. |
| Salary Range | Banded salary ranges for distributional analysis. FedScope also provides average salary figures for each data cell — not individual salaries, which are Privacy Act-protected. |
The critical limitation of FedScope data is that it is aggregate, not individual-level. Each cell in the data cube contains a count of employees and an average salary for that combination of dimensions. Individual employee records are protected under the Privacy Act of 1974 and are not releasable in response to FOIA requests. This means analyses requiring individual-level linkage — connecting a specific employee's grade to their occupation, location, and time-in-service simultaneously — are not possible from the public data. The public data supports population-level analyses: what fraction of DOD civilians are GS-13 or above, how the SES-to-GS-15 ratio varies across regulatory agencies, whether veteran representation has shifted over time.
Hiring and separation trends
OPM publishes quarterly hiring and separation data alongside the employment snapshots. New hire data distinguishes between competitive service appointments (open competitive examinations, subject to merit promotion and veterans' preference rules) and excepted service appointments (positions exempt from competitive examination requirements). The major excepted service hiring authorities include Schedule A (for persons with disabilities), the Veterans' Recruitment Appointment (VRA, for eligible veterans within four years of discharge), and the Presidential Management Fellows program, a selective two-year fellowship for recent advanced degree graduates.
Separation data tracks the reason an employee left federal service. The main categories: voluntary resignation, retirement (the largest category for most agencies), transfer to another federal agency, death, expiration of appointment for term and temporary employees, and involuntary separation including Reduction in Force. RIF is the formal statutory process by which federal agencies reduce headcount. It is subject to procedures governing competition areas, retention registers ordered by tenure and veterans' preference, and bump-and-retreat rights that allow displaced employees to take the position of a less-senior colleague. These procedures make federal workforce reductions substantially slower and more structured than private-sector layoffs.
The retirement system governing separations shifted fundamentally in 1984. The Civil Service Retirement System, established in 1920, provided a generous defined benefit pension — approximately 2 percent of the average of the highest three consecutive years of salary per year of service — for employees hired before January 1, 1984. CSRS employees are not covered by Social Security; the pension replaces it entirely. Beginning in 1987, new employees enrolled in the Federal Employees Retirement System: a smaller defined benefit component (1.0 percent per year of high-3 salary, or 1.1 percent for employees who retire at 62 with 20 or more years of service), Social Security participation, and the Thrift Savings Plan, a defined contribution account with government matching of contributions up to 5 percent of salary.
The TSP investment options include the G Fund (government securities with guaranteed principal), the F Fund (bond index), the C Fund (S&P 500 index), the S Fund (small and mid-cap domestic equity index), the I Fund (international equity index), and a series of L Funds (lifecycle target-date funds that shift allocation toward the G Fund as the target date approaches). TSP participants collectively hold more than $800 billion in assets, making it one of the largest defined contribution plans in the world.
CSRS employees now account for roughly 5 percent of the active federal workforce; FERS employees are approximately 95 percent. The large CSRS cohort that drove a retirement wave from 2010 to 2020 has largely cleared the workforce. FERS minimum retirement ages range from 55 to 57 depending on birth year, and the financial structure of FERS — with TSP assets that can be rolled over and continued Social Security accrual — creates less of a sharp incentive to retire immediately at eligibility compared to the CSRS formula.
Telework data and the return-to-office conflict
OPM's annual telework report and the Federal Employee Viewpoint Survey (FEVS) — a government-wide employee engagement survey conducted each year — are the primary public sources for data on federal telework patterns. Before COVID-19, approximately 40 percent of federal employees had telework agreements in place and roughly 22 percent actually teleworked at some frequency in a typical week. The agreements were most common in policy and administrative roles at Washington DC area agencies and least common in law enforcement, corrections, and direct health care roles.
In March 2020, OPM directed agencies to maximize telework capacity in response to the pandemic. Within weeks, the majority of the DC area federal workforce was working remotely. FEVS scores for work-life balance and employee satisfaction improved in 2020 and 2021 in many agencies. Agency-reported productivity metrics, where they existed, did not show the declines that prior-generation resistance to telework had predicted. The pandemic served as a large-scale natural experiment demonstrating that many federal positions could be performed effectively in a remote arrangement.
Between 2022 and 2024, the return-to-office debate created significant friction between agencies, the Biden administration (which pushed for increased in-person presence without mandating full-time return), and federal unions including the American Federation of Government Employees and the National Treasury Employees Union. Different agencies arrived at very different arrangements: some required four or five days per week in-office; others maintained two or three remote days per week as a stable hybrid pattern; a smaller number approved fully remote arrangements for positions where no agency office was nearby.
The GAO issued multiple reports between 2022 and 2024 documenting that federal office buildings in Washington DC were underutilized relative to capacity, with utilization rates in many buildings running below 30 percent of pre-pandemic levels even during peak in-office periods. These reports provided the empirical foundation for the 2025 executive orders mandating return-to-office for all federal employees — and the subsequent legal conflict with unions that challenged the orders as violations of collective bargaining agreements and civil service statutes.
DOGE and the 2025 federal workforce reduction
The Department of Government Efficiency, an advisory body operating under Elon Musk's direction in the second Trump administration beginning in January 2025, initiated the largest federal workforce reduction since the post-Cold War drawdown of the 1990s. The intervention operated through several simultaneous mechanisms.
The “Fork in the Road” email, sent by OPM in February 2025 to approximately 2.3 million federal employees, offered a deferred resignation arrangement: employees who chose to resign immediately would receive salary and benefits through late September 2025 — roughly 8 months of pay — without being required to work. Federal unions and outside employment attorneys argued the arrangement lacked appropriated funding required by the Antideficiency Act; courts issued varying rulings on the legality of the offer as litigation proceeded. Approximately 75,000 employees ultimately accepted it.
Reduction in Force notices were issued at multiple agencies in the months that followed. USAID, which employed roughly 10,000 staff, was effectively dismantled: employees were placed on administrative leave and then separated as a DOGE-directed consolidation of foreign assistance functions proceeded. HHS undertook a reorganization that reduced headcount by approximately 20,000 employees across CDC, FDA, NIH, and department-wide administrative functions. The Department of Energy reduced staff by roughly 1,500 of 17,000 positions; the EPA by a similar number. The IRS faced proposed reductions of several thousand compliance and enforcement positions, with opponents arguing that enforcement capacity reductions would reduce revenue collection by multiples of the salary savings.
Federal unions — AFGE, NTEU, and AFSCME — filed dozens of lawsuits challenging the legality of the reductions under civil service statutes governing RIF procedures, the Antideficiency Act, and the constitutional appropriations clause. Courts issued multiple temporary restraining orders and preliminary injunctions during the first half of 2025, halting some separations while litigation proceeded. OPM workforce data published through mid-2025 shows agency-level headcount reductions ranging from modest (3–5 percent at some larger departments) to severe (50 percent or more at agencies targeted for consolidation or elimination).
The FEVS for 2025, when published, will likely reflect this disruption in employee engagement scores, intent to leave, and perceptions of organizational effectiveness. FedScope employment snapshots from September 2025 onward will provide the authoritative public baseline for how large the workforce reduction actually was across each agency — separate from administration claims and union estimates, neither of which is verifiable against the underlying personnel records.
Race, gender, and veterans demographics
The federal civilian workforce is more demographically diverse than the private-sector workforce in several dimensions, though not uniformly so at higher pay grades.
African Americans are overrepresented in the federal workforce relative to their share of the U.S. civilian labor force: approximately 18 percent of federal civilian employees identify as Black or African American, against roughly 12 percent of the national labor force. This concentration is particularly pronounced in agencies with large DC-area workforces — SSA, HHS, IRS, and EEOC — and reflects both historical patterns of federal employment in the post-civil-rights era and the geographic concentration of Black residents in the Washington metro area. The federal merit-based civil service has historically provided Black workers access to stable, reliably non-discriminatory employment at a time when private-sector access was more constrained.
Veterans account for approximately 27 percent of the federal civilian workforce — roughly four to five times their share of the private-sector workforce, which is around 6 percent. The VA and DOD civilian components have particularly high veteran concentration; law enforcement agencies including the FBI and DEA also skew heavily veteran, given the preference points veterans receive on competitive examinations and the alignment between military experience and law enforcement career paths. Veterans' preference grants 5 or 10 additional points on competitive examinations and special retention protections in RIF actions, making veterans harder to separate involuntarily than non-veterans with comparable tenure.
Women represent approximately 44 percent of the total federal civilian workforce — close to their share of the national labor force — but are substantially underrepresented at GS-15 and SES levels. OPM's senior pay grade data consistently shows women holding roughly 35–38 percent of GS-15 positions and 34–36 percent of SES positions. The gap widens further at the top of the pay distribution. OPM strategic plans have included women's advancement to senior grades as a stated goal for multiple planning cycles.
Hispanic and Latino employees are underrepresented: approximately 9–10 percent of the federal workforce identifies as Hispanic or Latino, against roughly 18 percent of the national labor force. OPM's 2022–2026 strategic plan identified Hispanic employment as a specific diversity goal, reflecting that the federal workforce has not kept pace with demographic change in this dimension. The gap is most pronounced in professional and analytical occupations at the GS-13 to GS-15 level.
Education attainment in the federal workforce substantially exceeds that of the private-sector workforce. Approximately 65 percent of federal civilian employees hold a bachelor's degree or higher, compared to around 40 percent of the national civilian labor force. This reflects the composition of federal work: a large share of positions are professional, administrative, and analytical roles in the 0300, 0500, and 1000 occupational group series that require or strongly prefer four-year or advanced degrees. The Federal Wage System component (blue-collar trades) has lower educational attainment, more in line with private-sector norms for equivalent occupations.
Data access
Federal workforce data is available through several channels at varying levels of granularity.
FedScope at fedscope.opm.gov provides the primary browser-based interface for cube-style analysis. Users select dimensions, cross-tabulate them, and download the resulting counts and average salaries as CSV files. No account or API key is required.
OPM Employment and Trends reports at opm.gov/policy-data-oversight/data-analysis-documentation/federal-employment-reports/ publish monthly employment and turnover summary tables as PDFs and Excel files. These are less granular than FedScope cube downloads but are updated monthly rather than quarterly and are useful for tracking aggregate headcount trends in near real time.
FedScope bulk data at opm.gov/data provides the underlying data cubes as downloadable Excel workbooks and, for some datasets, as zip-compressed CSV files. The employment cube files contain one row per combination of agency, pay plan, grade, and other dimensions, with employee counts and average salaries for each cell. These files are typically 10–50 MB compressed and are the best starting point for programmatic analysis.
OPM API access is limited. FedScope does not expose a formal public REST API for programmatic queries. The data.gov registry lists some OPM datasets with API endpoints, but coverage is incomplete. The most reliable programmatic access pattern is to download bulk CSV archives directly from the OPM data portal URLs. FOIA requests can yield more granular records — individual agency data files with finer-grained breakdowns than the public cube — though response times are typically measured in months.
Partner datasets: The Partnership for Public Service's Best Places to Work in the Federal Government rankings, published annually, derive from FEVS scores and provide agency-level workforce engagement metrics that FedScope does not capture. USAJOBS at usajobs.gov has a public API for current and historical job postings, useful for analyzing where agencies are actively hiring and at what grade levels. The Merit Systems Protection Board publishes data on employee appeals, which provides a window into workforce disputes separate from the aggregate FedScope snapshots.
Python analysis: GS grade distributions and SES density by agency
The following code downloads an OPM FedScope employment cube archive, parses the aggregate fact data, computes GS grade distributions and SES density for each agency, calculates the average GS grade and average salary by agency, and ranks agencies by senior-grade concentration. The script works with the zip-archived CSV files OPM publishes on its bulk data portal.
import requests
import csv
import io
import zipfile
from collections import defaultdict
# -----------------------------------------------------------------------
# OPM FedScope Employment Data
#
# OPM publishes quarterly employment data cubes as zip-compressed CSV
# archives at: https://www.opm.gov/data/
#
# The "Employment Cube" contains aggregate counts of employees broken
# down by agency, pay plan, grade, and other dimensions. The September
# quarter file is typically the most complete annual snapshot.
#
# Download URL pattern (adjust year as needed):
# https://www.opm.gov/data/datasets/fedscope/employment/
# -----------------------------------------------------------------------
# --- Step 1: Download OPM FedScope status employment CSV ---
OPM_STATUS_URL = (
"https://www.opm.gov/data/datasets/fedscope/employment/"
"FedScope_Employment_Cube_September2023.zip"
)
print("Downloading OPM FedScope employment cube...")
resp = requests.get(OPM_STATUS_URL, timeout=120)
resp.raise_for_status()
# The zip contains multiple CSV files; the main employment file is
# typically named "FACTDATA_SEP2023.TXT" or similar.
with zipfile.ZipFile(io.BytesIO(resp.content)) as zf:
names = zf.namelist()
print("Files in archive:", names)
# Find the main fact data file
fact_file = next(
(n for n in names if n.upper().startswith("FACTDATA")), names[0]
)
with zf.open(fact_file) as f:
raw = f.read().decode("latin-1")
reader = csv.DictReader(io.StringIO(raw))
rows = list(reader)
print(f"Rows loaded: {len(rows):,}")
# --- Step 2: Agency code lookup ---
# OPM uses 2-character agency codes. Common codes:
# AF=Air Force, AR=Army (civilian), NV=Navy (civilian),
# VA=Veterans Affairs, HE=HHS, HS=DHS, DJ=Justice,
# TR=Treasury, RR=Social Security Administration
AGENCY_NAMES = {
"AF": "Air Force",
"AR": "Army (Civilian)",
"NV": "Navy (Civilian)",
"VA": "Veterans Affairs",
"HE": "Health & Human Services",
"HS": "Homeland Security",
"DJ": "Justice",
"TR": "Treasury",
"IN": "Interior",
"AG": "Agriculture",
"CM": "Commerce",
"ED": "Education",
"EN": "Energy",
"EP": "EPA",
"GT": "General Services Administration",
"NN": "NASA",
"OM": "OPM",
"RR": "Social Security Administration",
"SB": "Small Business Administration",
"ST": "State Department",
"TD": "Transportation",
}
# --- Step 3: Aggregate employee counts by agency, pay plan, and grade ---
# Key fields in the FedScope fact data:
# AGYSUB = agency + sub-agency code (first 2 chars = agency)
# PAYPLAN = pay plan (GS, SES, WG, ES, EX, etc.)
# GS_EQUIV_GRADE = GS-equivalent grade (01-15 for GS; SES maps to 00)
# EMPLOYMENT = count of employees in this combination
# AVG_SALARY = average salary for this combination
agency_stats = defaultdict(lambda: {
"total": 0,
"ses": 0,
"gs15": 0,
"gs13_14": 0,
"gs_below_13": 0,
"non_gs": 0,
"grade_sum": 0,
"grade_count": 0,
"avg_salary_sum": 0.0,
"salary_count": 0,
})
for row in rows:
agency_code = row.get("AGYSUB", "")[:2].strip()
pay_plan = row.get("PAYPLAN", "").strip()
grade_str = row.get("GS_EQUIV_GRADE", "").strip()
emp_str = row.get("EMPLOYMENT", "0").strip().replace(",", "")
sal_str = (
row.get("AVG_SALARY", "0")
.strip()
.replace(",", "")
.replace("$", "")
)
try:
emp_count = int(emp_str) if emp_str else 0
except ValueError:
emp_count = 0
try:
avg_sal = float(sal_str) if sal_str else 0.0
except ValueError:
avg_sal = 0.0
if not agency_code or emp_count == 0:
continue
s = agency_stats[agency_code]
s["total"] += emp_count
if pay_plan in ("SES", "ES"):
s["ses"] += emp_count
elif pay_plan == "GS":
try:
grade = int(grade_str)
except ValueError:
grade = 0
if grade == 15:
s["gs15"] += emp_count
elif grade in (13, 14):
s["gs13_14"] += emp_count
elif 1 <= grade <= 12:
s["gs_below_13"] += emp_count
if 1 <= grade <= 15:
s["grade_sum"] += grade * emp_count
s["grade_count"] += emp_count
else:
s["non_gs"] += emp_count
if avg_sal > 0:
s["avg_salary_sum"] += avg_sal * emp_count
s["salary_count"] += emp_count
# --- Step 4: Compute derived metrics ---
results = []
for code, s in agency_stats.items():
total = s["total"]
if total < 100:
continue # skip very small agency codes
ses_pct = s["ses"] / total * 100 if total else 0
gs15_pct = s["gs15"] / total * 100 if total else 0
gs13_14_pct = s["gs13_14"] / total * 100 if total else 0
avg_grade = s["grade_sum"] / s["grade_count"] if s["grade_count"] else 0
avg_salary = s["avg_salary_sum"] / s["salary_count"] if s["salary_count"] else 0
name = AGENCY_NAMES.get(code, f"Agency {code}")
results.append({
"agency_code": code,
"agency_name": name,
"total_employees": total,
"ses_count": s["ses"],
"ses_pct": ses_pct,
"gs15_count": s["gs15"],
"gs15_pct": gs15_pct,
"gs13_14_pct": gs13_14_pct,
"avg_gs_grade": avg_grade,
"avg_salary": avg_salary,
})
results.sort(key=lambda x: x["total_employees"], reverse=True)
# --- Step 5: Print agency workforce summary ---
header = (
f"{'Agency':<30} {'Employees':>10} {'SES%':>6} "
f"{'GS-15%':>7} {'GS-13/14%':>10} {'Avg Grade':>10} {'Avg Salary':>12}"
)
print("\nFederal Workforce by Agency (September 2023 snapshot):")
print(header)
print("-" * 90)
for r in results[:25]:
sal = "$" + f"{r['avg_salary']:>10,.0f}"
print(
f"{r['agency_name']:<30} "
f"{r['total_employees']:>10,} "
f"{r['ses_pct']:>6.2f}% "
f"{r['gs15_pct']:>6.2f}% "
f"{r['gs13_14_pct']:>9.2f}% "
f"{r['avg_gs_grade']:>9.1f} "
+ sal
)
# --- Step 6: Rank agencies by SES density (per 1,000 employees) ---
print("\nAgencies ranked by SES density (per 1,000 employees, min 500 staff):")
ses_density = [
r for r in results
if r["total_employees"] >= 500 and r["ses_count"] > 0
]
ses_density.sort(key=lambda x: x["ses_pct"], reverse=True)
print(f"{'Agency':<30} {'Total':>8} {'SES':>6} {'SES/1000':>10}")
print("-" * 60)
for r in ses_density[:15]:
per_thousand = r["ses_count"] / r["total_employees"] * 1000
print(
f"{r['agency_name']:<30} "
f"{r['total_employees']:>8,} "
f"{r['ses_count']:>6} "
f"{per_thousand:>9.1f}"
)The SES density ranking — SES members per 1,000 employees — is the most analytically revealing output. Regulatory and policy-heavy agencies including OMB, CEA components, and small independent regulators tend to have very high SES density because their entire function is analytical and managerial. Large operational agencies — DHS field operations, VA medical centers, DOD logistics components — have low SES density because most of their workforce is in frontline operational roles. Comparing an agency's SES density to its occupational distribution and mission type reveals whether its senior leadership structure is consistent with peer agencies of similar scale and function — or whether it is top-heavy relative to its peer group.
The GS grade distribution by agency is similarly informative. An agency where 60 percent of GS employees are at GS-13 or above has a fundamentally different workforce composition than one where 60 percent are at GS-9 or below: different skill requirements, different salary obligations, different succession planning challenges, and different responses to early retirement or deferred resignation offers. During the 2025 DOGE workforce actions, agencies with older, higher-graded workforces saw higher voluntary separation rates from employees close to retirement eligibility or with outside options commensurate with their federal grade level. Agencies with younger, lower-graded workforces saw lower voluntary separation rates but faced the same RIF notices.