Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR examine tmd vs cd us totals #301

Merged
merged 33 commits into from
Nov 18, 2024
Merged

Conversation

donboyd5
Copy link
Collaborator

@donboyd5 donboyd5 commented Nov 18, 2024

This PR does not change any python code.

This PR modifies the R project prepare to create and save the file cd_tmd_irs_compare.csv (in the cds/intermediate folder). This file has, for a set of tmd variables that have been mapped to published IRS Congressional District variables:

  • counts and weighted values as published by the IRS for 2021, by AGI range, for the U.S. as a whole calculated from CD data (however it does not have values for individual CDs) (target)
  • counts and weighted values calculated from the tmd file for 2021, by AGI range, for the U.S. as a whole (wtdvalue)
  • diff: wtdvalue - target
  • pdiff: diff / target

The purpose of this file is to make it easy to see which published CD values do not correspond well to the tmd data.

At present, the code does not produce any formal tables. It simply constructs and saves the comparison data, and a chunk in the file cd_compare_us_totals_tmd_vs_irs_published.qmd allows interactive examination of the comparison file. Eventually, this section of the R project will be expanded to include more variables and will present formal tables.

@donboyd5 donboyd5 marked this pull request as ready for review November 18, 2024 22:44
@donboyd5 donboyd5 merged commit f1c7c21 into master Nov 18, 2024
2 checks passed
@donboyd5 donboyd5 deleted the pr-examine-tmd-vs-CD-US-totals branch November 18, 2024 22:44
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.

1 participant