# Data library - NJDOE TGES Fund Balance (Indicators 20 & 21)

Reporter's notebook for the Taxpayers' Guide to Education Spending's two
fund-balance indicators: what "Budgeted vs. Actual" actually measures (it
is **not** a district's total reserve), how three report editions stitch
together four fiscal years, and every format quirk worth knowing before you
read a district's row as its bank balance.

```toml ergo
[dataset]
ergo = "0.4"
slug = "tges-fund-balance"
title = "NJDOE TGES Fund Balance (Indicators 20 & 21)"
publisher = "New Jersey Department of Education"
subject = "https://www.nj.gov/education/guide/"
source_url = "https://www.nj.gov/education/guide/"
pitfall = "'Actual (Used) or Generated' in Indicator 20 is a flow — the year's fund-balance activity per the audit — not a stock: it is not the district's total year-end reserve, and a negative value means the district *drew down* reserves that year, not that it ran a deficit."
status = "archived"
confidence = "A"
updated = "2026-08-03"
implementation = "https://github.com/lavallee/njschooldata"

[dataset.coverage]
years = "2020-21 → 2023-24 (4 school years, from 3 report editions: 2023, 2024, 2025)"
grain = "school year × district"
entities = "653-658 NJ operating districts and charter schools per school year (unlike state-aid, TGES includes charters)"

[dataset.access]
keys = ["fiscal_year", "district_code"]
```

## Where this data now comes from

Aquifer owns the acquisition, the three report editions, the container and
encoding drift, and the county-code derivation as `nj-tges-fund-balance`. As of
2026-08-03 njschooldata has no page or calculation that consumes this family,
so its consumer adapter and lock were retired rather than kept as an unused
warehouse branch. This notebook remains as an archived source and semantics
record; a future feature must adopt a current Aquifer release through a new,
tested consumer contract.

That decision matters more than it looks. The state revises figures between
editions — ten district-years differ, nine of them in excess surplus, one
falling from $29,314,734 to $0 — so the adapter takes the latest edition that
publishes a district-year and records the rule rather than leaving it to insert
order, which is what the retired builder did.

## What it is

The Taxpayers' Guide to Education Spending (TGES) is NJDOE's annual
per-district comparative-spending report, indicators 1-21 plus a
transportation-efficiency file. This page covers only Indicator 20
("Comparison of Budgeted General Fund Balance vs. Actual (Used) or
Generated") and Indicator 21 ("General Fund Excess Surplus").

Per NJDOE's own guide page for each report edition:

- **Indicator 20** compares what a district *planned* to use from its
  general fund balance in its original budget against the *actual*
  fund-balance activity for that year, per its audited financial report.
  `Budgeted Balance` is the amount of fund balance appropriated as a
  revenue source in the original budget. `Actual (Used) or Generated` is
  signed: **negative** means the district drew down reserves to cover
  operations that year; **positive** means it accumulated additional
  reserves. Neither column is the district's total fund balance — see
  [Actual balance is a flow, not the district's total reserve](#actual-balance-is-a-flow-not-the-districts-total-reserve).
- **Indicator 21** reports the district's audited "undesignated general
  fund balance in excess of 2% [of budgeted expenditures] for regular
  districts and 6% for county vocational districts," per N.J.S.A.
  18A:7F-7. Excess surplus identified at a given June 30 must be
  appropriated into the budget two years later (e.g., excess identified
  June 30, 2023 must be budgeted for 2024-25) — a statutory fact about the
  dataset, not this project's rendering choice.

Each TGES report edition (named for its publication year, e.g. "the 2025
TGES") republishes **two** fiscal years of Indicators 20/21: the one two
years back and the one immediately prior. Loading three consecutive
editions (2023, 2024, 2025) therefore yields four distinct fiscal years —
2020-21 through 2023-24 — with the newest edition's figures winning where
editions overlap. See
[Consecutive report editions overlap by one fiscal year](#consecutive-report-editions-overlap-by-one-fiscal-year).

## Access

2024 and 2025 publish one `.xlsx` per indicator at
`https://www.nj.gov/education/guide/docs/<report_year>/CSG20.xlsx` (and
`CSG21.xlsx`). 2023 and earlier instead bundle *every* TGES indicator's
raw data as CSVs inside one zip,
`https://www.nj.gov/education/guide/docs/<report_year>_TGES.zip`
(`CSG20.CSV`/`CSG21.CSV` inside it). See
[Container format switches between zip-of-CSVs and per-indicator xlsx](#container-format-switches-between-zip-of-csvs-and-per-indicator-xlsx).
2022 and 2021 guide pages 404 at the obvious URL pattern; going back further
than 2023 wasn't attempted for this import.

The archived producer read `.xlsx` editions with `openpyxl`. It decoded the
2023 zip's CSVs with a `utf-8-sig` -> `cp1252` -> `latin-1` fallback — see
[2023 CSVs are not valid UTF-8](#2023-csvs-are-not-valid-utf-8).

## Structure

One row per district-year in `tges_fund_balance`:

```sql
CREATE TABLE tges_fund_balance (
  fiscal_year TEXT,               -- school year, e.g. "2023-24"
  report_year INTEGER,            -- which TGES edition (2023/2024/2025) last supplied this row
  operating_type TEXT,            -- NJDOE's peer-comparison group label, e.g. "G. K-12 / 3501 +"
  county_code TEXT, county_name TEXT,
  district_code TEXT, district_name TEXT,
  budgeted_fund_balance REAL,     -- CSG20: fund balance appropriated in the ORIGINAL budget
  actual_fund_balance REAL,       -- CSG20: audited (used)/generated fund-balance activity; signed
  excess_surplus REAL,            -- CSG21: audited excess over the 2%/6% statutory cap
  source_url TEXT,
  PRIMARY KEY (fiscal_year, district_code)
);
```

`report_year` records provenance (which edition's numbers are currently
stored) rather than participating in the primary key — the loader runs
editions oldest-to-newest so a later edition's audited figure always wins
for a fiscal year both editions cover.

## Joins

The archived rows joined to profile districts on `district_code` (zero-padded
to 4 digits). Aquifer derived `county_code` from TGES's county name so it
matched the enrollment and budget families. Unlike `state-aid`, **charter
schools are included** here (own `operating_type` group, `"K. Charter/Ren"` in
the loaded years) — TGES indicators cover every district and charter that
files a budget, not just formula-funded LEAs.

## Issues

### Actual balance is a flow, not the district's total reserve

```toml ergo
[issue]
id = "actual-balance-is-a-flow-not-a-stock"
title = "'Actual (Used) or Generated' is the year's audited fund-balance movement, not the district's total year-end reserve"
effect = "misleads"
core = true
type = "definitional"
status = "open"
detection = "NJDOE's own Indicator 20 description: 'This indicator compares what districts planned to use from fund balance in their original budgets against the actual fund balance activity during the fiscal year based on audited financial reports. Negative values = district drew down reserves to cover operations; positive values = district accumulated additional reserves during the year.'"
misuse = "Reading actual_fund_balance as the district's total unrestricted fund balance (a stock) rather than that year's use-or-generate movement (a flow). A district with a healthy multi-million-dollar reserve can post a large negative actual_fund_balance in a year it drew the reserve down for a one-time cost, and a district under fiscal stress can still post a positive value in a year it happened to underspend."

[issue.scope]
all = true
columns = ["actual_fund_balance", "budgeted_fund_balance"]
```

Neither `budgeted_fund_balance` nor `actual_fund_balance` is a balance
sheet. `budgeted_fund_balance` is always the *magnitude* the district
planned to appropriate from reserves as a budget revenue line;
`actual_fund_balance`'s sign tells you whether the year's audited activity
was a net draw (negative) or a net build (positive). See
[Validation](#validation) for a worked SOMSD example.

### Consecutive report editions overlap by one fiscal year

```toml ergo
[issue]
id = "report-year-overlap"
title = "Each TGES edition republishes the immediately preceding fiscal year alongside its newest one"
effect = "context"
type = "coverage"
status = "monitor"
detection = "The 2025 edition's '2022-23' columns match the 2024 edition's '2022-23' columns exactly for every spot-checked district (e.g. River Edge Boro FY2022-23 Budgeted Balance: 6,121,488 in both editions). The 2024 edition's '2021-22' pair likewise matches the 2023 edition's second-year pair (DE320/DE420) exactly."
misuse = "Loading two editions independently and summing or averaging their overlap-year rows double-counts that fiscal year, or trusting an older edition's figure for a year a newer edition has since re-audited/republished."

[issue.scope]
all = true
```

The retired consumer projection selected the newest edition for each
`(fiscal_year, district_code)`, so the newest published audited number won for
any year two editions both covered. One side effect found while validating that
projection: **5 charter schools** present in the 2023 edition's
2021-22 data (Peoples Preparatory, Achieve Community, Environment
Community, Freedom Prep, University Heights) do not reappear in the 2024
edition at all, so their 2021-22 row is permanently the 2023 edition's
figure — never confirmed or revised by a later audit in this loaded
range. Small-charter turnover (closure, merger, non-renewal) is the likely
cause; not investigated further.

### Container format switches between zip-of-CSVs and per-indicator xlsx

```toml ergo
[issue]
id = "container-format-drift"
title = "2023 ships every TGES indicator as CSV inside one big zip; 2024/2025 ship one xlsx per indicator"
effect = "breaks"
type = "format"
status = "monitor"
detection = "https://www.nj.gov/education/guide/docs/2023/CSG20.xlsx 404s. The 2023 file only exists as CSG20.CSV inside https://www.nj.gov/education/guide/docs/2023_TGES.zip, alongside all other indicators (CSG1-CSG19, DETAIL_*, SUMMARY, etc.). 2024 and 2025 both serve CSG20.xlsx/CSG21.xlsx directly."

[issue.scope]
years = "2023 report edition and (untested) earlier"
```

`fetch_report()` branches on a per-edition `kind` ("xlsx" vs "zip") in the
`REPORTS` config rather than inferring it from a URL probe — 2022 and 2021
guide pages 404 outright, so whether they follow the 2023 zip pattern or
something else wasn't verified; only 2023-2025 are loaded.

### 2023 CSVs are not valid UTF-8

```toml ergo
[issue]
id = "cp1252-csv-decode"
title = "The 2023 edition's CSG20.CSV/CSG21.CSV contain cp1252 smart quotes that break a strict UTF-8 decode"
effect = "corrupts"
type = "format"
status = "monitor"
detection = "raw.decode('utf-8') raises UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 45526: invalid start byte — the byte sits inside \"Camden's Promise Charter School\", where 0x92 is a cp1252 right single quotation mark."
misuse = "A strict UTF-8 read either raises outright or, with an error-tolerant decode, silently mangles every district name built with an apostrophe."

[issue.scope]
years = "2023 report edition (CSG20.CSV, CSG21.CSV)"
```

`decode()` mirrors `build_budget_db.py`'s own `decode()`: try
`utf-8-sig`, then `cp1252`, then `latin-1`, falling back to a lossy
`utf-8` replace only if all three raise.

## Validation

```toml ergo
[validation]
date = "2026-07-12"
method = "spot-checked SOMSD and Millburn against the loaded tges_fund_balance rows and computed a budget-vs-actual variance for SOMSD's latest year"
result = "both districts' actual_fund_balance values fall in the single-digit millions across all four loaded years, as expected; SOMSD's 2023-24 audited draw ($5.6M) came in far under its budgeted draw ($40.2M)"
```

SOMSD (district_code `4900`) and Millburn Township (`3190`), both Essex
County, across the four loaded fiscal years:

| District | Fiscal Year | Budgeted Fund Balance | Actual Fund Balance | Excess Surplus |
|---|---|---:|---:|---:|
| SOMSD | 2020-21 | $27,668,480 | $9,259,167 | $7,520,287 |
| SOMSD | 2021-22 | $36,927,647 | $1,856,461 | $7,648,869 |
| SOMSD | 2022-23 | $38,784,108 | $1,414,614 | $7,044,348 |
| SOMSD | 2023-24 | $40,198,722 | **-$5,616,115** | $6,893,128 |
| Millburn | 2022-23 | $24,322,325 | $1,323,668 | $2,300,000 |
| Millburn | 2023-24 | $25,645,993 | -$857,100 | $2,300,000 |

**SOMSD budget-vs-actual variance, 2023-24** (recall `budgeted_fund_balance`
is always a planned-*use* magnitude, while `actual_fund_balance`'s sign
marks a draw as negative): treating the budgeted figure as an implied
planned draw of `-$40,198,722`, the variance is
`actual_fund_balance - (-budgeted_fund_balance)` =
`-5,616,115 + 40,198,722` = **+$34,582,607** — SOMSD's original budget
assumed it would draw its fund balance down by $40.2M; the audit found it
actually drew down only $5.6M, a $34.6M more-favorable-than-planned
outcome. This is an informal sanity computation for this notebook, not an
NJDOE-published figure.

## Provenance

Loaded 2026-07-12 from three TGES report editions: 2025 (`.xlsx`, covering
2022-23 and 2023-24), 2024 (`.xlsx`, covering 2021-22 and 2022-23), and
2023 (zip-of-CSVs, covering 2020-21 and 2021-22).

## Changelog

```toml ergo
[change]
date = "2026-07-12"
note = "Page created: tges_fund_balance table loaded from the 2023/2024/2025 TGES editions (school years 2020-21 through 2023-24), 4 issues registered covering the flow-vs-stock semantics of 'Actual (Used) or Generated', the one-year report-edition overlap (plus a 5-charter coverage gap found while validating it), the CSV/xlsx container-format switch, and the 2023 CSVs' cp1252 encoding. Validated SOMSD/Millburn actual_fund_balance values land in the single-digit millions and computed SOMSD's 2023-24 budget-vs-actual variance."
issues = ["actual-balance-is-a-flow-not-a-stock", "report-year-overlap", "container-format-drift", "cp1252-csv-decode"]
```

```toml ergo
[change]
date = "2026-08-03"
note = "Archived the njschooldata consumer surface: no current renderer or calculation reads TGES, so the unused adapter, lock, and warehouse family were retired. Aquifer retains the reproducible source release; this page remains the semantics and provenance record."
```
