% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fiscal.R \name{cog_fiscal_periods} \alias{cog_fiscal_periods} \title{Fiscal-year periods behind survey years} \usage{ cog_fiscal_periods(govid, years) } \arguments{ \item{govid}{Character vector of `canonical_govid` values, or a data frame with a `canonical_govid` column.} \item{years}{Integer vector of survey years.} } \value{ Tibble with one row per requested government and year, in the order `govid` x `years`: `canonical_govid`, `year`, `fiscal_year_end` (integer MMDD), `period_start` and `period_end` (Dates, inclusive). } \description{ Returns the calendar months each survey year covers for each government. The corpus's `year` is the Census survey year, and a survey year covers different months for different governments. } \section{The survey-year rule}{ Census assigns each government's fiscal year to a survey year by when the fiscal year ended. Survey year Y holds the fiscal year that ended between July 1 of Y-1 and June 30 of Y. The corpus records each government-year's fiscal year end as `fiscal_year_end`, an MMDD integer such as `630` or `1231`. Survey year 2017 therefore covers, for a county, city or township: * `fiscal_year_end = 630` (June 30): the fiscal year ending June 30, 2017, so July 2016 to June 2017. * `930` (September 30): the fiscal year ending September 30, 2016, so October 2015 to September 2016. * `1231` (December 31): the fiscal year ending December 31, 2016, so January to December 2016. A city with a December year end and a city with a June year end are both "2017" in the corpus, but their figures are six months apart. A September year end is nine months behind a June one. State governments (type 0) follow a different rule: survey year Y holds the fiscal year ending in calendar year Y. For Alabama and Michigan (September 30) that means October 2016 to September 2017, and for Texas (August 31) September 2016 to August 2017. Census's 2004 and 2006 technical documentation lists these three states as exceptions to the June 30 window, and the corpus agrees in survey years 2009 and 2020, the two years checked: their federal aid moves with the 2009 stimulus and the 2020 CARES Act in the same survey years as the June 30 states' does. The same documentation lists the District of Columbia, so it is treated the same way. Checks against the 2009 and 2020 data were inconclusive for it, so that treatment rests on the documentation alone. For New York (March 31) and the 46 states with a June 30 year end, the two rules give the same months. A government can change its fiscal year end, so the periods are looked up per government-year. Where the corpus has no `fiscal_year_end` for a government-year, or the government has no rows that year, the period is `NA`. Most of FY1993 is `NA`: 99% of its government-years have no usable value in the public corpus as of November 2026. So do 5% to 11% in FY1978 and FY1987 to FY1990, and under 3% in every other year. From FY2023 the source files mark some rows as estimates carried forward from an earlier year. The periods here describe the survey year, not the year a carried-forward row's data pertain to. } \examples{ \dontrun{ # A June 30 state, a September 30 state and a September 30 county cog_fiscal_periods( c("130000226087", "010000226085", "121011212191"), years = 2020 ) } } \seealso{ [cog_survey_year()] for the reverse mapping; the `fiscal_period` argument of [cog_spending()], [cog_revenue()] and [cog_balances()] to get the same columns on every row. }