Commit Graph
3 Commits
Author SHA1 Message Date
Claude 7e4faf3042 docs: a sheriff-contract city is not a real zero for Police (#80)
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
2026-11-04 17:52:07 +00:00
Claude e3cb9d508d docs: ground the census-vs-sample advice in the published corpus (#72)
Checked against the published corpus (build of 2026-10-26) through the
public API:

- FY2022 Georgia cities, Police: 567 expected, 535 collected, 393
  reporting. The 174-city gap is 32 not collected and 142 collected with
  no Police rows. The FY2022 section now states the split.
- All US cities: Police participation among collected cities is 0.70,
  0.73 and 0.72 in FY2012, FY2017 and FY2022, and 0.93 to 0.95 in every
  sample year FY2013-FY2023. Among the 3,867 cities collected in both
  FY2022 and FY2021 it is 0.929 and 0.935; Fire, Libraries and Housing &
  Community move by 0.01 or less on the same cities.

A census year and a sample year collect different sets of governments,
so the census-vs-sample section now recommends comparing census years
with each other, or the same governments across years, and adds a
fixture chunk that measures participation over the 99 Georgia cities
collected in both FY2012 and FY2019 (0.97 and 0.94).

The fixture caveat now says what data-raw/regenerate_fixture_corpus.R
does: each fixture year is a full copy of the published partition. Its
FY2012 and FY2019 Georgia Police counts match the published corpus; the
newer crosswalk lists 567 Georgia cities where the fixture lists 566.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5
2026-11-04 15:50:53 +00:00
Claude 4bfb6eb2b3 docs: add a vignette on reading provenance$coverage (#72)
vignettes/coverage-counters.Rmd explains the three per-year counters that
cog_geographic_rollup() and cog_peer_compare() attach as
provenance$coverage, using the definitions in .coverage_table(),
R/rollup.R and R/peers.R: n_units_expected (the ids passed, or the peers),
n_units_collected (of those, how many have any row in the spending long
view that year) and n_units_reporting (of those, how many have a row in
the requested category). It splits the named governments into three
groups, defines the collection rate and category participation, and
shows that reporting / expected is their product.

The evaluated chunks run against the bundled fixture and say so: Georgia
cities and Police across FY2011, FY2012, FY2019 and FY2020, a peer
comparison, and the census, consistent and per_capita effects. The FY2022
example from the reference pages needs the published corpus and is not
evaluated, following population-denominators.Rmd.

The article is added to the pkgdown Concepts index.

Closes #72

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5
2026-11-04 14:25:01 +00:00