Rollup scope notes misdescribe towns and complete county territories #89

Open
opened 2026-11-18 09:59:06 -05:00 by jared · 0 comments
Owner

The problem

cog_geographic_rollup() accepts three layers, state, county and city, and .rollup_scope_note() (R/rollup.R) attaches one fixed note per layer. Two of the notes are wrong for a caller that passes a county's whole territory, which is what nss_land's nss_territory_spending() does (Civilytics/nss_land#23, decision 0012 there):

  • Towns and villages are passed as city (there is no other municipal layer), so every New England or Wisconsin town row carries "city proper only; excludes special districts in the same county". A town is not a city, and in Massachusetts the town is the main unit of local government. Middlesex County's territory is 42 towns and 13 cities; Dane County's is 35 towns and 26 cities and villages.
  • The county note says "county totals include areas outside the listed city". When the caller lists every municipality in the county, the county government's area is the area of the cities and towns listed, so the note says the opposite of what is true.

The amounts are unaffected; only the scope_note column is misleading. A reader who trusts the note will think the town figures are for a city proper and the county figure spills beyond the listed places.

What would fix it

Any of these, the maintainer's call:

  1. A municipal (or town) layer beside city, with its own note, chosen by govs_type (3 is township) rather than by the caller.
  2. Notes worded for what the layer is, without assuming the caller listed one city: "the government's own spending; special districts and school districts in the same area are not included".
  3. A way for the caller to say the list is a complete territory, so the county note can say so.

Evidence

nss_land's scripts/territory-check.R against the 2026-11-13 corpus mirror: Middlesex FY2022 54 municipal governments passed as city, Dane FY2022 59 municipal governments as city and the county as county.

## The problem `cog_geographic_rollup()` accepts three layers, `state`, `county` and `city`, and `.rollup_scope_note()` (R/rollup.R) attaches one fixed note per layer. Two of the notes are wrong for a caller that passes a county's whole territory, which is what `nss_land`'s `nss_territory_spending()` does (`Civilytics/nss_land#23`, decision 0012 there): - **Towns and villages are passed as `city`** (there is no other municipal layer), so every New England or Wisconsin town row carries "city proper only; excludes special districts in the same county". A town is not a city, and in Massachusetts the town is the main unit of local government. Middlesex County's territory is 42 towns and 13 cities; Dane County's is 35 towns and 26 cities and villages. - **The county note says "county totals include areas outside the listed city".** When the caller lists every municipality in the county, the county government's area is the area of the cities and towns listed, so the note says the opposite of what is true. The amounts are unaffected; only the `scope_note` column is misleading. A reader who trusts the note will think the town figures are for a city proper and the county figure spills beyond the listed places. ## What would fix it Any of these, the maintainer's call: 1. A `municipal` (or `town`) layer beside `city`, with its own note, chosen by `govs_type` (3 is township) rather than by the caller. 2. Notes worded for what the layer is, without assuming the caller listed one city: "the government's own spending; special districts and school districts in the same area are not included". 3. A way for the caller to say the list is a complete territory, so the county note can say so. ## Evidence `nss_land`'s `scripts/territory-check.R` against the 2026-11-13 corpus mirror: Middlesex FY2022 54 municipal governments passed as `city`, Dane FY2022 59 municipal governments as `city` and the county as `county`.
jared added the
ws
api
type
defect
origin
obligation
labels 2026-11-18 09:59:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Civilytics/uscogdata#89