-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add appeal reason code seed and include it in default.vw_pin_appeal
#619
Merged
wrridgeway
merged 12 commits into
master
from
618-add-appeal-reason-code-seed-and-include-it-in-defaultvw_pin_appeal
Oct 21, 2024
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
98640b8
Initial commit
wrridgeway 62241cb
Switch from source to ref
wrridgeway 0dad1f1
Up test failure limit temporarily to let view build
wrridgeway 1170438
Remove periods from reason codes in htpar
wrridgeway 87db6b2
Remove bad unicode characters from seed
wrridgeway 322b20a
Move replace function for reason codes
wrridgeway 541affd
Update documentation, remove temp test limit
wrridgeway cb2ba86
Commenting
wrridgeway ab45053
Add additional appeal codes, improve documentation
wrridgeway 0f8439d
Add additional documentation, temporarily allow build
wrridgeway f6f5faf
Improve `change` recode specificity
wrridgeway d7a67ee
Remove temp build allowance
wrridgeway File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,122 @@ | ||
-- View containing appeals by PIN | ||
|
||
-- This CTE exists only so that we can join reason descriptions onto cleaned | ||
-- reason codes. | ||
WITH reasons AS ( | ||
SELECT | ||
htpar.*, | ||
-- Reason codes come from different columns before and after 2020 | ||
CASE | ||
WHEN htpar.taxyr <= '2020' | ||
AND TRIM(SUBSTR(htpar.user42, 1, 2)) NOT IN ( | ||
'0', ':' | ||
) | ||
THEN TRIM(SUBSTR(htpar.user42, 1, 2)) | ||
WHEN | ||
htpar.taxyr > '2020' | ||
THEN REGEXP_REPLACE(htpar.user89, '[^[:alnum:]]', '') | ||
END AS reason_code1, | ||
CASE | ||
WHEN htpar.taxyr <= '2020' | ||
AND TRIM(SUBSTR(htpar.user43, 1, 2)) NOT IN ( | ||
'0', ':' | ||
) | ||
THEN TRIM(SUBSTR(htpar.user43, 1, 2)) | ||
WHEN | ||
htpar.taxyr > '2020' | ||
THEN REGEXP_REPLACE(htpar.user100, '[^[:alnum:]]', '') | ||
END AS reason_code2, | ||
CASE | ||
WHEN htpar.taxyr <= '2020' | ||
AND TRIM(SUBSTR(htpar.user44, 1, 2)) NOT IN ( | ||
'0', ':' | ||
) | ||
THEN TRIM(SUBSTR(htpar.user44, 1, 2)) | ||
WHEN | ||
htpar.taxyr > '2020' | ||
THEN REGEXP_REPLACE(htpar.user101, '[^[:alnum:]]', '') | ||
END AS reason_code3 | ||
FROM {{ source('iasworld', 'htpar') }} AS htpar | ||
) | ||
|
||
SELECT | ||
htpar.parid AS pin, | ||
reasons.parid AS pin, | ||
REGEXP_REPLACE(pardat.class, '[^[:alnum:]]', '') AS class, | ||
legdat.user1 AS township_code, | ||
htpar.taxyr AS year, | ||
reasons.taxyr AS year, | ||
vwpv.mailed_bldg, | ||
vwpv.mailed_land, | ||
vwpv.mailed_tot, | ||
vwpv.certified_bldg, | ||
vwpv.certified_land, | ||
vwpv.certified_tot, | ||
htpar.caseno AS case_no, | ||
reasons.caseno AS case_no, | ||
CASE | ||
WHEN htpar.user38 = 'CC' | ||
WHEN reasons.user38 = 'CC' | ||
OR ( | ||
htpar.user38 IN ('RS', 'IC') | ||
reasons.user38 IN ('RS', 'IC') | ||
AND REGEXP_REPLACE(pardat.class, '[^[:alnum:]]', '') IN ( | ||
'213', '297', '299', '399', '599' | ||
) | ||
) THEN 'condo/coop' | ||
WHEN htpar.user38 = 'CE' THEN 'c of e - exempt' | ||
WHEN htpar.user38 = 'CI' THEN 'c of e - incentive' | ||
WHEN htpar.user38 = 'CO' THEN 'c of e - omitted' | ||
WHEN htpar.user38 = 'CV' THEN 'c of e - valuations' | ||
WHEN htpar.user38 = 'IC' THEN 'commercial' | ||
WHEN htpar.user38 = 'IN' THEN 'incentive' | ||
WHEN htpar.user38 = 'LD' THEN 'land' | ||
WHEN htpar.user38 = 'OM' THEN 'omitted assessment' | ||
WHEN htpar.user38 = 'RS' THEN 'residential' | ||
WHEN reasons.user38 = 'CE' THEN 'c of e - exempt' | ||
WHEN reasons.user38 = 'CI' THEN 'c of e - incentive' | ||
WHEN reasons.user38 = 'CO' THEN 'c of e - omitted' | ||
WHEN reasons.user38 = 'CV' THEN 'c of e - valuations' | ||
WHEN reasons.user38 = 'IC' THEN 'commercial' | ||
WHEN reasons.user38 = 'IN' THEN 'incentive' | ||
WHEN reasons.user38 = 'LD' THEN 'land' | ||
WHEN reasons.user38 = 'OM' THEN 'omitted assessment' | ||
WHEN reasons.user38 = 'RS' THEN 'residential' | ||
END AS appeal_type, | ||
|
||
-- Status, reason codes, and agent name come from different columns | ||
-- before and after 2020 | ||
-- Status and agent name come from different columns before and after 2020 | ||
CASE | ||
WHEN htpar.taxyr <= '2020' AND htpar.resact = 'C' THEN 'change' | ||
WHEN htpar.taxyr <= '2020' AND htpar.resact = 'NC' THEN 'no change' | ||
WHEN reasons.taxyr <= '2020' AND reasons.resact = 'C' THEN 'change' | ||
WHEN reasons.taxyr <= '2020' AND reasons.resact = 'NC' THEN 'no change' | ||
WHEN | ||
htpar.taxyr > '2020' AND TRIM(LOWER(htpar.user104)) = 'decrease' | ||
reasons.taxyr > '2020' AND TRIM(LOWER(reasons.user104)) = 'decrease' | ||
THEN 'change' | ||
WHEN htpar.taxyr > '2020' THEN TRIM(LOWER(htpar.user104)) | ||
WHEN reasons.taxyr > '2020' THEN TRIM(LOWER(reasons.user104)) | ||
END AS change, | ||
CASE | ||
WHEN htpar.taxyr <= '2020' | ||
AND TRIM(SUBSTR(htpar.user42, 1, 2)) NOT IN ('0', ':') | ||
THEN TRIM(SUBSTR(htpar.user42, 1, 2)) | ||
WHEN htpar.taxyr > '2020' THEN htpar.user89 | ||
END AS reason_code1, | ||
CASE | ||
WHEN htpar.taxyr <= '2020' | ||
AND TRIM(SUBSTR(htpar.user43, 1, 2)) NOT IN ('0', ':') | ||
THEN TRIM(SUBSTR(htpar.user42, 1, 2)) | ||
WHEN htpar.taxyr > '2020' THEN htpar.user100 | ||
END AS reason_code2, | ||
CASE | ||
WHEN htpar.taxyr <= '2020' | ||
AND TRIM(SUBSTR(htpar.user44, 1, 2)) NOT IN ('0', ':') | ||
THEN TRIM(SUBSTR(htpar.user42, 1, 2)) | ||
WHEN htpar.taxyr > '2020' THEN htpar.user101 | ||
END AS reason_code3, | ||
htpar.cpatty AS agent_code, | ||
reasons.reason_code1, | ||
reascd1.description AS reason_desc1, | ||
reasons.reason_code2, | ||
reascd2.description AS reason_desc2, | ||
reasons.reason_code3, | ||
reascd3.description AS reason_desc3, | ||
reasons.cpatty AS agent_code, | ||
htagnt.name1 AS agent_name, | ||
CASE | ||
WHEN htpar.hrstatus = 'C' THEN 'closed' | ||
WHEN htpar.hrstatus = 'O' THEN 'open' | ||
WHEN htpar.hrstatus = 'P' THEN 'pending' | ||
WHEN htpar.hrstatus = 'X' THEN 'closed pending c of e' | ||
WHEN reasons.hrstatus = 'C' THEN 'closed' | ||
WHEN reasons.hrstatus = 'O' THEN 'open' | ||
WHEN reasons.hrstatus = 'P' THEN 'pending' | ||
WHEN reasons.hrstatus = 'X' THEN 'closed pending c of e' | ||
END AS status | ||
FROM {{ source('iasworld', 'htpar') }} AS htpar | ||
FROM reasons | ||
LEFT JOIN {{ source('iasworld', 'pardat') }} AS pardat | ||
ON htpar.parid = pardat.parid | ||
AND htpar.taxyr = pardat.taxyr | ||
ON reasons.parid = pardat.parid | ||
AND reasons.taxyr = pardat.taxyr | ||
AND pardat.cur = 'Y' | ||
AND pardat.deactivat IS NULL | ||
LEFT JOIN {{ source('iasworld', 'legdat') }} AS legdat | ||
ON htpar.parid = legdat.parid | ||
AND htpar.taxyr = legdat.taxyr | ||
ON reasons.parid = legdat.parid | ||
AND reasons.taxyr = legdat.taxyr | ||
AND legdat.cur = 'Y' | ||
AND legdat.deactivat IS NULL | ||
LEFT JOIN {{ ref('default.vw_pin_value') }} AS vwpv | ||
ON htpar.parid = vwpv.pin | ||
AND htpar.taxyr = vwpv.year | ||
ON reasons.parid = vwpv.pin | ||
AND reasons.taxyr = vwpv.year | ||
LEFT JOIN {{ source('iasworld', 'htagnt') }} AS htagnt | ||
ON htpar.cpatty = htagnt.agent | ||
ON reasons.cpatty = htagnt.agent | ||
AND htagnt.cur = 'Y' | ||
AND htagnt.deactivat IS NULL | ||
WHERE htpar.cur = 'Y' | ||
AND htpar.caseno IS NOT NULL | ||
AND htpar.deactivat IS NULL | ||
LEFT JOIN {{ ref('ccao.htpar_reascd') }} AS reascd1 | ||
ON reasons.reason_code1 = reascd1.reascd | ||
LEFT JOIN {{ ref('ccao.htpar_reascd') }} AS reascd2 | ||
ON reasons.reason_code2 = reascd2.reascd | ||
LEFT JOIN {{ ref('ccao.htpar_reascd') }} AS reascd3 | ||
ON reasons.reason_code3 = reascd3.reascd | ||
WHERE reasons.cur = 'Y' | ||
AND reasons.caseno IS NOT NULL | ||
AND reasons.deactivat IS NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
reascd,outcome,description | ||
1,Change,This is the result of an analysis of comparable properties. | ||
10,Change,"This is the result of a development incentive grant including an income, market or cost analysis." | ||
11,Change,"This is the result of an income, market or cost analysis." | ||
12,Change,This is the result of a change in classification. | ||
13,Change,"This is the result of a change in classification including an income, market or cost analysis." | ||
14,Change,This is the result of a change in classification including total or partial occupancy. | ||
15,Change,This is the result of a Property Tax Appeal Board Decision | ||
16,No Change,This is due to your property's uniformity with comparable properties. | ||
17,No Change,This is due to your property's uniformity with comparable properties. The analysis included an update of your property's characteristics. | ||
18,No Change,This is due to lack of data having been submitted for our review. | ||
19,No Change,This is due to insufficient data having been submitted for our review. | ||
1A,Change,This is the result of an equity analysis of comparable properties. | ||
2,Change,This is the result of an analysis of comparable properties. The decrease includes an update of your property's characteristics. | ||
20,No Change,This is due to the absence of or an incomplete Attorney/Representative Authorization form. | ||
21,No Change,"This is due to the sale of the property not having been disclosed or incomplete sale data submitted. (i.e. closing statement, deed.)" | ||
22,No Change,"This is due to income, market or cost analysis supporting the assessment." | ||
23,No Change,This is due to conflict between characteristics provided and our recent field inspection. | ||
24,No Change,This is due to the absence of or an incomplete Property Summary Sheet. | ||
26,No Change,This is due to a development incentive grant. | ||
26A,No Change,This is due to an incentive class being applied. | ||
27,No Change,This is due to an analysis of the sale of the property. | ||
27A,No Change,This is due to an analysis of the actual sale transaction of the property. | ||
28,No Change,This is due to a Board of Review decision or reduction. | ||
28A,Change,This is due to a prior year Board of Review decision or reduction. | ||
29,No Change,This is due to a factual change in your property characteristics and a valuation analysis. | ||
29A,No Change,"This is due to a factual change in your property characteristics, class change was applied and no assessed value reduction is warranted." | ||
2A,Change,"This is the result of an analysis of comparable properties, including an update due to a change in your property characteristics." | ||
3,Change,This is the result of a factual change in your property records. | ||
30,,This is a letter/Unique Property. | ||
31,,This is a letter/Unique Property on Re-review. | ||
32,No Change,"This is due to the absence and/or incompleteness of an income statement, a rent roll, Real Property Income and Expense Form." | ||
33,No Change,This is due to the absence of a vacancy affidavit and/or the lack of documentation required for vacancy relief. | ||
34,No Change,Insufficient or no data was provided to substantiate a field check at the time the appeal was filed. | ||
35,No Change,This is the result of a Property Tax Freeze Program for Historic Residences posted deadlines | ||
35A,No Change,This is the result of a Property Tax Freeze Program for Historic Residences. | ||
36,Change,This result is based on consideration of submitted appraisal and an analysis of comparable properties. | ||
36A,Change,This result is based on consideration of submitted appraisal and an analysis of comparable sales of like properties. | ||
37,Change,"This is the result of an income, market or cost analysis in support of a decrease and in the absence of compliance of Incentive eligibility requirements." | ||
38,Change,This is a result of a market analysis of your property as well as an analysis of comparable properties. | ||
3A,Change,"This is the result of a factual change in your property records, resulting in a reduction in your assessed value." | ||
4,Change,"This is the result of a factual change in your property records including an income, market or cost analysis." | ||
40,No Change,This appeal has been withdrawn due to a petitioner request. | ||
41,No Change,"This appeal has been terminated because the property is exempt. If you have any questions, please contact our Exempt Department at (312) 603-7567." | ||
41A,No Change,This property is currently exempt. | ||
42,No Change,The Assessment reflects a prior valuation analysis. Amendments to the Classification Ordinance (10% & 25%) do not warrant additional relief. | ||
43,No Change,Incentive improvements were not assessed for the current year. | ||
44,No Change,"The Filing Fee, the Municipal Resolution and/or the Living Wage Affidavit were not submitted." | ||
44A,No Change,The documents required to apply the incentive to your property were missing from your submission. | ||
45,No Change,The substantial rehabilitation did not yield any incremental value for incentive action. | ||
45A,No Change,The documents required to apply the affordable housing program reduction to your property were missing from your submission. | ||
46,No Change,The property is railroad operational. | ||
47,No Change,The property is currently partially exempt. | ||
48,No Change,This result is based on consideration of submitted appraisal and an analysis of comparable properties. | ||
48A,No Change,This result is based upon consideration of the appraisal submitted and an analysis of recent comparable property sales. | ||
49,No Change,This is a result of a market analysis of your property as well as an analysis of comparable properties. | ||
4A,Change,"This is the result of a factual change in your property records and an income, market or cost analysis." | ||
5,Change,This is the result of the partial occupancy of your property. | ||
50,No Change,This increase is due to a valuation analysis. | ||
51,No Change,Due to Non-Compliance to the Cook County Board of Commissioners recent amendments to the Tax incentive ordinance. | ||
52,No Change,This is due to conflict between documentation submitted and our recent field inspection. | ||
53,No Change,"The submitted appraisal was not for current year, did not meet acceptable standards, and/or not prepared for the purpose of valuation." | ||
54,No Change,This is due to the failure to abide by the official rules posted by the CCAO. | ||
55,No Change,Flood Damage. | ||
56,No Change,This is due to the removal of the Incentive based on Non-Industrial use or Continuous Substantial Vacancy. | ||
57,No Change,Incentive classification denied due to Non-Industrial use. | ||
58,No Change,This is due to a change in classification but no change in value. | ||
59,No Change,This is due to the Appeal Fee not being submitted. | ||
6,Change,"This is the result of the partial occupancy of your property along with an income, market or cost analysis." | ||
60,No Change,Market Value maintained; increase was due to ramp-up of level of assessment due to non-renewal of Incentive. | ||
61,No Change,Failure to abide by CCAO rule 10- failure to file anonymously. | ||
62,No Change,Failure to abide by CCAO rule 20- missing or incomplete utility bills. | ||
64,No Change,"Failure to abide by CCAO rule 19- missing or incomplete 3 years of income/expense records, RPIE forms, or Schedule E." | ||
65,No Change,Failure to abide by CCAO rule 17- failure to produce all required sales documentation. | ||
66,No Change,Failure to abide by CCAO rule 15- failure to submit a recent original and clear picture of the front of the property (with the exception of Class 2) . | ||
67,No Change,Failure to abide by CCAO rule 21- missing or incomplete evidence of demolition . | ||
68,No Change,"This is the result of a recent field inspection and market, income, and/or comparable market analysis of your property." | ||
69,Change,"This is the result of a recent field inspection and market, income, and/or comparable market analysis of your property." | ||
7,Change,This is the result of the total vacancy of your property. | ||
70,Change,This is a result of the renewal of the Incentive (only). | ||
71,Change,This is a result of the renewal of Incentive and value change. | ||
72,Change,This is a result of the vacancy of your property and the removal of the Incentive due to Continuous Substantial Vacancy. | ||
73,Change,The Property is Railroad Operational. | ||
74,Change,This is a result of a One-Year Only reduction due to vacancy; Incentive not applied due to non-compliance of Incentive requirements. | ||
75,No Change,You have exceeded the number of years of vacancy reduction under our policy and no additional vacancy benefit can be granted. | ||
78,Change,This is the result of a Property Tax Freeze Program for Historic Residences. | ||
79,Change,This is the result of a market and comparable analysis of your multi-improvement property. One (1) or more of your improvements have a decreased assessed value. | ||
79B,No Change,This is the result of a market and comparable analysis of your multi-improvement property. Your case has been reviewed and we concluded a value change was not in order. | ||
8,Change,"This is the result of the total vacancy of your property along with an income, market or cost analysis." | ||
80,Change,This is the result of the total vacancy of your property. Your parcel falls into year two (2) of the CCAO vacancy policy. | ||
81,Change,This is the result of the partial vacancy of your property. Your parcel falls into year two (2) of the CCAO vacancy policy. | ||
82,Change,"This is the result of market and comparable analysis of your property, which includes a home improvement exemption." | ||
83,No Change,"This is the result of market and comparable analysis of your property, which includes a home improvement exemption." | ||
84,No Change,No evidence provided to warrant a field inspection. | ||
85,No Change,Evidence provided contradicts recent field inspection. | ||
88,No Change,Due to Legal Defense Denial. | ||
88,No Change,Due to not submitting an appeal. | ||
9,Change,This is the result of a sale analysis of your property. | ||
90,Change,This is the result of a special reduction reason. | ||
9A,Change,This is the result of a comparable sales analysis of your property. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
[Question, non-blocking] Where did these descriptions come from? Maybe we can name that source as part of this description, in case it changes in the future and we need to update the seed?
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 call. They've been living as an attachment on the open data portal forever now, my guess is we got them from Mirella/Will. I'll look through my email and add a note.
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.
I can't speak to the source of the tabular version, just commenting to note that they are public as a pdf doc on the CCAO website.
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.
I like the idea of linking to the PDF doc!
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.
Sure thing. There are definitely some codes in iasWorld that aren't in the PDF, but I'll include it as a resource regardless.