Skip to content

Commit

Permalink
Merge pull request #14 from johnofsydney/move-aa-css-file
Browse files Browse the repository at this point in the history
Move aa css file
  • Loading branch information
johnofsydney authored Aug 8, 2024
2 parents 87b0610 + 70cdaa2 commit 8b242b3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 0 additions & 2 deletions app/services/file_ingestor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def annual_donor_ingest(file)
giver = RecordPersonOrGroup.call(row["Donor Name"])
taker = RecordPersonOrGroup.call(row["Donation Made To"])

# TODO: Transfer.taker can be a group or a person. Use RecordGroup.call
transfer = Transfer.find_or_create_by(
giver_id: giver.id,
giver_type: giver.class.name,
Expand All @@ -23,7 +22,6 @@ def annual_donor_ingest(file)
transfer.data ||= {}
transfer.donations ||= []

# TODO: Transfer.taker can be a group or a person. Use RecordGroup.call
# this is for the JSON data field, recording each individual donation
transfer.donations << {
giver: giver.name,
Expand Down
Empty file added foo
Empty file.
23 changes: 15 additions & 8 deletions lib/tasks/add_records.rake
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ namespace :lester do
'csv_data/Annual_Donations_Made_2023.csv',
]

donation_files.each do |file|
FileIngestor.annual_donor_ingest(file)
end

federal_parliamentarians = [
'csv_data/wiki_feds_current_mps_cleaned.csv',
'csv_data/wiki_feds_current_senators_cleaned.csv',
Expand All @@ -49,22 +45,33 @@ namespace :lester do
'csv_data/wiki_feds_senators_ending_2022_cleaned.csv'
]

federal_parliamentarians.each do |file|
FileIngestor.federal_parliamentarians_upload(file)
end

federal_ministries = [
'csv_data/ministries_morrison.csv',
'csv_data/ministries_turnbull.csv',
]

# using data sourced from the AEC
donation_files.each do |file|
FileIngestor.annual_donor_ingest(file)
end

# using data sourced from wikipedia
federal_parliamentarians.each do |file|
FileIngestor.federal_parliamentarians_upload(file)
end

# using data sourced from wikipedia
federal_ministries.each do |file|
FileIngestor.ministries_upload(file)
end

# From a file created and maintained by me, whenever noteworthy people or groups appear in the news
FileIngestor.general_upload('csv_data/other_people_groups_positions.csv')

# From a file created and maintained by me, linking groups to groups, whenever information comes to light
FileIngestor.affiliations_upload('csv_data/affiliations.csv')

# From a file created and maintained by me, whenever noteworthy money transfers appear in the news
FileIngestor.transfers_upload('csv_data/other_transfers.csv')


Expand Down
File renamed without changes.

0 comments on commit 8b242b3

Please sign in to comment.