-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor agency crosswalk and add agency fund crosswalk #89
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?
Changes from all commits
524af6a
e15966c
11e356a
dfc374a
0acb12b
7b3f3b4
6f23a7d
cde31f6
8f229c3
4f57fe3
c322ba6
0ff189d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,11 +41,15 @@ The main changes that the Clerk and the Treasurer made in 2024 include: | |
| - General assistance funds | ||
| - Road and bridge funds | ||
| - Library funds | ||
| - To see the full list of agencies that changed in this manner in 2024, | ||
| run the following SQL query against the 2024 PTAXSIM database: | ||
| - To see the full list of agencies and funds that changed in this manner in | ||
| 2024, run the following SQL queries against the 2024 PTAXSIM database: | ||
|
|
||
| ```sql | ||
| SELECT * FROM agency_info WHERE agency_change_24 | ||
| -- See all agencies that have changed to funds | ||
| SELECT * FROM agency_crosswalk; | ||
|
|
||
| -- See the same change at the fund level | ||
| SELECT * FROM agency_fund_crosswalk; | ||
| ``` | ||
|
|
||
| - **Switched from three-digit to six-digit fund numbers to add a greater level | ||
|
|
@@ -96,25 +100,19 @@ database and functions to handle these changes in the source data. | |
| vignette](https://ccao-data.github.io/ptaxsim/articles/tifs.html), which | ||
| we have updated to include a TIF counterfactual with data for tax year | ||
| 2024. | ||
|
Comment on lines
101
to
102
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just noticing in the rendered changelog there seems an unnecessary line break at |
||
| - **Added new `agency_info.agency_*_24` columns to handle agencies that have | ||
| changed to funds in 2024**. You can use these columns to construct a crosswalk | ||
| to analyze agencies over time, even if they changed to a fund in 2024. | ||
| - The new columns include: | ||
| - `agency_info.agency_change_24` (boolean, required): Whether the agency's | ||
| number changed in 2024, due to becoming a fund. | ||
| - `agency_info.agency_num_24` (string, optional): The agency's new number | ||
| starting in 2024. Null if the agency number did not change in 2024. | ||
| - `agency_info.agency_name_24` (string, optional): The agency's name | ||
| starting in 2024. Null if the agency number did not change in 2024. | ||
| - **Added new tables `agency_crosswalk` and `agency_fund_crosswalk` to support | ||
| tracking agencies that have changed to funds in 2024**. You can use these | ||
| tables to analyze agencies over time, even if the Clerk switched to reporting | ||
| them as funds in 2024. | ||
| - **How this change affects you**: If you maintain code that analyzes | ||
| agencies over time, and you want to update your code to include 2024 data, | ||
| you should use the `agency_info.agency_change_24` column to determine | ||
| whether the Clerk changed any of the agencies you analyze to funds in | ||
| 2024. If any of your agencies have changed to funds, you will need to use | ||
| the `agency_num_24` column to join pre- and post-2024 data. See [this | ||
| vignette](https://ccao-data.github.io/ptaxsim/articles/agencies.html) | ||
| for an example using the City of Chicago Library Fund to show how to | ||
| handle this type of change. | ||
| agencies or funds over time, and you want to update your code to include | ||
| 2024 data, you should use the crosswalk tables to determine whether the | ||
| Clerk changed any of the agencies or funds that interest you in 2024. If | ||
| any of your agencies or funds have changed, you will need to use | ||
| the `agency_num_final` and `fund_num_final` columns to join pre- and | ||
| post-2024 data. For an example using the City of Chicago Library Fund to | ||
| show how to handle this type of change, see the vignette [Tracking taxing | ||
| agency revenue over time](https://ccao-data.github.io/ptaxsim/articles/agencies.html). | ||
| - **Added a new column `agency_fund.fund_type_num` to handle changing fund | ||
| numbers in 2024**. In 2024, the Clerk changed their fund numbers so that | ||
| they consist of six digits instead of three, and they are no longer | ||
|
|
@@ -205,8 +203,8 @@ database and functions to handle these changes in the source data. | |
| ([#77](https://github.com/ccao-data/ptaxsim/pull/77)). | ||
| - **How this change affects you**: You should read the latest version of the | ||
| vignette if you use PTAXSIM for TIF counterfactuals. | ||
| - **Added [a new | ||
| vignette](https://ccao-data.github.io/ptaxsim/articles/agencies.html) | ||
| - **Added a new vignette [Tracking taxing agency revenue over | ||
| time](https://ccao-data.github.io/ptaxsim/articles/agencies.html) | ||
| to demonstrate the correct way to analyze agencies and funds over time given | ||
| the 2024 change that switched some agencies to funds**. | ||
| ([#84](https://github.com/ccao-data/ptaxsim/pull/84)). | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -240,20 +240,22 @@ The PTAXSIM backend database contains cleaned data from the Cook County Clerk, T | |
|
|
||
| ### Data sources | ||
|
|
||
| | Table Name | Source Agency | Source Link | Ingest Script | Contains | | ||
| |------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------------------| | ||
| | agency | Clerk | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Taxing district extensions, limits, and base EAV | | ||
| | agency_info | Clerk + imputed | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Taxing district name, type, and subtype | | ||
| | agency_fund | Clerk | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Funds and line-items that contribute to each district's extension | | ||
| | agency_fund_info | Clerk | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Fund name and whether the fund is statutorily capped | | ||
| | cpi | IDOR | [History of CPI's Used for the PTELL](https://tax.illinois.gov/localgovernments/property/cpihistory.html) | [data-raw/cpi/cpi.R](data-raw/cpi/cpi.R) | CPI-U used to calculate PTELL limits | | ||
| | eq_factor | IDOR | Manually created from [IDOR press releases](https://tax.illinois.gov/research/press-releases-archive.html) | [data-raw/eq_factor/eq_factor.R](data-raw/eq_factor/eq_factor.R) | Equalization factor applied to AV to get EAV | | ||
| | pin | Clerk + Treasurer | CLERKVALUES and TAXBILLAMOUNTS internal SQL tables | [data-raw/pin/pin.R](data-raw/pin/pin.R) | PIN-level tax code, AV, and exemptions | | ||
| | tax_code | Clerk | [Tax Extension - Tax Code Agency Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/tax_code/tax_code.R](data-raw/tax_code/tax_code.R) | Crosswalk of tax codes by district | | ||
| | tif | Clerk | [TIF Reports - Cook County Summary Reports](https://www.cookcountyclerkil.gov/property-taxes/tifs-tax-increment-financing/tif-reports) | [data-raw/tif/tif.R](data-raw/tif/tif.R) | TIF revenue, start year, and cancellation year | | ||
| | tif_crosswalk | Clerk | Manually created from TIF summary and distribution reports | [data-raw/tif/tif.R](data-raw/tif/tif.R) | Fix for data issue identified in #39 | | ||
| | tif_distribution | Clerk | [TIF Reports - Tax Increment Agency Distribution Reports](https://www.cookcountyclerkil.gov/property-taxes/tifs-tax-increment-financing/tif-reports) | [data-raw/tif/tif.R](data-raw/tif/tif.R) | TIF EAV, frozen EAV, and distribution percentage by tax code | | ||
| | pin_tif_distribution | Clerk | [TIF Reports - Tax Increment Agency Distribution Reports](https://www.cookcountyclerkil.gov/property-taxes/tifs-tax-increment-financing/tif-reports) | [data-raw/tif/tif.R](data-raw/tif/tif.R) | TIF EAV, frozen EAV, and distribution percentage by PIN | | ||
| | Table Name | Source Agency | Source Link | Ingest Script | Contains | | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main diff here is adding rows for |
||
| |-----------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------------------| | ||
| | agency | Clerk | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Taxing district extensions, limits, and base EAV | | ||
| | agency_info | Clerk + imputed | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Taxing district name, type, and subtype | | ||
| | agency_crosswalk | Clerk + imputed | [Tax Extension - Tax Code Agency Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Mapping to handle changes to agency numbers over time | | ||
| | agency_fund | Clerk | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Funds and line-items that contribute to each district's extension | | ||
| | agency_fund_info | Clerk | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Fund name and whether the fund is statutorily capped | | ||
| | agency_fund_crosswalk | Clerk + imputed | [Tax Extension - Agency Tax Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/agency/agency.R](data-raw/agency/agency.R) | Mapping to handle changes to fund numbers over time | | ||
| | cpi | IDOR | [History of CPI's Used for the PTELL](https://tax.illinois.gov/localgovernments/property/cpihistory.html) | [data-raw/cpi/cpi.R](data-raw/cpi/cpi.R) | CPI-U used to calculate PTELL limits | | ||
| | eq_factor | IDOR | Manually created from [IDOR press releases](https://tax.illinois.gov/research/press-releases-archive.html) | [data-raw/eq_factor/eq_factor.R](data-raw/eq_factor/eq_factor.R) | Equalization factor applied to AV to get EAV | | ||
| | pin | Clerk + Treasurer | CLERKVALUES and TAXBILLAMOUNTS internal SQL tables | [data-raw/pin/pin.R](data-raw/pin/pin.R) | PIN-level tax code, AV, and exemptions | | ||
| | tax_code | Clerk | [Tax Extension - Tax Code Agency Rate Reports](https://www.cookcountyclerkil.gov/property-taxes/tax-extension-and-rates) | [data-raw/tax_code/tax_code.R](data-raw/tax_code/tax_code.R) | Crosswalk of tax codes by district | | ||
| | tif | Clerk | [TIF Reports - Cook County Summary Reports](https://www.cookcountyclerkil.gov/property-taxes/tifs-tax-increment-financing/tif-reports) | [data-raw/tif/tif.R](data-raw/tif/tif.R) | TIF revenue, start year, and cancellation year | | ||
| | tif_crosswalk | Clerk | Manually created from TIF summary and distribution reports | [data-raw/tif/tif.R](data-raw/tif/tif.R) | Fix for data issue identified in #39 | | ||
| | tif_distribution | Clerk | [TIF Reports - Tax Increment Agency Distribution Reports](https://www.cookcountyclerkil.gov/property-taxes/tifs-tax-increment-financing/tif-reports) | [data-raw/tif/tif.R](data-raw/tif/tif.R) | TIF EAV, frozen EAV, and distribution percentage by tax code | | ||
| | pin_tif_distribution | Clerk | [TIF Reports - Tax Increment Agency Distribution Reports](https://www.cookcountyclerkil.gov/property-taxes/tifs-tax-increment-financing/tif-reports) | [data-raw/tif/tif.R](data-raw/tif/tif.R) | TIF EAV, frozen EAV, and distribution percentage by PIN | | ||
|
|
||
|
|
||
| ### Database diagram | ||
|
|
@@ -267,7 +269,7 @@ The PTAXSIM backend database contains cleaned data from the Cook County Clerk, T | |
| ## Notes and caveats | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this is beyond the scope of this PR, but what are your thoughts on adding a note here about how PINs with an EAV less than $150 will have a $0 bill but our "For PINs that have a final taxable EAV less than $150, the Cook County Treasurer will by default set the PIN's tax bill total to $0; note that we do not incorporate this behavior in the Or something along those lines. |
||
|
|
||
|
|
||
| - PTAXSIM's tax year 2024 update required significant changes to the database and package. Please see the PTAXSIM [changelog](https://ccao-data.github.io/ptaxsim/news) for more details. | ||
| - PTAXSIM's tax year 2024 update required significant changes to the database and package. Please see the PTAXSIM [changelog](https://ccao-data.github.io/ptaxsim/news) for more details. | ||
| - The per-district tax calculation using `tax_bill(simplify = TRUE)` for properties in transit TIFs do not match the amounts that the Treasurer reports on their tax bills. We believe the amounts we report are correct, however. See issues [#4](https://github.com/ccao-data/ptaxsim/issues/4) and [#56](https://github.com/ccao-data/ptaxsim/issues/56) for more information, as well as PR [#58](https://github.com/ccao-data/ptaxsim/pull/58). | ||
| - Special Service Area (SSA) rates must be calculated manually when creating counterfactual bills. See issue [#3](https://github.com/ccao-data/ptaxsim/issues/3) for more information. | ||
| - In rare instances, a TIF can have multiple `agency_num` identifiers (usually there's only one per TIF). The `tif_crosswalk` table determines what the "main" `agency_num` is for each TIF and pulls the name and TIF information using that identifier. See issue [GitLab #39](https://gitlab.com/ccao-data-science---modeling/packages/ptaxsim/-/issues/39) for more information. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this from your personal email to the shared team email for the sake of privacy and durability. I don't feel strongly about it though, if you'd rather have your personal email listed we can keep it that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!