edfinr 0.2.0
- FY2023 data. Coverage now extends through the
2022-23 school year (fiscal year 2023).
get_finance_data()
defaults to yr = "2023" and accepts years 2012-2023
(including cpi_adj base years).
list_variables() gains an f33_item
column recording the F-33 survey item(s) each F-33-sourced
variable is drawn from (e.g., "F12",
"TCAPOUT / V33"); NA for non-F-33 sources and
edfinr-adjusted measures. The “Data Sources and Methodology” vignette’s
crosswalk table is built from it. Also fixes a typo in the
rev_state_unadj description (TSTREV).
- Documentation overhaul. The “Basic usage” vignette
is now the package’s “Get started” page. “Capital and Facilities” and
“CWIFT” moved to pkgdown-only articles (no longer shipped in the CRAN
package), joined by four new articles: “Data Quality and Comparability”,
“COVID Relief Spending”, “Community and Economic Context”, and “Mapping
School Finance Data”. The CRAN vignettes that download hosted data now
skip evaluation on CRAN machines.
- Capital, debt, and fund-balance variables (F-33).
Added 17 columns: total capital outlay (
exp_cap_total,
exp_cap_total_pp) and its components
(exp_cap_construction, exp_cap_land,
exp_cap_equip_instr, exp_cap_equip_other,
exp_cap_equip_nonspec), interest on debt
(exp_debt_interest), long/short-term debt stocks
(debt_lt_begin, debt_lt_issued,
debt_lt_retired, debt_lt_end,
debt_st_begin, debt_st_end), and fund balances
(fund_bal_debt_svc, fund_bal_bond,
fund_bal_other). exp_cap_total and
exp_cap_total_pp are in the skinny dataset; the rest are
full-only. See the new “Capital and Facilities” vignette.
- CWIFT. Added the NCES EDGE Comparable Wage Index
for Teachers:
cwift_est, cwift_se,
cwift_imputed, and cwift_impute_method
(cwift_est and cwift_imputed are in the skinny
dataset). See the new “CWIFT” vignette.
- District land area and student density (Census
Gazetteer). Added
land_area_sq_mi and
s_per_sq_mi, both in the skinny dataset for all years
2012-2023. land_area_sq_mi is NA (never
Inf) where land area is zero or the LEA has no Gazetteer
boundary (charters, ESAs, state-operated agencies); the Vermont
FY2016-FY2021 Act 46 coverage gap leaves match rates in the 7-12% range
there versus 97%+ elsewhere. Log scales are recommended when plotting
s_per_sq_mi.
- Additional ACS and anomaly fields (skinny).
mean_hhi, gini, owner_pct,
snap_pct, unemp_rate, unadjusted per-pupil
revenue (rev_state_unadj_pp,
rev_local_unadj_pp), raw NCES locale codes
(urbanicity_raw, urbanicity_raw_cat), and the
state-revenue anomaly fields osp_pct and
c11_spike_flag.
- State capital/debt revenue exposed (skinny).
rev_state_cap_debt (F-33 item C11) is the state capital and
debt-service revenue netted out of rev_state, now shipped
in both datasets so the state-revenue adjustment can be reconstructed
directly alongside rev_state_unadj and
c11_spike_flag. Because it feeds the adjustment arithmetic,
it is zero-filled – not NA – for non-reporting districts.
Use caution comparing rev_state_pp across years for
districts where c11_spike_flag is TRUE.
cpi_adj scope. Revenue,
current/capital expenditure flows, exp_debt_interest, and
income variables are adjusted. Debt and fund-balance
stocks (debt_*, fund_bal_*)
and the CWIFT index are returned nominal (never
CPI-adjusted).
- New dictionary categories.
list_variables() now includes "debt" and
"cwift" categories and lists all 124 variables (59 in the
skinny dataset).
- Behavior change: CCD directory attributes now match the
labeled fiscal year. Previous releases joined CCD directory
data one school year forward: fiscal year Y rows carried directory
attributes (
dist_name, county,
state_leaid, cong_dist,
urbanicity, urbanicity_raw,
urbanicity_raw_cat, lea_type,
lea_type_id) from SY Y to Y+1 instead of SY Y-1 to Y. These
columns now come from the directory vintage for the same school year, so
values change wherever an attribute changed between adjacent years, and
FY2023 now uses the final SY 2022-23 directory rather than the SY
2023-24 vintage. The fix also restores the final operating year of
districts that closed: those district-years previously had no directory
match and were silently dropped by the LEA-type exclusion. Alongside it,
the LEA-type screen now tolerates single-vintage agency-type miscodes (a
district-year is excluded only if the following directory vintage agrees
it is not a regular district, supervisory union, or charter), which
keeps real districts – e.g. all 60 MA regional districts in FY2016,
several newly formed AL city districts – from dropping out of single
years.
- Coverage change: MA regional districts restored for
FY2012-FY2015. CCD coded every Massachusetts regional school
district as a service agency (
agency_type 4) for five
consecutive directory vintages, SY 2011-12 through SY 2015-16, with a
correction from SY 2016-17 onward. Because the miscode spans adjacent
vintages, the single-vintage tolerance above only recovers FY2016;
earlier releases had no data for these districts before then. This
release restores them for FY2012-FY2015 via an explicit vetted list of
60 NCES LEA IDs: 236 district-years covering roughly 107,000 to 110,000
students per year (57 districts in FY2012 rising to 60 by FY2014 as
three newly formed regionals phase in). Restored rows pass all other
screens and show clean enrollment continuity into FY2016. Two cautions.
First, lea_type and lea_type_id report what
the source vintage said, so these rows (and the FY2016 rows) carry
lea_type_id 4 (“Service agency”); filtering MA years
2012-2016 on lea_type_id will drop real regional districts.
Second, MA regional vocational-technical districts remain excluded in
every year: F-33 codes their school level 05 from FY2013 onward, outside
the panel’s elementary/secondary/unified scope. Row counts rise slightly
in every year relative to earlier releases, and by an additional 57-60
rows in FY2012-FY2015.
- Behavior change:
exp_cur_total is now sourced
from TCURELSC. In 0.1.x the total was the sum of the ESSA
fund-type items (CE1 + CE2 + CE3). exp_cur_total,
exp_cur_pp, and rev_exp_pp_diff are now
available for nearly all districts in all years 2012-2023. Values shift
slightly where both were reported (the ESSA items exclude payments to
private, charter, and other school systems, so the CE-sum differs from
TCURELSC by more than 2% for roughly 40% of reporting districts). The
CE-based columns remain available as exp_cur_st_loc,
exp_cur_fed, and exp_cur_resa, NA
where states did not report them; missing values still propagate to
NA rather than zero.
- Behavior change: flagged zero-filled missing values are now
NA. F-33 zero-fills some unreported items instead
of using its -1 missing code, marking them with an
FL_* = "M" data-item flag. The cleaning pipeline now
applies those flags to the COVID (exp_covid_*),
capital-detail, debt, fund-balance, CE fund-type, and expenditure-detail
columns. Most visibly, COVID relief spending is NA – not $0
– for all New York districts (including NYC) in every year and for
roughly a third to half of California districts from FY21 onward.
Genuine reported zeros are unchanged, and column sums are unaffected
(only zero-filled values became NA; the small number of
cells carrying real values under a missing/not-applicable flag are
retained). The revenue-adjustment inputs are deliberately excluded, so
adjusted revenue coverage is unchanged; osp_pct and the
exp_pay_* columns retain zero-filled values where states
did not report (see the cleaning-repo README).
- Hosted data format. The hosted datasets are now
gzip-compressed Parquet (read with
nanoparquet) instead of
.rds. This is transparent to callers.
- Per-year downloads.
get_finance_data()
now downloads only the requested year(s) – each year is a separate
hosted file of roughly 3-6 MB – so single-year and short-range requests
transfer far less than the full panel. yr = "all" still
fetches the entire history from one combined file.
- Download robustness. Downloads now go to a
temporary file that is renamed into the session cache only on success,
so an interrupted transfer can no longer leave a partial file behind
that later calls treat as cached. The download timeout is temporarily
raised to at least 600 seconds during transfers (R’s 60-second default
cannot complete the 38-54 MB
yr = "all" files on slower
connections); a higher user-set options(timeout = ) is
respected. A cached file that fails to read is deleted with a clear
message instead of failing on every subsequent call, and download
failures now carry the condition class
edfinr_download_error.
- Friendlier input handling.
geo values
are whitespace-trimmed and "all" is case-insensitive, so
geo = "KY, OH" and geo = "All" work; vector or
NA arguments produce clear errors naming the argument
instead of raw R errors; and list_variables() rejects an
unknown category instead of silently returning zero
rows.
edfinr 0.1.1
edfinr 0.1.0