Skip to content

Commit

Permalink
Fix tax bill agency name matching
Browse files Browse the repository at this point in the history
Give priority to certain names on bills in the detail output and add
names for TY2022
  • Loading branch information
dfsnow committed Jan 18, 2024
1 parent e9dd0b7 commit 5317ba4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions data-raw/sample_tax_bills/agency_name_match.csv
Git LFS file not shown
8 changes: 6 additions & 2 deletions data-raw/sample_tax_bills/sample_tax_bills_detail.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ extract_tax_bill <- function(file) {
agency_name != "",
!str_detect(
agency_name,
"TAXES|Assess|Property|EAV|Local Tax|Total Tax|Do not|Equalizer|cookcountyclerk.com"
paste0(
"TAXES|Assess|Property|EAV|Local Tax|",
"Total Tax|Do not|Equalizer|cookcountyclerk.com"
)
)
)
# Create a list with metadata for output
Expand Down Expand Up @@ -109,7 +112,8 @@ bills_df <- bills_df %>%
group_by(pin, year, agency_num) %>%
mutate(across(final_tax:prev_tax, sum)) %>%
select(-cook) %>%
filter(!is.na(agency_num), row_number() == 1) %>%
filter(!is.na(agency_num), name_priority == 1) %>%
select(-name_priority) %>%
ungroup()

# Round numeric values to nearest hundredth
Expand Down
4 changes: 2 additions & 2 deletions data-raw/sample_tax_bills/sample_tax_bills_detail.csv
Git LFS file not shown
Binary file modified data/sample_tax_bills_detail.rda
Binary file not shown.

0 comments on commit 5317ba4

Please sign in to comment.