Last observation: Q2 2026 (N = 26) · 2025 (N = 26)
First observation: 1930 (N = 26) · Q2 1947 (N = 26)
Last data update: 23 sept. 2026, 21:38
Last compile: 23 sept. 2026, 21:41

T10102_A |>
year_to_date() |>
mutate(year = year(date)) |>
filter(year %in% c(1938, 1958, 1978, 1998, 2018)) |>
group_by(year) |>
mutate(value = round(DataValue, 2)) |>
ungroup() |>
select(LineNumber, LineDescription, year, value) |>
spread(year, value) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}T10102_Q |>
quarter_to_date() |>
filter(LineNumber %in% c(2, 7, 15, 22),
date >= as.Date("1990-01-01")) |>
mutate(LineDescription = factor(LineDescription,
levels = c("Personal consumption expenditures",
"Gross private domestic investment",
"Net exports of goods and services",
"Government consumption expenditures and gross investment"),
labels = c("Consumption", "Investment", "Net exports", "Government"))) |>
ggplot() + theme_minimal() +
geom_col(aes(x = date, y = DataValue, fill = LineDescription), width = 80) +
geom_line(data = T10102_Q |> quarter_to_date() |>
filter(LineNumber == 1, date >= as.Date("1990-01-01")),
aes(x = date, y = DataValue), color = "black") +
geom_hline(yintercept = 0, linetype = "dashed", color = "grey50") +
scale_x_date(breaks = seq(1930, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_fill_manual(values = viridis(4)) +
theme(legend.title = element_blank(),
legend.position = "bottom") +
ylab("Contribution, pp, SAAR (black = GDP growth)") + xlab("")
T10102_Q |>
quarter_to_date() |>
filter(LineNumber %in% c(8, 14),
date >= as.Date("1990-01-01")) |>
ggplot() + theme_minimal() +
geom_line(aes(x = date, y = DataValue, color = LineDescription)) +
geom_rect(data = nber_recessions |>
filter(Peak > as.Date("1990-01-01")),
aes(xmin = Peak, xmax = Trough, ymin = -Inf, ymax = +Inf),
fill = 'grey', alpha = 0.5) +
geom_hline(yintercept = 0, linetype = "dashed", color = "grey50") +
scale_x_date(breaks = seq(1930, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_color_manual(values = viridis(2)) +
theme(legend.title = element_blank(),
legend.position = "bottom") +
ylab("Contribution, pp, SAAR") + xlab("")