Skip to content

Returns a tibble of ID-name mappings for SWADL metadata. Use this to understand what each ID represents.

Usage

swadl_id_names(
  what = c("topics", "indicators", "measures", "dimensions", "geographies"),
  topic = NULL,
  indicator = NULL
)

Arguments

what

The type of metadata to list. One of:

"topics"

Broad categories that group related indicators

"indicators"

Specific data series that can be retrieved with get_swadl()

"measures"

Ways of presenting indicator data (e.g., nominal vs real wages)

"dimensions"

Demographic categories for subsetting data (e.g., gender, race)

"geographies"

Geographic units (national, regions, divisions, states)

topic

For what = "indicators", optionally filter to a specific topic ID.

indicator

For what = "measures" or what = "dimensions", optionally filter to those available for a specific indicator ID.

Value

A tibble. The columns depend on what:

topics

id, name

indicators

id, name, topic_id, updated_date

measures

id, name, format

dimensions

dimension_id, dimension_name, value_id, value_name

geographies

id, level, name, abbr

See also

swadl_indicator() for detailed information about a single indicator, get_swadl() for fetching time series data.

Examples

# \donttest{
# List all topics
swadl_id_names("topics")
#> # A tibble: 9 × 2
#>   id           name            
#>   <chr>        <chr>           
#> 1 wages        Wages           
#> 2 wage_gaps    Wage disparities
#> 3 unions       Unions          
#> 4 minimum_wage Minimum wages   
#> 5 labor_force  Employment      
#> 6 population   Population      
#> 7 poverty      Poverty         
#> 8 prices       Prices          
#> 9 productivity Productivity    

# List all indicators
swadl_id_names("indicators")
#> # A tibble: 36 × 4
#>    id                             name                     topic_id updated_date
#>    <chr>                          <chr>                    <chr>    <chr>       
#>  1 annual_wage_ssa                Annual wages for select… wages    2026-02-27  
#>  2 ceo_pay_ratio                  CEO pay ratio            wage_ga… 2026-02-27  
#>  3 hourly_wage_gap_black_white    Black-white wage gap     wage_ga… 2026-02-27  
#>  4 hourly_wage_gap_gender         Gender wage gap          wage_ga… 2026-02-27  
#>  5 hourly_wage_gap_hispanic_white Hispanic-white wage gap  wage_ga… 2026-02-27  
#>  6 hourly_wage_mean               Hourly wage, average     wages    2026-02-27  
#>  7 hourly_wage_median             Hourly wage, median      wages    2026-02-27  
#>  8 hourly_wage_payroll            Hourly earnings by indu… wages    2026-02-27  
#>  9 hourly_wage_percentile_ratios  Hourly wage percentile … wages    2026-02-27  
#> 10 hourly_wage_percentiles        Hourly wage percentiles  wages    2026-02-27  
#> # ℹ 26 more rows

# List indicators for a specific topic
swadl_id_names("indicators", topic = "wages")
#> # A tibble: 6 × 4
#>   id                            name                       topic_id updated_date
#>   <chr>                         <chr>                      <chr>    <chr>       
#> 1 annual_wage_ssa               Annual wages for select w… wages    2026-02-27  
#> 2 hourly_wage_mean              Hourly wage, average       wages    2026-02-27  
#> 3 hourly_wage_median            Hourly wage, median        wages    2026-02-27  
#> 4 hourly_wage_payroll           Hourly earnings by indust… wages    2026-02-27  
#> 5 hourly_wage_percentile_ratios Hourly wage percentile ra… wages    2026-02-27  
#> 6 hourly_wage_percentiles       Hourly wage percentiles    wages    2026-02-27  

# List measures for a specific indicator
swadl_id_names("measures", indicator = "hourly_wage_percentiles")
#> # A tibble: 2 × 3
#>   id             name                     format
#>   <chr>          <chr>                    <chr> 
#> 1 real_wage_2025 Real hourly wage (2025$) dollar
#> 2 nominal_wage   Nominal hourly wage      dollar

# List dimensions
swadl_id_names("dimensions")
#> # A tibble: 87 × 4
#>    dimension_id          dimension_name value_id       value_name        
#>    <chr>                 <chr>          <chr>          <chr>             
#>  1 age_group             Age            age_16_24      16–24 years       
#>  2 age_group             Age            age_25_54      25–54 years       
#>  3 age_group             Age            age_55_plus    55+ years         
#>  4 age_group_working_age Age            age_25_54_wa   25–54 years       
#>  5 age_group_working_age Age            age_16_24_wa   16–24 years       
#>  6 age_group_working_age Age            age_55_64_wa   55–64 years       
#>  7 ces_industry          All sectors    ces_nonfarm    Total nonfarm     
#>  8 ces_government        Government     ces_fed        Federal government
#>  9 ces_government        Government     ces_government Government        
#> 10 ces_government        Government     ces_local      Local government  
#> # ℹ 77 more rows

# List geographies
swadl_id_names("geographies")
#> # A tibble: 65 × 4
#>    id              level    name               abbr 
#>    <chr>           <chr>    <chr>              <chr>
#>  1 national        national United States      US   
#>  2 regionMidwest   region   Midwest            NA   
#>  3 regionNortheast region   Northeast          NA   
#>  4 regionSouth     region   South              NA   
#>  5 regionWest      region   West               NA   
#>  6 division01      division New England        NA   
#>  7 division02      division Middle Atlantic    NA   
#>  8 division03      division East North Central NA   
#>  9 division04      division West North Central NA   
#> 10 division05      division South Atlantic     NA   
#> # ℹ 55 more rows
# }