Skip to content

Commit

Permalink
Merge pull request #20 from johnofsydney/corrections-2024-09
Browse files Browse the repository at this point in the history
fix helen haines, adani and superfluous campagn groups
  • Loading branch information
johnofsydney authored Sep 13, 2024
2 parents bdb7de4 + b31d645 commit 6116ace
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
14 changes: 9 additions & 5 deletions app/services/map_group_names.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,20 @@ def map_or_return_name(name)
return 'Australians for Unity Ltd' if name.match?(/(Australia|Australian|Australians) for Unity|\bAFUL\b/i)
return 'Australians for Indigenous Consititutional Recognition' if name.match?(/Australians for (Indigenous|Indigneous) (Constitution|Constitutional|Consititutional) (Recognition|Recgonition|Recongition)|\bAICR\b|\b\(aicr\)\b/i)
return 'Climate Action Network Australia' if name.match?(/Climate Action Network Australia/i)
return 'Stand UP: Jewish Commitment TO A Better World Ltd' if name.match?(/(Tand|Stand) UP: Jewish Commitment TO A Better World Ltd/i)
return 'Stand UP: Jewish Commitment TO A Better World' if name.match?(/(Tand|Stand) UP: Jewish Commitment TO A Better World/i)
return 'The Australia Institute' if name.match?(/Australia Institute/i)
return 'The Dugdale Trust for Women and Girls' if name.match?(/The Dugdale Trust for (Women|Womens) and Girls/i)
return 'Uphold and Recognise Limited' if name.match?(/Uphold.+Recognise/i)
return 'Keldoulis Investments Pty Ltd' if name.match?(/Keldoulis Investments/i)
return 'Turner Components Pty Ltd' if name.match?(/Turner Components/i)


return 'Australian Energy Producers' if name.match?(/\bAPPEA\b|Australian Energy Producers/i)

# Independents
return 'David Pocock Campaign' if name.match?(/David Pocock/i)
return 'Zali Steggall Campaign' if name.match?(/Zali Steggall/i)
return 'Kim for Canberra' if name.match?(/Kim for Canberra/i)
return 'Helen Haines Campaign' if name.match?(/Helen Haines/i)

# return 'Kim for Canberra' if name.match?(/Kim for Canberra/i)
# return 'Helen Haines Campaign' if name.match?(/Helen Haines/i)

return 'Liberal Democratic Party' if name.match?(/Liberal.+Democrat/i)

Expand Down Expand Up @@ -158,6 +160,7 @@ def cleaned_up_name(name)
regex_for_titleize_4 = /\bTax\b|\bAid\b|\bBay\b|\bTo\b/i
regex_for_titleize_5 = /\bAmazon Web Services\b|\bAce Gutters\b|\bMud Guards\b|\bGum Tree\b/i
regex_for_titleize_6 = /\bRio Tinto\b|\bRed Rocketship\b|\bCar Park\b|\bGum Tree\b/i
regex_for_titleize_7 = /\bVictoria\b|\bQueensland\b|\bTasmania\b/i

regex_for_downcase = /\bthe\b|\bof\b|\band\b|\bas\b|\bfor\b|\bis\b/i

Expand All @@ -170,6 +173,7 @@ def cleaned_up_name(name)
.gsub(regex_for_titleize_4) { |word| word.titleize }
.gsub(regex_for_titleize_5) { |word| word.titleize }
.gsub(regex_for_titleize_6) { |word| word.titleize }
.gsub(regex_for_titleize_7) { |word| word.titleize }
.gsub(regex_for_downcase) { |word| word.downcase }
.gsub(/^the/) { |word| word.titleize }
.gsub(/australia/) { |word| word.titleize }
Expand Down
1 change: 1 addition & 0 deletions app/services/record_person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def cleaned_up_name(name)
return 'Tony Windsor' if name.match?(/Antony Harold Curties Windsor/i)
return 'Bob Katter' if name.match?(/Robert.+Katter/i)
return 'Malcolm Turnbull' if name.match?(/Malcolm.+Turnbull/i)
return 'Helen Haines' if name.match?(/Helen.+Haines/i)

name.gsub(regex_for_removal_elected, '')
.gsub(regex_for_removal_honours, '')
Expand Down
2 changes: 1 addition & 1 deletion csv_data/affiliations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Gas Energy Australia, Ampol Limited
Mineralogy, Waratah Coal
Active Super, Mirvac
Local Government NSW, City of Penrith Council
Adani, NextLevel
Adani Mining Pty Ltd, NextLevel
Better Council, DBK Advisory Pty Ltd, , , , https://www.whois.com/whois/bettercouncil.com.au
Better Council, Never Again is Now Ltd, , , , https://michaelwest.com.au/right-wing-astroturfers-infiltrate-local-councils-unrest-over-israel/
Silver River Investment Holdings ATF Fenwick Family Trust, Silver River Investment Holdings Pty Ltd
Expand Down
2 changes: 0 additions & 2 deletions csv_data/other_people_groups_positions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Westpac BT Financial Group,Martin Codina,8/8/2017,1/9/2018,Head of Government an
Office of Josh Frydenberg,Martin Codina,Chief Of Staff,1/9/2018,22/5/2022,https://www.linkedin.com/in/martin-codina-32a1b641/
Office of Josh Frydenberg,Josh Frydenburg
ALP NSW, Adele Tahan
Allegra Spender Campaign, Allegra Spender, Candidate
Zali Steggall Campaign, Zali Steggall, Candidate
Warren Entsch Campaign, Warren Entsch, Candidate
Warren Entsch Campaign, Trent Twomey, Campaign Director
Barnaby's Maiden Speech, Barnaby Joyce, Speaker
Expand Down

0 comments on commit 6116ace

Please sign in to comment.