docs: explain survey years where vignettes compare governments (#77)

NEWS.md gains a development-version entry for fiscal_period,
cog_fiscal_periods() and cog_survey_year().

total-spending.Rmd shows that its Florida rollup mixes a June 30 state
(July 2019 to June 2020) with two September 30 counties (October 2018 to
September 2019) under the same 2020. coverage-counters.Rmd counts the
FY2012 fiscal year ends of Georgia cities (273 December 31, 196 June 30,
36 September 30) and what months they cover. population-denominators.Rmd
notes that each cohort year is a survey year. The first two chunks run
against the bundled fixture.

Refs #77

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5
This commit is contained in:
Claude committed 2026-11-04 18:10:48 +00:00
1 parent b6b3e4652a
commit ae21c79de5
4 files changed
+77

No files matched your search

+17
View File
@@ -132,6 +132,23 @@ ga_state <- cog_spending(
ga_state
```
The rollup also mixes fiscal calendars. `year` is the Census survey year, and Census
files a fiscal year under survey year Y when it ended between July 1 of Y-1 and
June 30 of Y. `cog_fiscal_periods()` shows the months each government's 2020 covers:
```{r}
cog_fiscal_periods(
c("120000226351", "121011212191", "121099101897"), # Florida, Broward, Palm Beach
years = 2020
)
```
Florida's state government closes its books on June 30, so its 2020 covers July 2019
to June 2020. Broward and Palm Beach counties close on September 30, so their 2020
covers October 2018 to September 2019, and their figures end nine months before the
state's. Pass `fiscal_period = TRUE` to `cog_spending()` to get these columns on every
row, and see `?cog_fiscal_periods` for the rule and its exceptions.
Now the same rollup, but asking for `expenditure_concept = "total"`:
```{r, error = TRUE}