Input-Output Tables - Bureau of Economic Analysis

Overview

A series of detailed tables showing how industries interact with each other and with the rest of the economy. Supply tables show the goods and services produced by domestic industries as well as imports of these goods and services. Use tables show who uses these goods and services, including other industries. Requirements tables summarize the full supply chain, including direct and indirect inputs.

Data source links.

Tables

List of all tables in the collection.

Variables

Listing of all variables in each table.

Examples

BEA-NAICS crosswalk

2023 I-O revision, 2017 NAICS revision.

Code
pubdata::get("bea_io", "2023_naics") %>%
  summarize(naics = str_c(naics, collapse = ", "), .by = c(sector, summary, u_summary, detail, title)) %>%
  datatable(filter = "top")

GDP by commodity

GDP as the sum of final uses: consumption, investment, government spending, net export.

\[ Y = C + I + G + X - M \]

Billions of dollars in 2022.

Code
x <- pubdata::get("bea_io", "2023_mu_use-bef-pro_sec_2022")
commodity_codes <- x %>%
  filter(core_matrix) %>%
  distinct(row_code) %>%
  pull()
x %>%
  mutate(
    col_name = case_match(
      col_name,
      "Personal consumption expenditures" ~ "C",
      "Private fixed investment" ~ "I1",
      "Change in private inventories" ~ "I2",
      "Exports of goods and services" ~ "X",
      "Imports of goods and services" ~ "M",
      "Government consumption expenditures and gross investment" ~ "G",
      "Total Final Uses (GDP)" ~ "Y"
    ),
    value = replace_na(value, 0)
  ) %>%
  filter(row_code %in% commodity_codes, !is.na(col_name)) %>%
  pivot_wider(id_cols = c(row_code, row_name), names_from = col_name) %>%
  mutate(I = I1 + I2) %>%
  select(row_code, row_name, Y, C, I, G, X, M) %>%
  { add_row(., row_code = "", row_name = "TOTAL", summarize(., across(where(is.numeric), sum)), .before = 1) } %>%
  mutate(across(where(is.numeric), \(x) round(x / 1000)))
row_code row_name Y C I G X M
TOTAL 25744 17512 4757 4447 2600 -3571
11 Agriculture, forestry, fishing, and hunting 78 123 -22 0 60 -83
21 Mining 48 0 98 0 178 -228
22 Utilities 359 359 0 0 5 -5
23 Construction 1878 0 1497 382 0 0
31G Manufacturing 1977 2413 1136 149 1029 -2751
42 Wholesale trade 1495 706 327 39 321 102
44RT Retail trade 2376 2258 118 0 0 0
48TW Transportation and warehousing 648 460 43 5 154 -14
51 Information 1109 702 316 40 72 -21
FIRE Finance, insurance, real estate, rental, and leasing 4396 3979 203 0 284 -70
PROF Professional and business services 1942 349 1186 277 298 -167
6 Educational services, health care, and social assistance 3647 3642 0 0 16 -12
7 Arts, entertainment, recreation, accommodation, and food services 1567 1556 9 0 4 -2
81 Other services, except government 761 764 0 0 0 -4
G Government 3664 94 0 3570 1 0
Used Scrap, used and secondhand goods -49 127 -169 -15 32 -24
Other Noncomparable imports and rest-of-the-world adjustment -152 -19 15 0 146 -294

Components of value added by industry

Use table subtotals satisfy the following accounting identity:

\[ \text{Total industry output} = \text{Total Intermediate} + \text{Compensation of employees} + \text{Gross operating surplus} + \text{Net taxes} \]

Table below shows percentage shares of total output by industry in 2022 at the sector level.

Code
x <- pubdata::get("bea_io", "2023_mu_use-bef-pro_sec_2022")
industry_codes <- x %>%
  filter(core_matrix) %>%
  distinct(col_code) %>%
  pull()
x %>%
  filter(
    row_name %in% c(
      "Total Intermediate", 
      "Compensation of employees", 
      "Gross operating surplus", 
      "Taxes on production and imports, less subsidies", 
      "Total Industry Output"),
    col_code %in% industry_codes
  ) %>%
  mutate(
    pct = round(100 * value / sum(if_else(row_name == "Total Industry Output", value, 0)), 1),
    .by = col_code) %>%
  filter(row_name != "Total Industry Output") %>%
  pivot_wider(id_cols = c(col_code, col_name), names_from = row_name, values_from = pct) %>%
  rename(intermediates = "Total Intermediate", 
         compensation = "Compensation of employees", 
         taxes = "Taxes on production and imports, less subsidies",
         surplus = "Gross operating surplus")
col_code col_name intermediates compensation taxes surplus
11 Agriculture, forestry, fishing, and hunting 57.2 10.1 0.2 32.5
21 Mining 46.9 9.0 7.4 36.7
22 Utilities 37.5 13.7 10.8 38.0
23 Construction 48.9 32.7 0.6 17.7
31G Manufacturing 63.2 17.6 1.4 17.9
42 Wholesale trade 44.6 23.9 11.7 19.9
44RT Retail trade 40.2 28.3 12.3 19.2
48TW Transportation and warehousing 48.8 28.3 2.6 20.3
51 Information 43.3 20.9 2.8 32.9
FIRE Finance, insurance, real estate, rental, and leasing 35.8 14.9 5.1 44.2
PROF Professional and business services 38.5 45.9 1.6 13.9
6 Educational services, health care, and social assistance 36.6 52.6 1.0 9.8
7 Arts, entertainment, recreation, accommodation, and food services 44.6 32.7 7.0 15.7
81 Other services, except government 38.8 44.2 3.5 13.5
G Government 39.8 46.5 -1.2 14.9

