Repository navigation
docs: check the survey-year rule against the 2009 stimulus (#77) - #5
Conversation
A second natural experiment for the state-government rule in R/fiscal.R, using IG Federal revenue from the public API (corpus build 2026-10-26, fccd87c), survey years 2006-2011: - Alabama and Michigan (September 30) and Texas (August 31) jump in survey year 2009 (+18.0%, +22.2%, +12.3%) and slow in 2011 (-4.7%, +3.9%, +4.3%), as the June 30 states do (median +12.4%, +3.6%). Under the plain rule their 2009 would end in 2008, before the stimulus, and their 2011 would be the full stimulus year. - 15 large September-30 cities and counties jump in 2011 (median +17.7%, against +2.1% and +3.1% in 2009 and 2010), as the plain rule predicts. - D.C. is inconclusive again: its 2009 is flat (+4.1%), like the plain rule, but its 2011 falls (-0.9%), like the documented one. The data agrees with the code, so the rule and .SURVEY_YEAR_SAME_YEAR_GOVIDS are unchanged. The header comment and the "survey-year rule" section now cite survey years 2009 and 2020 for the state rule and say D.C. was inconclusive in both. man/ regenerated with roxygen2 7.3.3. Refs #77 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 #77 (
Refs #77; step 4 remains open)Result
The 2009 stimulus (ARRA, signed February 17, 2009) is a second natural experiment for the state-government rule in
R/fiscal.R, after the CARES Act in survey year 2020.The data agrees with the code, so the rule and
.SURVEY_YEAR_SAME_YEAR_GOVIDSare unchanged. Only the evidence statements in the docs change.Data
IG Federal revenue (
category = "IG Federal") from the public API, corpus build2026-10-26T22:13:24Z, pipelinefccd87c, schema 7:GET /api/v1/revenue?type=state&years=2006,...,2011&category=IG%20Federal&format=csv&limit=50000GET /api/v1/governments/112001124214/revenue?years=2006,...,2011&category=IG%20Federal(D.C.)GET /api/v1/revenue?govid=<15 ids>&years=2006,...,2011&category=IG%20Federal&format=csv&limit=50000I added survey year 2006 to give one more pre-stimulus baseline.
State governments and D.C.:
15 large September-30 local governments: San Antonio, Dallas, Austin, Fort Worth, Jacksonville; Miami-Dade, Broward, Palm Beach, Hillsborough, Orange FL, Pinellas, Bexar, Tarrant, Dallas County, Travis. All are
930in the fixture's FY2011, FY2012, FY2019 and FY2020. Fort Worth has no FY2006–FY2007 rows.What each rule predicts
For a September-30 state government:
Texas (August 31) is the same, one month earlier.
What else could move these numbers
I looked at these before relying on the comparison.
What changed
Docs only; no code. The rule and
.SURVEY_YEAR_SAME_YEAR_GOVIDSare untouched.R/fiscal.R, header comment: cites both survey years for the state rule and says D.C. was inconclusive in both.R/fiscal.R, "The survey-year rule" roxygen section: "the corpus agrees in survey year 2020, the one year checked" becomes "survey years 2009 and 2020, the two years checked". "That treatment has not been checked against the data" (D.C.) becomes "Checks against the 2009 and 2020 data were inconclusive for it, so that treatment rests on the documentation alone."man/cog_fiscal_periods.Rd,man/cog_survey_year.Rd: regenerated with roxygen2 7.3.3, which matchesRoxygenNote.DESCRIPTIONis untouched.tests/testthat/test-fiscal-period.Rpasses locally (85 expectations) on a scratch copy with the usual offlinehttpfspatch, andtools::checkRd()is clean on both pages.Verified
2026-10-26,fccd87c).fiscal_year_end(930) in FY2011, FY2012, FY2019 and FY2020, from the fixture.Not verified
fiscal_year_endfor FY2006–FY2010. I assumed the state governments, D.C. and the 15 local governments kept the values seen in FY2011 onward. Census documentation gives the same four state year ends in 2004, 2006 and 2022.🤖 Generated with Claude Code
https://claude.ai/code/session_01Qbe6u2h83wgZdTgJgE4Xh5