-
Notifications
You must be signed in to change notification settings - Fork 4
Add 2024 agency, tax code and TIF reports #65
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
base: 2024-data-update
Are you sure you want to change the base?
Add 2024 agency, tax code and TIF reports #65
Conversation
Merge branch '2024-data-update' into kyrasturgill/2024-agency-rate-tif-reports # Conflicts: # data-raw/tif/tif.R
|
Thanks for this! Very helpful work. A Few clarifying questions:
I thought that |
|
Here are my thoughts on your questions:
|
That makes sense to me! If I understand the data model correctly , it strikes me that |
…between consolidated agencies and their new parent agencies
|
@jeancochrane, this is ready for your review!
|
This PR adds the raw data for 2024 tax code rate, agency rate and TIF reports. It also makes necessary adjustments to the data-raw ingest scripts that are necessary on account of changes made to 2024 data structure.
Most changes to the ingest scripts involve slight adjustments to the code for renaming fields. This code was originally written to work assuming the same fields being selected from the report files exist across all years (which are contained in separate files). The introduction of new fields in the 2024 files led to errors within the
rename_with()function when it was returning a vector with length of 1 rather than 0, even when the field did not exist. The work around for this was usingrep()withrename_with():rename_with(~rep("agency_name", length(.x)), any_of(c("authority_name")))which would return empty vector if there were no fields present namedauthority_name.Other changes were removing certain fields no longer present in 2024 reports, and the creation of the field
fund_type_numto account for 2024 changes to fund number structure which are now 6 digits rather than 3.fund_type_numis the first 3 digits offund_num, which should be consistent across all years.fund_numpre-2024 is also now padded with trailing zeros. Because 2024 is now reporting funds at a more detailed level than in prior years, any time trend analysis of funds should usefund_type_num.Something I have not added to the data yet is
agency_num_legacyorauthority_num. I realized that we would need to alter prior years'agency_numandagency_nameto align with the revised 2024agency_num. To avoid altering source data, we could simply have an agency crosswalk added to the db that connects the new agency number, the legacy number and authority number, which would be available for user if they did want to do an analysis of agency extensions or agency rates over time.Lastly, this PR also brings in a new TIF data source - the
pin_tif_distributionwhich is derived from the Clerk's TIF PIN list report.