All adjustment series were pulled from FRED, the Federal Reserve Bank of St. Louis economic data platform https://fred.stlouisfed.org/. For series that have monthly observations, the first month of each year is the one used as the “year” value.
The data we use is listed below with the code necessary to pull it from FRED listed in parenthesis:
Consumer Price Index (CPIAUCSL), which measures broad changes in consumer prices and expresses values in real purchasing-power terms;
State and Local Government Price Deflator (A829RD3Q086SBEA), which reflects price changes for goods and services purchased by state and local governments;
the Producer Price Index for Government Purchases (WPSFD49406), which measures changes in the cost of nondefense government purchases;
Illinois population (ILPOP), which converts totals to a per-resident basis; and
Illinois Gross State Product (ILNGSP), which compares fiscal totals to the size of the state economy.
Show code
library(tidyverse)library(cmapplot) # for recession line functionlibrary(fredr) # pulls data from FRED# Values are in millions of dollars.totals <- readxl::read_xlsx("data/FY2025 Files/summary_file_FY2025_2026-01-23.xlsx",sheet ="aggregated_totals_long")
Show code
# Index data from FRED.# You need an API key from the FRED website to pull the data.# Store the key in your .Renviron file as FRED_API_KEY="your_key_here".fred_api_key <-Sys.getenv("FRED_API_KEY")if (fred_api_key =="") {stop("FRED_API_KEY is not set. Add it to your .Renviron file.")}fredr_set_key(fred_api_key)series_ids <-c("ILNGSP", "CPIAUCSL", "WPSFD49406", "ILPOP", "A829RD3Q086SBEA")fred_data <-map_dfr( series_ids,~fredr(series_id = .x,observation_start =as.Date("1900-01-01") )) |>mutate(year =year(date),month =month(date) ) |>filter(year >=1998) |>filter( (series_id =="CPIAUCSL"& month ==1) | (series_id =="WPSFD49406"& month ==1) | (series_id =="A829RD3Q086SBEA"& month ==1) | series_id =="ILPOP"| series_id =="ILNGSP" ) |>select(year, series_id, value) |>pivot_wider(id_cols = year,names_from = series_id,values_from = value )write_csv(fred_data, "inputs/fred_data_for_index.csv")
18 Adjusted by State and Local Government Price Deflator
This plot follows the Excel formula nominal value * S&L price deflator base-year value / S&L price deflator current-year value. The output is plotted in billions of base-year dollars.
Show code
sbea_base <-get_base_value(totals2, "A829RD3Q086SBEA", base_year)plot_data <- totals2 |>mutate(adj_value = Dollars * (sbea_base / A829RD3Q086SBEA) /1000) |>group_by(Year, type) |>summarize(adj_value =sum_keep_na(adj_value), .groups ="drop") |>filter(!is.na(adj_value))make_base_plot(plot_data = plot_data,title ="Adjusted by State and Local Government Price Deflator (A829RD3Q086SBEA)",y_label =paste0("Billions of ", base_year, " dollars"),y_scale =scale_y_continuous(labels = scales::label_dollar()))
19 Adjusted by Producer Price Index for Government Purchases
The PPI series starts later than the other series, so years with missing PPI values are dropped from this plot.
Show code
ppi_base <-get_base_value(totals2, "WPSFD49406", base_year)plot_data <- totals2 |>mutate(adj_value = Dollars * (ppi_base / WPSFD49406) /1000) |>group_by(Year, type) |>summarize(adj_value =sum_keep_na(adj_value), .groups ="drop") |>filter(!is.na(adj_value))make_base_plot(plot_data = plot_data,title ="Adjusted by Producer Price Index for Government Purchases (WPSFD49406)",y_label =paste0("Billions of ", base_year, " dollars"),y_scale =scale_y_continuous(labels = scales::label_dollar()))