cog_peer_compare() and cog_geographic_rollup() docs recommend the comparison vignette("coverage-counters") warns against #78

Closed
opened 2026-11-04 12:03:52 -05:00 by jared · 0 comments
Owner

The "Reading coverage" sections of R/peers.R and R/rollup.R (and so man/cog_peer_compare.Rd and man/cog_geographic_rollup.Rd) say the valid comparison is the same category across a census year and a sample year, "where the real-zero component is roughly constant".

The published corpus contradicts this. A census year and a sample year collect different sets of governments, so the collected-with-no-rows group is not constant, and participation differs mostly because the cities differ. vignette("coverage-counters") gives the figures and recommends the opposite: compare census years with each other, or the same governments across years.

Both documents now ship, so a reader of the reference page and a reader of the article get opposite advice.

Fix: replace that paragraph in both roxygen blocks with the vignette's advice, link the vignette, and regenerate the two .Rd files.

Found while landing the vignette for #72.

The "Reading `coverage`" sections of `R/peers.R` and `R/rollup.R` (and so `man/cog_peer_compare.Rd` and `man/cog_geographic_rollup.Rd`) say the valid comparison is the same category across a census year and a sample year, "where the real-zero component is roughly constant". The published corpus contradicts this. A census year and a sample year collect different sets of governments, so the collected-with-no-rows group is not constant, and participation differs mostly because the cities differ. `vignette("coverage-counters")` gives the figures and recommends the opposite: compare census years with each other, or the same governments across years. Both documents now ship, so a reader of the reference page and a reader of the article get opposite advice. **Fix:** replace that paragraph in both roxygen blocks with the vignette's advice, link the vignette, and regenerate the two `.Rd` files. Found while landing the vignette for #72.
jared added the severity/medium
ws
api
type
defect
origin
review
labels 2026-11-04 12:03:52 -05:00
jared closed this issue 2026-11-04 12:26:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Civilytics/uscogdata#78