Skip to content

Conversation

wcurrangroome
Copy link
Collaborator

Summary

Implements inflation adjustment functionality for dollar-denominated variables in ACS data to address issue #15.

  • Adds dollar_year parameter to compile_acs_data() function with default value NULL
  • Automatically adjusts dollar variables to a common year for cross-temporal comparisons
  • Includes embedded Consumer Price Index data for years 2009-2024
  • Updates both raw estimates and margins of error proportionally
  • Provides user messaging about inflation adjustments
  • Updates codebook descriptions to document adjustment year

Key Features

  • New Parameter: dollar_year in compile_acs_data()
    • If NULL (default): adjusts to latest year in years parameter
    • If specified: adjusts all dollar variables to that year
  • Variable Support: Covers all major dollar-denominated variables
    • Median household income (by race/ethnicity)
    • Household income quintile thresholds
    • Monthly housing costs
  • Robust Implementation:
    • Handles multi-year datasets automatically
    • Preserves margins of error scaling
    • Updates codebook documentation
    • User-friendly messaging

Test Plan

  • Tests for helper functions (CPI calculations, variable identification)
  • Tests for main function with various parameter combinations
  • Tests for codebook updates and user messaging
  • Edge case testing (single year, multiple years, NULL parameter)

Breaking Changes

None - this is a backward-compatible addition.

🤖 Generated with Claude Code

alenastern and others added 6 commits June 24, 2025 13:11
Tests cover:
- Parameter acceptance
- Helper function behavior
- Dollar variable identification
- CPI adjustment calculations
- Codebook updates
- User messaging

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
…ariables

- Add dollar_year parameter to compile_acs_data() function
- Implement helper functions for CPI data and inflation calculations
- Add logic to identify and adjust dollar-denominated variables
- Update generate_codebook() to include inflation adjustment information
- Add user messaging when inflation adjustment is applied

Features:
- Supports years 2009-2024 with embedded CPI data
- Adjusts both raw estimates and margins of error
- Defaults to latest year when dollar_year=NULL
- Updates codebook descriptions for adjusted variables

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add example showing dollar_year parameter usage
- Update plan to mark completed tasks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants