Repository navigation
docs: a sheriff-contract city is not a real zero for Police (#80) - #3
Conversation
The coverage docs said a city that contracts policing to the county sheriff has no Police rows and that its Police spending "is a real zero". Checked against the published corpus (build of 2026-10-26) through the public API for 34 cities with documented sheriff contracts (Los Angeles, San Diego and Orange counties, CA; King County, WA) in FY2012, FY2017 and FY2022: all 102 city-years carry Police spending. 93 have direct Police rows (E62/F62/G62) and so count as reporting. The other nine report the contract payment only as intergovernmental Police expenditure (M62), which the "primary" and "direct" concepts leave out, so they land among the collected governments with no Police rows while paying for policing. The vignette's three-group list, the n_units_collected and n_units_reporting bullets in cog_peer_compare(), cog_geographic_rollup() and .coverage_table(), and the FY2022 Georgia paragraphs now say that a collected government with no rows in a category can still spend on it, and that a contract city lands in that group only when it reports no direct Police spending. man/ regenerated with roxygen2 7.3.3. No code changed. Closes #80 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5
|
Thanks for this — and one thing worth knowing before it happens. This repository is a mirror. Development happens on Gitea at Because that merge preserves your commits at their original SHAs, GitHub will
If it is not going to be merged, you will get an actual reply saying so. Substantial contributions get a Full details: CONTRIBUTING.md. |
Gitea issue #80
Finding
The docs said a city that contracts policing to the county sheriff lands among collected governments with no Police rows, and that its Police spending "is a real zero". The published corpus does not support either half of that.
I checked 34 cities with documented sheriff contracts (Los Angeles, San Diego and Orange counties, CA; King County, WA) in FY2012, FY2017 and FY2022. All 102 city-years were collected, and every one carries Police spending:
E62/F62/G62) and intergovernmental (M62)M62) only"primary"concept the city counts as reporting. It is not in the "collected, no rows" group at all.M62, payments to other local governments)."primary"and"direct"leave that out, so these land in the "collected, no Police rows" group. They are still paying for policing: $17,000 to $15.6 million.The sample is 34 cities in two states, four sheriffs and three census years, not a random draw. The corrected docs report what was found and for how many cities. They do not claim a rate for all contract cities.
What changed (docs only; no code)
vignettes/coverage-counters.Rmdexpenditure_concept = "total"for one government.R/peers.R,R/rollup.R(the "Readingcoverage" section; former lines 254 and 74)n_units_reportingbullet is corrected.n_units_collectedbullet ("separating sampling from real zeros") and the ratio sentence ("real zeros (collected but spends nothing in your category)") made the same claim, so they are reworded too.R/coverage.R(.coverage_table()roxygen,@noRd; former line 101): the same bullet and ratio-sentence corrections. The two code comments inside the function body (lines 137 and 145) are untouched, per the brief.man/cog_peer_compare.Rd,man/cog_geographic_rollup.Rd: regenerated with roxygen2 7.3.3, which matchesRoxygenNote, soDESCRIPTIONis unchanged. Regeneratingmainwithout these edits produces no diff, so the.Rdchanges are only these edits.Per-city table
Source: public API, per-government route
GET /api/v1/governments/{govid}/spending?years=2012,2017,2022&category=Police&expenditure_concept=total. Corpus build2026-10-26T22:13:24Z, pipeline commitfccd87c, schema 7, the same in every response. "Collected" means the city has any Direct row that year (GET /api/v1/spending?category=All Categories&expenditure_concept=direct). Amounts are full US dollars.Contract citations
I found these through web search. The sandbox's network policy blocks every cited host, so I could not open the pages; each citation rests on the search tool's extract. LASD = Los Angeles County Sheriff's Department, SDSO = San Diego County Sheriff's Office, OCSD = Orange County Sheriff's Department, KCSO = King County Sheriff's Office.
Verified
M62= $8,473,000 on/governments/062037183827/spending?expenditure_concept=total.fccd87c, schema 7).M62in FY2022: none of the 34 cities has anM62row; all report direct Police rows (Shoreline only $72,000 ofF62)..Rdfiles, andDESCRIPTIONis unchanged. The full suite passes locally (1,108 expectations, 0 failed, 2 opt-in live-corpus skips). The vignette renders. As before, the sandbox can't reachextensions.duckdb.org, so local runs dropcog_open()'sINSTALL httpfs; LOAD httpfs;line in a scratch copy; that is not in the commit.Not verified
E62rows are. For the cities with large direct Police rows (e.g., Palmdale, Santa Clarita), the size suggests the contract payment is coded as direct operations. Nothing here distinguishes contract payments from city-employed staff.M89(intergovernmental, "General Government"), against $11,019,000 ofM62Police in FY2017. That may be the sheriff contract filed under a catch-all code outside Police. It is not confirmed.Noticed, not changed
Possible double counting in FY2017. 22 of the 34 cities carry both direct (
E/F/G62) and intergovernmental (M62) Police in FY2017. In nine of them the smaller amount is at least 80% of the larger:If both describe the same contract payment,
expenditure_concept = "total"double-counts it for those city-years. This needs a data-quality issue against the pipeline.Coding shift between FY2017 and FY2022. No city in the sample has
M62in FY2022, while most King County cities report the contract asM62in FY2012 and FY2017.Remaining "real zero" wording in code and tests:
R/coverage.R:137and:145tests/testthat/test-coverage-disclosure.R:114(test name) and:120(comment)tests/testthat/test-all-categories-rollup.R:54(comment)🤖 Generated with Claude Code
https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5