From 93581e53b5c83903ba080c3121ff98a3a0cde374 Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Mon, 18 Nov 2024 14:59:43 +0000 Subject: [PATCH 1/9] Add transformations --- socrata/column_transformations/permits.sql | 520 +++++++++++++++++++++ 1 file changed, 520 insertions(+) create mode 100644 socrata/column_transformations/permits.sql diff --git a/socrata/column_transformations/permits.sql b/socrata/column_transformations/permits.sql new file mode 100644 index 000000000..63851ee7a --- /dev/null +++ b/socrata/column_transformations/permits.sql @@ -0,0 +1,520 @@ +left_pad(`pin`, 14, '0') + +case + when `status` = 'C' then 'CLOSED' + when `status` = 'L' then 'LEGACY' + when `status` = 'M' then 'MANAGER REVIEW' + when `status` = 'O' then 'OPEN' + when `status` = 'P' then 'PENDING' + when `status` = 'R' then 'RECHECK' + else null end + +case + when `assessable` = 'A' then 'Assessable' + when `assessable` = 'B' then 'Non-Assessable' + else null end + +case + when `job_code_primary` = '1' then 'RESIDENTIAL PERMIT' + when `job_code_primary` = '2' then 'COMMERCIAL PERMIT' + when `job_code_primary` = '3' then 'RAILROAD PERMIT' + when `job_code_primary` = '4' then 'EXEMPT PERMIT' + when `job_code_primary` = '5' then 'OFFICE PERMIT' + when `job_code_primary` = '6' then 'OCCUPANCY PERMIT' + when `job_code_primary` = '7' then 'OTHER' + else null end + +case + when `job_code_secondary` = '111' then 'NEW BUILDING' + when `job_code_secondary` = '112' then 'ADDITIONS' + when `job_code_secondary` = '113' then 'DORMERS' + when `job_code_secondary` = '114' then 'OTHER MAJOR NEW CONSTRUCTION' + when `job_code_secondary` = '114.1' then 'OTHER MAJOR NEW CONSTRUCTION foundations' + when `job_code_secondary` = '114.2' then 'OTHER MAJOR NEW CONSTRUCTION mobile home cement pads' + when `job_code_secondary` = '114.3' then 'OTHER MAJOR NEW CONSTRUCTION structural changes' + when `job_code_secondary` = '114.4' then 'OTHER MAJOR NEW CONSTRUCTION seasonal rooms that are conventionally heated (forced hot air, radiant, etc.) such as Florida Rooms or Sun Rooms.' + when `job_code_secondary` = '114.5' then 'OTHER MAJOR NEW CONSTRUCTION' + when `job_code_secondary` = '114.6' then 'OTHER MAJOR NEW CONSTRUCTION' + when `job_code_secondary` = '114.7' then 'OTHER MAJOR NEW CONSTRUCTION' + when `job_code_secondary` = '114.8' then 'OTHER MAJOR NEW CONSTRUCTION' + when `job_code_secondary` = '114.9' then 'OTHER MAJOR NEW CONSTRUCTION' + when `job_code_secondary` = '131' then 'SWIMMING POOL TENNIS COURT' + when `job_code_secondary` = '131.1' then 'SWIMMING POOL TENNIS COURT In ground swimming pools (not assessed but recorded)' + when `job_code_secondary` = '131.2' then 'SWIMMING POOL TENNIS COURT hot tubs' + when `job_code_secondary` = '131.3' then 'SWIMMING POOL TENNIS COURT spas' + when `job_code_secondary` = '131.4' then 'SWIMMING POOL TENNIS COURT tennis courts' + when `job_code_secondary` = '132' then 'DRIVEWAYS PATIOS WOOD DECK' + when `job_code_secondary` = '132.1' then 'DRIVEWAYS PATIOS WOOD DECK Drive ways' + when `job_code_secondary` = '132.1.1' then '1 DRIVEWAYS PATIOS WOOD DECK Drive ways (concrete)' + when `job_code_secondary` = '132.1.2' then '2 DRIVEWAYS PATIOS WOOD DECK Drive ways (asphalt)' + when `job_code_secondary` = '132.1.3' then '3 DRIVEWAYS PATIOS WOOD DECK Drive ways (brick)' + when `job_code_secondary` = '132.2' then 'DRIVEWAYS PATIOS WOOD DECK deck' + when `job_code_secondary` = '132.3' then 'DRIVEWAYS PATIOS WOOD DECK porches' + when `job_code_secondary` = '132.3.1' then '1 DRIVEWAYS PATIOS WOOD DECK porches (standard)' + when `job_code_secondary` = '132.3.2' then '2 DRIVEWAYS PATIOS WOOD DECK porches (screen in porches)' + when `job_code_secondary` = '132.3.3' then '3 DRIVEWAYS PATIOS WOOD DECK porches (wrap around porches)' + when `job_code_secondary` = '132.3.4' then '4 DRIVEWAYS PATIOS WOOD DECK PORCHES (ENCLOSED)' + when `job_code_secondary` = '132.4' then 'DRIVEWAYS PATIOS WOOD DECK patios' + when `job_code_secondary` = '132.5' then 'DRIVEWAYS PATIOS WOOD DECK balconies' + when `job_code_secondary` = '133' then 'FENCING (and Gates)' + when `job_code_secondary` = '133.1' then 'FENCING (and Gates) wrought iron' + when `job_code_secondary` = '133.2' then 'FENCING (and Gates) aluminum' + when `job_code_secondary` = '133.3' then 'FENCING (and Gates) wood' + when `job_code_secondary` = '133.4' then 'FENCING (and Gates) plastic' + when `job_code_secondary` = '134' then 'GARAGE CARPORTS BARNS' + when `job_code_secondary` = '134.1' then 'GARAGE CARPORTS BARNS garages' + when `job_code_secondary` = '134.2' then 'GARAGE CARPORTS BARNS barns' + when `job_code_secondary` = '134.3' then 'GARAGE CARPORTS BARNS car ports' + when `job_code_secondary` = '134.4' then 'GARAGE CARPORTS BARNS gazebos' + when `job_code_secondary` = '134.5' then 'GARAGE CARPORTS BARNS cement pad for miscellaneous use' + when `job_code_secondary` = '134.6' then 'OTHER GARAGE CARPORT BARNS' + when `job_code_secondary` = '134.7' then 'OTHER GARAGE CARPORT BARNS' + when `job_code_secondary` = '134.8' then 'OTHER GARAGE CARPORT BARNS' + when `job_code_secondary` = '135' then 'OTHER MINOR NEW CONSTRUCTION' + when `job_code_secondary` = '135.1' then 'OTHER MINOR NEW CONSTRUCTION lawn sprinkler systems' + when `job_code_secondary` = '135.2' then 'OTHER MINOR NEW CONSTRUCTION septic systems' + when `job_code_secondary` = '135.3' then 'OTHER MINOR NEW CONSTRUCTION sewer system' + when `job_code_secondary` = '135.4' then 'OTHER MINOR NEW CONSTRUCTION retaining walls' + when `job_code_secondary` = '135.5' then 'OTHER MINOR NEW CONSTRUCTION handicap ramps' + when `job_code_secondary` = '135.6' then 'OTHER MINOR NEW CONSTRUCTION canopies' + when `job_code_secondary` = '135.7' then 'OTHER MINOR NEW CONSTRUCTION water taps' + when `job_code_secondary` = '151' then 'BASEMENT ROOM REC ROOM' + when `job_code_secondary` = '151.1' then 'BASEMENT ROOM REC ROOM Basement area being converted from unfinished to finished (including new bathrooms in the basement area)' + when `job_code_secondary` = '151.2' then 'BASEMENT ROOM REC ROOM Basement finished area being remodeled' + when `job_code_secondary` = '152' then 'ATTIC ROOM BATHROOMS' + when `job_code_secondary` = '152.1' then 'ATTIC ROOM BATHROOMS Attic area being converted from unfinished to finished (including new bathrooms in the basement area)' + when `job_code_secondary` = '152.2' then 'ATTIC ROOM BATHROOMS Attic finished area being remodeled' + when `job_code_secondary` = '153' then 'FIREPLACE-CENTRAL AIR CONDITIONING' + when `job_code_secondary` = '153.1' then 'FIREPLACE-CENTRAL AIR CONDITIONING fireplace' + when `job_code_secondary` = '153.2' then 'FIREPLACE-CENTRAL AIR CONDITIONING central air conditioning' + when `job_code_secondary` = '153.3' then 'FIREPLACE-CENTRAL AIR CONDITIONING replacement central air conditioning' + when `job_code_secondary` = '154' then 'OTHER REMODELING' + when `job_code_secondary` = '154.1' then 'OTHER REMODELING renovation' + when `job_code_secondary` = '154.11' then 'OTHER REMODELING water taps (should be verified that they are not for new construction)' + when `job_code_secondary` = '154.2' then 'OTHER REMODELING general repairs' + when `job_code_secondary` = '154.3' then 'OTHER REMODELING elevators' + when `job_code_secondary` = '154.4' then 'OTHER REMODELING handicap ramps' + when `job_code_secondary` = '154.5' then 'OTHER REMODELING fire & flood alarms' + when `job_code_secondary` = '154.6' then 'OTHER REMODELING canopies' + when `job_code_secondary` = '154.7' then 'OTHER REMODELING water taps (should be verified that they are not for new construction)' + when `job_code_secondary` = '154.8' then 'OTHER REMODELING fire & flood alarms' + when `job_code_secondary` = '154.9' then 'OTHER REMODELING canopies' + when `job_code_secondary` = '171' then 'MAJOR IMPROVEMENT WRECK' + when `job_code_secondary` = '171.1' then 'MAJOR IMPROVEMENT WRECK major demolition' + when `job_code_secondary` = '171.2' then 'MAJOR IMPROVEMENT WRECK house moving' + when `job_code_secondary` = '172' then 'MINOR IMPROVEMENT WRECK' + when `job_code_secondary` = '172.1' then 'MINOR IMPROVEMENT WRECK garages' + when `job_code_secondary` = '172.2' then 'MINOR IMPROVEMENT WRECK sheds' + when `job_code_secondary` = '172.3' then 'MINOR IMPROVEMENT WRECK debris removal' + when `job_code_secondary` = '191' then 'MAJOR IMPROVEMENT BURNOUT' + when `job_code_secondary` = '192' then 'MINOR IMPROVEMENT BURNOUT' + when `job_code_secondary` = '192.1' then 'MINOR IMPROVEMENT BURNOUT garage' + when `job_code_secondary` = '192.2' then 'MINOR IMPROVEMENT BURNOUT shed' + when `job_code_secondary` = '211' then 'NEW BUILDING' + when `job_code_secondary` = '212' then 'ADDITIONS' + when `job_code_secondary` = '213' then 'OTHER MAJOR NEW CONSTRUCTION' + when `job_code_secondary` = '213.1' then 'OTHER MAJOR NEW CONSTRUCTION foundations' + when `job_code_secondary` = '213.2' then 'OTHER MAJOR NEW CONSTRUCTION build-outs' + when `job_code_secondary` = '213.3' then 'OTHER MAJOR NEW CONSTRUCTION cement pads' + when `job_code_secondary` = '213.4' then 'OTHER MAJOR NEW CONSTRUCTION loading dock' + when `job_code_secondary` = '231' then 'SWIMMING POOL TENNIS COURT' + when `job_code_secondary` = '231.1' then 'SWIMMING POOL TENNIS COURT tennis courts' + when `job_code_secondary` = '231.2' then 'SWIMMING POOL TENNIS COURT swimming pools' + when `job_code_secondary` = '231.3' then 'SWIMMING POOL TENNIS COURT recreation improvements' + when `job_code_secondary` = '232' then 'DRIVEWAYS PATIOS' + when `job_code_secondary` = '232.1' then 'DRIVEWAYS PATIOS rock' + when `job_code_secondary` = '232.2' then 'DRIVEWAYS PATIOS asphalt' + when `job_code_secondary` = '232.3' then 'DRIVEWAYS PATIOS cement' + when `job_code_secondary` = '232.4' then 'DRIVEWAYS PATIOS crushed rock' + when `job_code_secondary` = '232.5' then 'DRIVEWAYS PATIOS pavers' + when `job_code_secondary` = '233' then 'COMMERICAL FENCING' + when `job_code_secondary` = '233.1' then 'FENCING wrought iron' + when `job_code_secondary` = '233.2' then 'FENCING security' + when `job_code_secondary` = '233.3' then 'FENCING wood' + when `job_code_secondary` = '233.4' then 'FENCING chain link' + when `job_code_secondary` = '234' then 'GARAGE-BARN-BUTLER-TRASH ENCLOSURES BUILDING' + when `job_code_secondary` = '234.1' then 'GARAGE-BARN-BUTLER BUILDING garages' + when `job_code_secondary` = '234.2' then 'GARAGE-BARN-BUTLER BUILDING barns' + when `job_code_secondary` = '234.3' then 'GARAGE-BARN-BUTLER BUILDING butler buildings' + when `job_code_secondary` = '234.4' then 'Trash Enclosures' + when `job_code_secondary` = '235' then 'OTHER MINOR NEW CONSTRUCTION' + when `job_code_secondary` = '235.1' then 'OTHER MINOR NEW CONSTRUCTION construction trailers' + when `job_code_secondary` = '235.10' then 'OTHER MINOR NEW CONSTRUCTION tents' + when `job_code_secondary` = '235.11' then 'OTHER MINOR NEW CONSTRUCTION sewer clean out' + when `job_code_secondary` = '235.12' then 'OTHER MINOR NEW CONSTRUCTION ATM machines' + when `job_code_secondary` = '235.12.1' then 'OTHER MINOR NEW CONSTRUCTION ATM machines Partitioning' + when `job_code_secondary` = '235.12.2' then 'OTHER MINOR NEW CONSTRUCTION ATM machines machine' + when `job_code_secondary` = '235.13' then 'OTHER MINOR NEW CONSTRUCTION Parking Lot' + when `job_code_secondary` = '235.2' then 'OTHER MINOR NEW CONSTRUCTION tanks' + when `job_code_secondary` = '235.3' then 'OTHER MINOR NEW CONSTRUCTION cell tower (monopoles) pad and fencing' + when `job_code_secondary` = '235.4' then 'OTHER MINOR NEW CONSTRUCTION signs' + when `job_code_secondary` = '235.5' then 'OTHER MINOR NEW CONSTRUCTION canopies' + when `job_code_secondary` = '235.6' then 'OTHER MINOR NEW CONSTRUCTION cell towers (monopoles)' + when `job_code_secondary` = '235.7' then 'OTHER MINOR NEW CONSTRUCTION sprinkler system' + when `job_code_secondary` = '235.8' then 'OTHER MINOR NEW CONSTRUCTION security system' + when `job_code_secondary` = '235.9' then 'OTHER MINOR NEW CONSTRUCTION handicap ramps' + when `job_code_secondary` = '251' then 'PARTITIONING' + when `job_code_secondary` = '252' then 'DECONV/CONV AMT. LIV. UT.' + when `job_code_secondary` = '253' then 'AIR CONDITIONING FIREPLACES' + when `job_code_secondary` = '253.1' then 'AIR CONDITIONING FIREPLACES fireplaces' + when `job_code_secondary` = '253.2' then 'AIR CONDITIONING FIREPLACES air conditioning' + when `job_code_secondary` = '254' then 'BASEMENT-ATTIC ROOM BATH' + when `job_code_secondary` = '254.1' then 'BASEMENT-ATTIC ROOM BATH basement rooms' + when `job_code_secondary` = '254.2' then 'BASEMENT-ATTIC ROOM BATH bathrooms' + when `job_code_secondary` = '254.3' then 'BASEMENT-ATTIC ROOM BATH attic rooms' + when `job_code_secondary` = '255' then 'REPLACE-REPAIR BUILDING FACTORY' + when `job_code_secondary` = '255.1' then 'REPLACE-REPAIR BUILDING FACTORY rehab' + when `job_code_secondary` = '255.2' then 'REPLACE-REPAIR BUILDING FACTORY replacement' + when `job_code_secondary` = '255.3' then 'REPLACE-REPAIR BUILDING FACTORY repair to existing building' + when `job_code_secondary` = '255.4' then 'REPLACE-REPAIR BUILDING FACTORY replacement minor' + when `job_code_secondary` = '255.5' then 'REPLACE-REPAIR BUILDING FACTORY repair to existing building major' + when `job_code_secondary` = '255.6' then 'REPLACE-REPAIR BUILDING FACTORY repair to existing building minor' + when `job_code_secondary` = '256' then 'OTHER REMODELING' + when `job_code_secondary` = '256.1' then 'OTHER REMODELING elevators' + when `job_code_secondary` = '256.2' then 'OTHER REMODELING escalators' + when `job_code_secondary` = '256.3' then 'OTHER REMODELING handicap ramps' + when `job_code_secondary` = '256.4' then 'OTHER REMODELING awnings' + when `job_code_secondary` = '256.5' then 'OTHER REMODELING fire alarms' + when `job_code_secondary` = '256.6' then 'OTHER REMODELING security alarms' + when `job_code_secondary` = '256.7' then 'OTHER REMODELING fire alarms Hood Suppression System' + when `job_code_secondary` = '256.8' then 'OTHER REMODELING fire alarms Sprinkler for Fire' + when `job_code_secondary` = '256.9' then 'OTHER REMODELING fire alarms Security alarms' + when `job_code_secondary` = '271' then 'MAJOR IMPROVEMENT WRECK' + when `job_code_secondary` = '272' then 'MINOR IMPROVEMENT WRECK' + when `job_code_secondary` = '291' then 'MAJOR IMPROVEMENT BURNOUT' + when `job_code_secondary` = '292' then 'MINOR IMPROVEMENT BURNOUT' + when `job_code_secondary` = '311' then 'CARRIER NEW MAJOR CONSTRUCTION' + when `job_code_secondary` = '312' then 'NON-CARRIER NEW MAJOR CONSTRUCTION' + when `job_code_secondary` = '331' then 'CARRIER REMODELING' + when `job_code_secondary` = '332' then 'NON-CARRIER REMODELING' + when `job_code_secondary` = '351' then 'CARRIER REMODELING' + when `job_code_secondary` = '352' then 'NON-CARRIER REMODELING' + when `job_code_secondary` = '371' then 'MAJOR IMPROVEMENT WRECK' + when `job_code_secondary` = '372' then 'MINOR IMPROVEMENT WRECK' + when `job_code_secondary` = '391' then 'MAJOR IMPROVEMENT BURNOUT' + when `job_code_secondary` = '392' then 'MINOR IMPROVEMENT BURNOUT' + when `job_code_secondary` = '400' then 'EXEMPT PROPERTIES' + when `job_code_secondary` = '411' then 'LEASEHOLD' + when `job_code_secondary` = '500' then 'OFFICE PERMITS' + when `job_code_secondary` = '510' then 'RECHECKS' + when `job_code_secondary` = '511' then 'OCCUPANCY' + when `job_code_secondary` = '512' then 'PRIOR YEAR PARTIAL ASSESSMENT' + when `job_code_secondary` = '513' then 'NEW CONSTRUCTION' + when `job_code_secondary` = '514' then 'ADDED IMPROVEMENTS' + when `job_code_secondary` = '515' then 'MANUALLY ISSUED PERMIT' + when `job_code_secondary` = '516' then 'PRIOR YEAR RECHECK' + when `job_code_secondary` = '517' then 'DIVISION PERMIT' + when `job_code_secondary` = '517.1' then 'DIVISION PERMIT Petition' + when `job_code_secondary` = '517.11' then 'DIVISION PERMIT Petition Leasehold' + when `job_code_secondary` = '517.2' then 'DIVISION PERMIT Condominimum' + when `job_code_secondary` = '517.3' then 'DIVISION PERMIT Subdivision' + when `job_code_secondary` = '517.4' then 'DIVISION PERMIT Condo Removal' + when `job_code_secondary` = '517.5' then 'DIVISION PERMIT Petition Road Taking' + when `job_code_secondary` = '517.6' then 'DIVISION PERMIT Vacation' + when `job_code_secondary` = '517.7' then 'DIVISION PERMIT Dedication' + when `job_code_secondary` = '517.8' then 'DIVISION PERMIT Other' + when `job_code_secondary` = '517.9' then 'DIVISION PERMIT Mix Class' + when `job_code_secondary` = '518' then 'CK BLDG. SF/UP' + when `job_code_secondary` = '519' then 'CONVERT TO NEW MANUAL' + when `job_code_secondary` = '520' then 'AUDIT DEPT INCREASE TO CHART' + when `job_code_secondary` = '530' then 'RECENT I/C SALES' + when `job_code_secondary` = '549' then '1985 HISTORICAL LANDMARK' + when `job_code_secondary` = '550' then '1986 HISTORICAL LANDMARK' + when `job_code_secondary` = '551' then '1987 HISTORICAL LANDMARK' + when `job_code_secondary` = '552' then '1988 HISTORICAL LANDMARK' + when `job_code_secondary` = '553' then '1989 HISTORICAL LANDMARK' + when `job_code_secondary` = '554' then '1990 HISTORICAL LANDMARK' + when `job_code_secondary` = '555' then '1991 HISTORICAL LANDMARK' + when `job_code_secondary` = '556' then '1992 HISTORICAL LANDMARK' + when `job_code_secondary` = '557' then '1993 HISTORICAL LANDMARK' + when `job_code_secondary` = '558' then '1994 HISTORICAL LANDMARK' + when `job_code_secondary` = '559' then '1995 HISTORICAL LANDMARK' + when `job_code_secondary` = '560' then '1996 HISTORICAL LANDMARK' + when `job_code_secondary` = '561' then '1997 HISTORICAL LANDMARK' + when `job_code_secondary` = '562' then '1998 HISTORICAL LANDMARK' + when `job_code_secondary` = '563' then '1999 HISTORICAL LANDMARK' + when `job_code_secondary` = '564' then '2000 HISTORICAL LANDMARK' + when `job_code_secondary` = '565' then '2001 HISTORICAL LANDMARK' + when `job_code_secondary` = '566' then '2002 HISTORICAL LANDMARK' + when `job_code_secondary` = '911' then 'OCCUPANCY CODE WILL NOT BE USED' + else null end + +case + when `improvement_code_1` = '110' then 'NEW CONSTRUCTION - MAJOR IMPRVT' + when `improvement_code_1` = '111' then 'NEW BUILDING' + when `improvement_code_1` = '112' then 'ADDITIONS' + when `improvement_code_1` = '113' then 'DORMERS' + when `improvement_code_1` = '114' then 'OTHER - MAJOR NEW CONSTRUCTION' + when `improvement_code_1` = '130' then 'NEW CONSTRUCTION - MINOR IMPRVMT' + when `improvement_code_1` = '131' then 'SWIMMING POOL - TENNIS COURT' + when `improvement_code_1` = '132' then 'DRIVEWAYS - PATIOS - WOOD DECK' + when `improvement_code_1` = '133' then 'FENCING (and Gates)' + when `improvement_code_1` = '134' then 'GARAGE CARPORTS BARNS' + when `improvement_code_1` = '135' then 'OTHER - MINOR NEW CONSTRUCTION' + when `improvement_code_1` = '151' then 'BASEMENT ROOM - REC ROOM' + when `improvement_code_1` = '152' then 'ATTIC ROOM - BATHROOMS' + when `improvement_code_1` = '153' then 'FIREPLACE-CENTRAL AIR CONDITIONING' + when `improvement_code_1` = '154' then 'OTHER - REMODELING' + when `improvement_code_1` = '155' then '???' + when `improvement_code_1` = '156' then 'REMODELING - INTERIOR ONLY' + when `improvement_code_1` = '157' then 'REMODELING - EXTERIOR ONLY' + when `improvement_code_1` = '171' then 'MAJOR IMPROVEMENT - WRECK' + when `improvement_code_1` = '172' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_1` = '191' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_1` = '192' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_1` = '211' then 'NEW BUILDING' + when `improvement_code_1` = '212' then 'ADDITIONS' + when `improvement_code_1` = '213' then 'OTHER - MAJOR NEW CONSTRUCTION' + when `improvement_code_1` = '231' then 'SWIMMING POOL - TENNIS COURT' + when `improvement_code_1` = '232' then 'DRIVEWAYS - PATIOS' + when `improvement_code_1` = '233' then 'FENCING' + when `improvement_code_1` = '234' then 'GARAGE-BARN-BUTLER BUILDING' + when `improvement_code_1` = '235' then 'OTHER - MINOR NEW CONSTRUCTION' + when `improvement_code_1` = '236' then '???' + when `improvement_code_1` = '251' then 'PARTITIONING' + when `improvement_code_1` = '252' then 'DECONV/CONV AMT. LIV. UT.' + when `improvement_code_1` = '253' then 'AIR CONDITIONING - FIREPLACES' + when `improvement_code_1` = '254' then 'BASEMENT-ATTIC ROOM BATH' + when `improvement_code_1` = '255' then 'REPLACE-REPAIR BUILDING - FACTORY' + when `improvement_code_1` = '256' then 'OTHER REMODELING' + when `improvement_code_1` = '257' then 'REMODELING - INTERIOR ONLY' + when `improvement_code_1` = '258' then 'REMODELING - EXTERIOR ONLY' + when `improvement_code_1` = '271' then 'MAJOR IMPROVEMENT - WRECK' + when `improvement_code_1` = '272' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_1` = '291' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_1` = '292' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_1` = '300' then 'RAILROAD PROPERTIES' + when `improvement_code_1` = '310' then 'NEW CONST MAJOR IMPROVEMENT' + when `improvement_code_1` = '311' then 'CARRIER - NEW MAJOR CONSTRUCTION' + when `improvement_code_1` = '312' then 'NON-CARRIER NEW MAJOR CONSTRUCTION' + when `improvement_code_1` = '330' then 'NEW CONSTRUCTION MINOR IMPROVEMENT' + when `improvement_code_1` = '331' then 'CARRIER - REMODELING' + when `improvement_code_1` = '332' then 'NON-CARRIER - REMODELING' + when `improvement_code_1` = '350' then 'REMODELING' + when `improvement_code_1` = '351' then 'CARRIER - REMODELING' + when `improvement_code_1` = '352' then 'NON-CARRIER - REMODELING' + when `improvement_code_1` = '370' then 'WRECKS' + when `improvement_code_1` = '371' then 'MAJOR IMPROVEMENT WRECK' + when `improvement_code_1` = '372' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_1` = '390' then 'BURNOUTS' + when `improvement_code_1` = '391' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_1` = '392' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_1` = '400' then 'EXEMPT PROPERTIES' + when `improvement_code_1` = '411' then 'LEASEHOLD' + when `improvement_code_1` = '510' then 'RECHECKS' + when `improvement_code_1` = '511' then 'OCCUPANCY' + when `improvement_code_1` = '512' then 'PRIOR YEAR PARTIAL ASSESSMENT' + when `improvement_code_1` = '515' then 'MANUALLY ISSUED PERMIT' + when `improvement_code_1` = '516' then 'PRIOR YEAR RECHECK' + when `improvement_code_1` = '900' then 'OTHER' + else null end + +case + when `improvement_code_2` = '110' then 'NEW CONSTRUCTION - MAJOR IMPRVT' + when `improvement_code_2` = '111' then 'NEW BUILDING' + when `improvement_code_2` = '112' then 'ADDITIONS' + when `improvement_code_2` = '113' then 'DORMERS' + when `improvement_code_2` = '114' then 'OTHER - MAJOR NEW CONSTRUCTION' + when `improvement_code_2` = '130' then 'NEW CONSTRUCTION - MINOR IMPRVMT' + when `improvement_code_2` = '131' then 'SWIMMING POOL - TENNIS COURT' + when `improvement_code_2` = '132' then 'DRIVEWAYS - PATIOS - WOOD DECK' + when `improvement_code_2` = '133' then 'FENCING (and Gates)' + when `improvement_code_2` = '134' then 'GARAGE CARPORTS BARNS' + when `improvement_code_2` = '135' then 'OTHER - MINOR NEW CONSTRUCTION' + when `improvement_code_2` = '151' then 'BASEMENT ROOM - REC ROOM' + when `improvement_code_2` = '152' then 'ATTIC ROOM - BATHROOMS' + when `improvement_code_2` = '153' then 'FIREPLACE-CENTRAL AIR CONDITIONING' + when `improvement_code_2` = '154' then 'OTHER - REMODELING' + when `improvement_code_2` = '155' then '???' + when `improvement_code_2` = '156' then 'REMODELING - INTERIOR ONLY' + when `improvement_code_2` = '157' then 'REMODELING - EXTERIOR ONLY' + when `improvement_code_2` = '171' then 'MAJOR IMPROVEMENT - WRECK' + when `improvement_code_2` = '172' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_2` = '191' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_2` = '192' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_2` = '211' then 'NEW BUILDING' + when `improvement_code_2` = '212' then 'ADDITIONS' + when `improvement_code_2` = '213' then 'OTHER - MAJOR NEW CONSTRUCTION' + when `improvement_code_2` = '231' then 'SWIMMING POOL - TENNIS COURT' + when `improvement_code_2` = '232' then 'DRIVEWAYS - PATIOS' + when `improvement_code_2` = '233' then 'FENCING' + when `improvement_code_2` = '234' then 'GARAGE-BARN-BUTLER BUILDING' + when `improvement_code_2` = '235' then 'OTHER - MINOR NEW CONSTRUCTION' + when `improvement_code_2` = '236' then '???' + when `improvement_code_2` = '251' then 'PARTITIONING' + when `improvement_code_2` = '252' then 'DECONV/CONV AMT. LIV. UT.' + when `improvement_code_2` = '253' then 'AIR CONDITIONING - FIREPLACES' + when `improvement_code_2` = '254' then 'BASEMENT-ATTIC ROOM BATH' + when `improvement_code_2` = '255' then 'REPLACE-REPAIR BUILDING - FACTORY' + when `improvement_code_2` = '256' then 'OTHER REMODELING' + when `improvement_code_2` = '257' then 'REMODELING - INTERIOR ONLY' + when `improvement_code_2` = '258' then 'REMODELING - EXTERIOR ONLY' + when `improvement_code_2` = '271' then 'MAJOR IMPROVEMENT - WRECK' + when `improvement_code_2` = '272' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_2` = '291' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_2` = '292' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_2` = '300' then 'RAILROAD PROPERTIES' + when `improvement_code_2` = '310' then 'NEW CONST MAJOR IMPROVEMENT' + when `improvement_code_2` = '311' then 'CARRIER - NEW MAJOR CONSTRUCTION' + when `improvement_code_2` = '312' then 'NON-CARRIER NEW MAJOR CONSTRUCTION' + when `improvement_code_2` = '330' then 'NEW CONSTRUCTION MINOR IMPROVEMENT' + when `improvement_code_2` = '331' then 'CARRIER - REMODELING' + when `improvement_code_2` = '332' then 'NON-CARRIER - REMODELING' + when `improvement_code_2` = '350' then 'REMODELING' + when `improvement_code_2` = '351' then 'CARRIER - REMODELING' + when `improvement_code_2` = '352' then 'NON-CARRIER - REMODELING' + when `improvement_code_2` = '370' then 'WRECKS' + when `improvement_code_2` = '371' then 'MAJOR IMPROVEMENT WRECK' + when `improvement_code_2` = '372' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_2` = '390' then 'BURNOUTS' + when `improvement_code_2` = '391' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_2` = '392' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_2` = '400' then 'EXEMPT PROPERTIES' + when `improvement_code_2` = '411' then 'LEASEHOLD' + when `improvement_code_2` = '510' then 'RECHECKS' + when `improvement_code_2` = '511' then 'OCCUPANCY' + when `improvement_code_2` = '512' then 'PRIOR YEAR PARTIAL ASSESSMENT' + when `improvement_code_2` = '515' then 'MANUALLY ISSUED PERMIT' + when `improvement_code_2` = '516' then 'PRIOR YEAR RECHECK' + when `improvement_code_2` = '900' then 'OTHER' + else null end + +case + when `improvement_code_3` = '110' then 'NEW CONSTRUCTION - MAJOR IMPRVT' + when `improvement_code_3` = '111' then 'NEW BUILDING' + when `improvement_code_3` = '112' then 'ADDITIONS' + when `improvement_code_3` = '113' then 'DORMERS' + when `improvement_code_3` = '114' then 'OTHER - MAJOR NEW CONSTRUCTION' + when `improvement_code_3` = '130' then 'NEW CONSTRUCTION - MINOR IMPRVMT' + when `improvement_code_3` = '131' then 'SWIMMING POOL - TENNIS COURT' + when `improvement_code_3` = '132' then 'DRIVEWAYS - PATIOS - WOOD DECK' + when `improvement_code_3` = '133' then 'FENCING (and Gates)' + when `improvement_code_3` = '134' then 'GARAGE CARPORTS BARNS' + when `improvement_code_3` = '135' then 'OTHER - MINOR NEW CONSTRUCTION' + when `improvement_code_3` = '151' then 'BASEMENT ROOM - REC ROOM' + when `improvement_code_3` = '152' then 'ATTIC ROOM - BATHROOMS' + when `improvement_code_3` = '153' then 'FIREPLACE-CENTRAL AIR CONDITIONING' + when `improvement_code_3` = '154' then 'OTHER - REMODELING' + when `improvement_code_3` = '155' then '???' + when `improvement_code_3` = '156' then 'REMODELING - INTERIOR ONLY' + when `improvement_code_3` = '157' then 'REMODELING - EXTERIOR ONLY' + when `improvement_code_3` = '171' then 'MAJOR IMPROVEMENT - WRECK' + when `improvement_code_3` = '172' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_3` = '191' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_3` = '192' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_3` = '211' then 'NEW BUILDING' + when `improvement_code_3` = '212' then 'ADDITIONS' + when `improvement_code_3` = '213' then 'OTHER - MAJOR NEW CONSTRUCTION' + when `improvement_code_3` = '231' then 'SWIMMING POOL - TENNIS COURT' + when `improvement_code_3` = '232' then 'DRIVEWAYS - PATIOS' + when `improvement_code_3` = '233' then 'FENCING' + when `improvement_code_3` = '234' then 'GARAGE-BARN-BUTLER BUILDING' + when `improvement_code_3` = '235' then 'OTHER - MINOR NEW CONSTRUCTION' + when `improvement_code_3` = '236' then '???' + when `improvement_code_3` = '251' then 'PARTITIONING' + when `improvement_code_3` = '252' then 'DECONV/CONV AMT. LIV. UT.' + when `improvement_code_3` = '253' then 'AIR CONDITIONING - FIREPLACES' + when `improvement_code_3` = '254' then 'BASEMENT-ATTIC ROOM BATH' + when `improvement_code_3` = '255' then 'REPLACE-REPAIR BUILDING - FACTORY' + when `improvement_code_3` = '256' then 'OTHER REMODELING' + when `improvement_code_3` = '257' then 'REMODELING - INTERIOR ONLY' + when `improvement_code_3` = '258' then 'REMODELING - EXTERIOR ONLY' + when `improvement_code_3` = '271' then 'MAJOR IMPROVEMENT - WRECK' + when `improvement_code_3` = '272' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_3` = '291' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_3` = '292' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_3` = '300' then 'RAILROAD PROPERTIES' + when `improvement_code_3` = '310' then 'NEW CONST MAJOR IMPROVEMENT' + when `improvement_code_3` = '311' then 'CARRIER - NEW MAJOR CONSTRUCTION' + when `improvement_code_3` = '312' then 'NON-CARRIER NEW MAJOR CONSTRUCTION' + when `improvement_code_3` = '330' then 'NEW CONSTRUCTION MINOR IMPROVEMENT' + when `improvement_code_3` = '331' then 'CARRIER - REMODELING' + when `improvement_code_3` = '332' then 'NON-CARRIER - REMODELING' + when `improvement_code_3` = '350' then 'REMODELING' + when `improvement_code_3` = '351' then 'CARRIER - REMODELING' + when `improvement_code_3` = '352' then 'NON-CARRIER - REMODELING' + when `improvement_code_3` = '370' then 'WRECKS' + when `improvement_code_3` = '371' then 'MAJOR IMPROVEMENT WRECK' + when `improvement_code_3` = '372' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_3` = '390' then 'BURNOUTS' + when `improvement_code_3` = '391' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_3` = '392' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_3` = '400' then 'EXEMPT PROPERTIES' + when `improvement_code_3` = '411' then 'LEASEHOLD' + when `improvement_code_3` = '510' then 'RECHECKS' + when `improvement_code_3` = '511' then 'OCCUPANCY' + when `improvement_code_3` = '512' then 'PRIOR YEAR PARTIAL ASSESSMENT' + when `improvement_code_3` = '515' then 'MANUALLY ISSUED PERMIT' + when `improvement_code_3` = '516' then 'PRIOR YEAR RECHECK' + when `improvement_code_3` = '900' then 'OTHER' + else null end + +case + when `improvement_code_4` = '110' then 'NEW CONSTRUCTION - MAJOR IMPRVT' + when `improvement_code_4` = '111' then 'NEW BUILDING' + when `improvement_code_4` = '112' then 'ADDITIONS' + when `improvement_code_4` = '113' then 'DORMERS' + when `improvement_code_4` = '114' then 'OTHER - MAJOR NEW CONSTRUCTION' + when `improvement_code_4` = '130' then 'NEW CONSTRUCTION - MINOR IMPRVMT' + when `improvement_code_4` = '131' then 'SWIMMING POOL - TENNIS COURT' + when `improvement_code_4` = '132' then 'DRIVEWAYS - PATIOS - WOOD DECK' + when `improvement_code_4` = '133' then 'FENCING (and Gates)' + when `improvement_code_4` = '134' then 'GARAGE CARPORTS BARNS' + when `improvement_code_4` = '135' then 'OTHER - MINOR NEW CONSTRUCTION' + when `improvement_code_4` = '151' then 'BASEMENT ROOM - REC ROOM' + when `improvement_code_4` = '152' then 'ATTIC ROOM - BATHROOMS' + when `improvement_code_4` = '153' then 'FIREPLACE-CENTRAL AIR CONDITIONING' + when `improvement_code_4` = '154' then 'OTHER - REMODELING' + when `improvement_code_4` = '155' then '???' + when `improvement_code_4` = '156' then 'REMODELING - INTERIOR ONLY' + when `improvement_code_4` = '157' then 'REMODELING - EXTERIOR ONLY' + when `improvement_code_4` = '171' then 'MAJOR IMPROVEMENT - WRECK' + when `improvement_code_4` = '172' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_4` = '191' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_4` = '192' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_4` = '211' then 'NEW BUILDING' + when `improvement_code_4` = '212' then 'ADDITIONS' + when `improvement_code_4` = '213' then 'OTHER - MAJOR NEW CONSTRUCTION' + when `improvement_code_4` = '231' then 'SWIMMING POOL - TENNIS COURT' + when `improvement_code_4` = '232' then 'DRIVEWAYS - PATIOS' + when `improvement_code_4` = '233' then 'FENCING' + when `improvement_code_4` = '234' then 'GARAGE-BARN-BUTLER BUILDING' + when `improvement_code_4` = '235' then 'OTHER - MINOR NEW CONSTRUCTION' + when `improvement_code_4` = '236' then '???' + when `improvement_code_4` = '251' then 'PARTITIONING' + when `improvement_code_4` = '252' then 'DECONV/CONV AMT. LIV. UT.' + when `improvement_code_4` = '253' then 'AIR CONDITIONING - FIREPLACES' + when `improvement_code_4` = '254' then 'BASEMENT-ATTIC ROOM BATH' + when `improvement_code_4` = '255' then 'REPLACE-REPAIR BUILDING - FACTORY' + when `improvement_code_4` = '256' then 'OTHER REMODELING' + when `improvement_code_4` = '257' then 'REMODELING - INTERIOR ONLY' + when `improvement_code_4` = '258' then 'REMODELING - EXTERIOR ONLY' + when `improvement_code_4` = '271' then 'MAJOR IMPROVEMENT - WRECK' + when `improvement_code_4` = '272' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_4` = '291' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_4` = '292' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_4` = '300' then 'RAILROAD PROPERTIES' + when `improvement_code_4` = '310' then 'NEW CONST MAJOR IMPROVEMENT' + when `improvement_code_4` = '311' then 'CARRIER - NEW MAJOR CONSTRUCTION' + when `improvement_code_4` = '312' then 'NON-CARRIER NEW MAJOR CONSTRUCTION' + when `improvement_code_4` = '330' then 'NEW CONSTRUCTION MINOR IMPROVEMENT' + when `improvement_code_4` = '331' then 'CARRIER - REMODELING' + when `improvement_code_4` = '332' then 'NON-CARRIER - REMODELING' + when `improvement_code_4` = '350' then 'REMODELING' + when `improvement_code_4` = '351' then 'CARRIER - REMODELING' + when `improvement_code_4` = '352' then 'NON-CARRIER - REMODELING' + when `improvement_code_4` = '370' then 'WRECKS' + when `improvement_code_4` = '371' then 'MAJOR IMPROVEMENT WRECK' + when `improvement_code_4` = '372' then 'MINOR IMPROVEMENT - WRECK' + when `improvement_code_4` = '390' then 'BURNOUTS' + when `improvement_code_4` = '391' then 'MAJOR IMPROVEMENT - BURNOUT' + when `improvement_code_4` = '392' then 'MINOR IMPROVEMENT - BURNOUT' + when `improvement_code_4` = '400' then 'EXEMPT PROPERTIES' + when `improvement_code_4` = '411' then 'LEASEHOLD' + when `improvement_code_4` = '510' then 'RECHECKS' + when `improvement_code_4` = '511' then 'OCCUPANCY' + when `improvement_code_4` = '512' then 'PRIOR YEAR PARTIAL ASSESSMENT' + when `improvement_code_4` = '515' then 'MANUALLY ISSUED PERMIT' + when `improvement_code_4` = '516' then 'PRIOR YEAR RECHECK' + when `improvement_code_4` = '900' then 'OTHER' + else null end \ No newline at end of file From 3de9885d508fec906052dc33e83bf1c3ca399a46 Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Fri, 6 Dec 2024 16:56:11 +0000 Subject: [PATCH 2/9] Update permits docs --- dbt/models/default/docs.md | 2 +- socrata/column_transformations/permits.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt/models/default/docs.md b/dbt/models/default/docs.md index d9488f795..828128d97 100644 --- a/dbt/models/default/docs.md +++ b/dbt/models/default/docs.md @@ -128,7 +128,7 @@ View containing aggregate land square footage for all PINs. View containing building permits organized by PIN, with extra metadata recorded by CCAO permit specialists during the permit processing workflow. -**Primary Key**: `pin`, `date_issued` +**Primary Key**: `pin`, `date_issued`, `permit_number` {% enddocs %} # vw_pin_sale diff --git a/socrata/column_transformations/permits.sql b/socrata/column_transformations/permits.sql index 63851ee7a..010fba04f 100644 --- a/socrata/column_transformations/permits.sql +++ b/socrata/column_transformations/permits.sql @@ -11,7 +11,7 @@ case case when `assessable` = 'A' then 'Assessable' - when `assessable` = 'B' then 'Non-Assessable' + when `assessable` = 'N' then 'Non-Assessable' else null end case From 7cf5785afbe50dc4756069089390a110ac41942c Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Fri, 6 Dec 2024 21:17:33 +0000 Subject: [PATCH 3/9] Update permit docs --- dbt/models/default/docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/models/default/docs.md b/dbt/models/default/docs.md index 828128d97..6827554f5 100644 --- a/dbt/models/default/docs.md +++ b/dbt/models/default/docs.md @@ -128,7 +128,7 @@ View containing aggregate land square footage for all PINs. View containing building permits organized by PIN, with extra metadata recorded by CCAO permit specialists during the permit processing workflow. -**Primary Key**: `pin`, `date_issued`, `permit_number` +**Primary Key**: `pin`, `permit_number` {% enddocs %} # vw_pin_sale From 0e01c8f5d21fc4e26b5a8b355dee06962136530f Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Thu, 2 Jan 2025 22:28:40 +0000 Subject: [PATCH 4/9] Update exposure --- dbt/models/default/exposures.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/models/default/exposures.yml b/dbt/models/default/exposures.yml index c1b6dde41..fe477536a 100644 --- a/dbt/models/default/exposures.yml +++ b/dbt/models/default/exposures.yml @@ -85,7 +85,7 @@ exposures: Use cases: Alone, sales data can be used to characterize real estate markets. Sales paired with characteristics can be used to find comparable properties or as an input to an automated modeling application. Sales paired with assessments can be used to calculate sales ratio statistics. Outliers can be easily removed using filters constructed from class, township, and year variables. - name: parcel_universe - label: Parcel Universe + label: Parcel Universe (Historic) type: dashboard url: https://datacatalog.cookcountyil.gov/Property-Taxation/Assessor-Parcel-Universe/nj4t-kc8j depends_on: From 5d717619d5ae39e02e40c0e62a18f31de332c80c Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Fri, 3 Jan 2025 20:36:53 +0000 Subject: [PATCH 5/9] Add exposures for new assets --- .github/workflows/socrata_upload.yaml | 21 ++++++++------- dbt/models/default/exposures.yml | 37 +++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.github/workflows/socrata_upload.yaml b/.github/workflows/socrata_upload.yaml index 2ffe73509..d10d87c20 100644 --- a/.github/workflows/socrata_upload.yaml +++ b/.github/workflows/socrata_upload.yaml @@ -7,15 +7,18 @@ on: type: choice description: Target Socrata asset options: - - Parcel Universe - - Single and Multi-Family Improvement Characteristics - - Residential Condominium Unit Characteristics - - Parcel Sales - - Assessed Values - - Appeals - - Parcel Addresses - - Parcel Proximity - - Property Tax-Exempt Parcels + - Appeals + - Assessed Values + - Parcel Addresses + - Parcel Proximity + - Parcel Sales + - Parcel Status + - Permits + - Property Tax-Exempt Parcels + - Parcel Universe + - Parcel Universe (Current Year) + - Residential Condominium Unit Characteristics + - Single and Multi-Family Improvement Characteristics default: Parcel Universe required: true overwrite: diff --git a/dbt/models/default/exposures.yml b/dbt/models/default/exposures.yml index fe477536a..8a8bbb51a 100644 --- a/dbt/models/default/exposures.yml +++ b/dbt/models/default/exposures.yml @@ -84,6 +84,25 @@ exposures: Use cases: Alone, sales data can be used to characterize real estate markets. Sales paired with characteristics can be used to find comparable properties or as an input to an automated modeling application. Sales paired with assessments can be used to calculate sales ratio statistics. Outliers can be easily removed using filters constructed from class, township, and year variables. + - name: parcel_status + label: Parcel Status + type: dashboard + url: https://datacatalog.cookcountyil.gov/Property-Taxation/Assessor-Parcel-Status/uuu4-fqy8 + depends_on: + - ref('default.vw_pin_status') + owner: + name: Data Department + meta: + test_row_count: true + asset_id: uuu4-fqy8 + primary_key: + - pin + - year + description: | + Collection of various different PIN-level physical and assessment-related + statuses collected and documented across the CCAO and Data Department. + Constructs the Data Department's AHSAP indicator. + - name: parcel_universe label: Parcel Universe (Historic) type: dashboard @@ -105,6 +124,24 @@ exposures: Use cases: Joining parcel-level data to this dataset allows analysis and reporting across a number of different political, tax, Census, and other boundaries. + - name: permits + label: Permits + type: dashboard + url: https://datacatalog.cookcountyil.gov/Property-Taxation/Assessor-Permits/6yjf-dfxs + depends_on: + - ref('default.vw_pin_permit') + owner: + name: Data Department + meta: + test_row_count: true + asset_id: 6yjf-dfxs + primary_key: + - pin + - permit_number + description: | + Building permits organized by PIN, with extra metadata recorded by CCAO + permit specialists during the permit processing workflow. + - name: property_tax_exempt_parcels label: Property Tax-Exempt Parcels type: dashboard From b298ab4ca308d943bddce4629851a551d46270fa Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Fri, 3 Jan 2025 21:30:57 +0000 Subject: [PATCH 6/9] Update workflow asset names --- .github/workflows/socrata_upload.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/socrata_upload.yaml b/.github/workflows/socrata_upload.yaml index d10d87c20..88382aa49 100644 --- a/.github/workflows/socrata_upload.yaml +++ b/.github/workflows/socrata_upload.yaml @@ -15,7 +15,7 @@ on: - Parcel Status - Permits - Property Tax-Exempt Parcels - - Parcel Universe + - Parcel Universe (Historic) - Parcel Universe (Current Year) - Residential Condominium Unit Characteristics - Single and Multi-Family Improvement Characteristics From d3baffccfa8dc3445351f8e5ba80f5051c642636 Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Fri, 3 Jan 2025 22:09:50 +0000 Subject: [PATCH 7/9] Update default asset in workflow --- .github/workflows/socrata_upload.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/socrata_upload.yaml b/.github/workflows/socrata_upload.yaml index 88382aa49..8cf3b99a6 100644 --- a/.github/workflows/socrata_upload.yaml +++ b/.github/workflows/socrata_upload.yaml @@ -19,7 +19,7 @@ on: - Parcel Universe (Current Year) - Residential Condominium Unit Characteristics - Single and Multi-Family Improvement Characteristics - default: Parcel Universe + default: Parcel Universe (Current Year) required: true overwrite: # True for overwrite, False for update From 92431d1ab5f1217da429410175fb81c95d5bb1c4 Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Mon, 6 Jan 2025 17:30:42 +0000 Subject: [PATCH 8/9] Add sales asset re-codes --- socrata/column_transformations/parcel_sales.sql | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/socrata/column_transformations/parcel_sales.sql b/socrata/column_transformations/parcel_sales.sql index 61f33d34b..d1190e7a2 100644 --- a/socrata/column_transformations/parcel_sales.sql +++ b/socrata/column_transformations/parcel_sales.sql @@ -1 +1,12 @@ -left_pad(`pin`, 14, '0') \ No newline at end of file +left_pad(`pin`, 14, '0') + +CASE + WHEN (`deed_type` = "01") THEN "Warranty" + WHEN (`deed_type` = "02") THEN "Trustee" + WHEN (`deed_type` = "03") THEN "Quit claim" + WHEN (`deed_type` = "04") THEN "Executor" + WHEN (`deed_type` = "05") THEN "Other" + WHEN (`deed_type` = "06") THEN "Beneficiary" + WHEN (`deed_type` = "99") THEN "Unknown" + ELSE null +END \ No newline at end of file From df3f025d87c78c6528bba5254c2c4e012e24ad78 Mon Sep 17 00:00:00 2001 From: Sweaty Handshake Date: Wed, 15 Jan 2025 15:25:24 +0000 Subject: [PATCH 9/9] Commenting --- socrata/column_transformations/permits.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/socrata/column_transformations/permits.sql b/socrata/column_transformations/permits.sql index 010fba04f..f2963d97f 100644 --- a/socrata/column_transformations/permits.sql +++ b/socrata/column_transformations/permits.sql @@ -24,6 +24,7 @@ case when `job_code_primary` = '7' then 'OTHER' else null end +-- job_code_secondary is not currently being recoded because it breaks Socrata case when `job_code_secondary` = '111' then 'NEW BUILDING' when `job_code_secondary` = '112' then 'ADDITIONS'