Sector Use table in matrix form

Pivot long to wide. Using codes as row and column names, billions of dollars.

Code
x <- pubdata::get("bea_io", "2023_mu_use-bef-pro_sec_2017") %>%
  mutate(
    value = round(replace_na(value, 0) / 1000),
    row_code = case_match(
      row_name,
      "Total Intermediate" ~ "T005",
      "Total Value Added" ~ "T006",
      "Total Industry Output" ~ "T008",
      .default = row_code
    ),
    col_code = case_match(
      col_name,
      "Total Intermediate" ~ "T001",
      "Total Final Uses (GDP)" ~ "FTOT",
      "Total Commodity Output" ~ "TOUT",
      .default = col_code
    )
  ) %>%
  pivot_wider(id_cols = row_code, names_from = col_code)

x %>%
  select(!row_code) %>%
  as.matrix() %>%
  `rownames<-`(x$row_code) %>%
  knitr::kable()
11 21 22 23 31G 42 44RT 48TW 51 FIRE PROF 6 7 81 G T001 F010 F020 F030 F040 F050 F100 FTOT TOUT
11 110 0 0 1 255 1 2 0 0 0 2 0 9 0 6 387 82 0 -3 44 -59 0 64 451
21 1 40 12 13 320 0 0 0 1 0 2 1 2 1 29 423 0 100 -4 49 -153 0 -8 415
22 9 9 11 9 71 15 40 10 8 54 17 26 31 7 32 350 265 0 0 4 -2 0 267 617
23 2 5 7 0 21 3 8 6 3 128 3 5 5 3 94 295 0 1053 0 0 0 322 1375 1670
31G 68 47 14 378 1838 103 59 115 70 70 164 203 131 58 371 3689 1741 898 31 909 -1931 123 1770 5458
42 44 13 6 88 397 60 29 28 29 28 40 60 36 13 69 939 566 247 10 206 39 28 1096 2035
44RT 1 1 3 78 18 1 7 12 0 7 5 1 9 6 0 148 1547 74 0 0 0 0 1621 1769
48TW 13 11 19 26 165 105 67 153 16 51 65 26 15 6 74 812 316 27 -4 116 -24 2 433 1245
51 1 1 7 8 23 19 27 7 243 79 94 30 25 14 129 706 514 203 0 78 -17 24 802 1509
FIRE 16 29 24 46 110 187 200 120 94 1273 291 270 130 79 108 2977 3197 168 0 235 -59 0 3540 6517
PROF 5 37 42 77 270 318 192 83 225 532 581 282 158 59 273 3134 269 778 0 204 -131 195 1316 4449
6 0 0 0 0 0 2 3 0 0 0 1 41 2 2 21 73 2917 0 0 6 -6 0 2917 2990
7 1 1 4 1 7 16 8 11 45 97 76 53 44 5 18 385 1192 5 0 4 -1 0 1201 1586
81 0 1 2 6 14 18 12 12 7 51 34 22 13 6 40 239 613 0 0 0 -5 0 609 848
G 0 0 1 0 5 23 9 8 2 11 9 7 9 2 12 98 79 0 0 1 0 2716 2796 2894
Used 0 1 6 3 31 0 0 6 0 0 0 1 0 10 0 58 81 -126 4 21 -14 -13 -47 11
Other 1 1 2 2 21 8 5 19 9 42 10 1 3 5 15 142 -91 8 0 204 -260 0 -139 3
T005 272 195 160 738 3567 878 668 591 753 2422 1394 1027 622 276 1292 14856 0 0 0 0 0 0 0 0
V001 56 77 82 520 1053 533 607 352 349 936 1755 1380 494 305 1935 10435 0 0 0 0 0 0 0 0
V002 1 39 62 10 88 223 232 39 59 340 61 41 109 24 -25 1304 0 0 0 0 0 0 0 0
V003 120 151 170 310 968 420 340 244 603 2756 618 296 227 104 546 7873 0 0 0 0 0 0 0 0
T006 177 267 314 840 2110 1176 1179 635 1010 4033 2434 1717 831 433 2456 0 0 0 0 0 0 0 19612 0
T008 449 463 474 1578 5677 2054 1847 1227 1763 6455 3828 2744 1453 709 3748 0 13291 3435 33 2083 -2626 3397 0 34468

Inputs to grain farming

2017 dollar value of top 10 detail level commodities used as inputs to Grain farming industry.

Code
pubdata::get("bea_io", "2023_mu_use-bef-pro_det_2017") %>%
  filter(col_name == "Grain farming", core_matrix) %>%
  arrange(desc(value)) %>%
  head(10) %>%
  select(row_code, row_name, value)
row_code row_name value
115000 Support activities for agriculture and forestry 8007
1111B0 Grain farming 7694
424A00 Other nondurable goods merchant wholesalers 6843
325320 Pesticide and other agricultural chemical manufacturing 4234
325310 Fertilizer manufacturing 3608
324110 Petroleum refineries 2202
531ORE Other real estate 2115
221300 Water, sewage and other systems 1847
484000 Truck transportation 1206
482000 Rail transportation 807