Permalink
Browse files

added initial communication cost filing mappings

  • Loading branch information...
1 parent cc906ff commit fbcc5ba3dbbfca52bdbe42eb04cada3ec0620fd4 @dwillis dwillis committed Mar 6, 2012
Showing with 20 additions and 6 deletions.
  1. +2 −0 lib/fech/fech_utils.rb
  2. +8 −6 lib/fech/map_generator.rb
  3. +8 −0 lib/fech/rendered_maps.rb
  4. +1 −0 sources/F7.csv
  5. +1 −0 sources/F76.csv
View
@@ -21,6 +21,8 @@ module FechUtils
:f5 => /^f5[na]/i,
:f56 => /^f56/i,
:f57 => /^f57/i,
+ :f7 => /^f7[na]/i,
+ :f76 => /^f76/i,
:f9 => /^f9/i,
:f91 => /^f91/i,
:f92 => /^f92/i,
View
@@ -10,26 +10,28 @@ class MapGenerator
FILING_VERSIONS = ["8.0", "7.0", "6.4", "6.3", "6.2", "6.1",
"5.3", "5.2", "5.1", "5.0", "3"]
BASE_ROW_TYPES = ["HDR", "F1", "F1M", "F2", "F24", "F3", "F3L", "F3P", "F3P31", "F3PS", "F3S", "F3X",
- "F4", "F5", "F56", "F57", "F9", "F91", "F92", "F93", "F94",
+ "F4", "F5", "F56", "F57", "F7", "F76", "F9", "F91", "F92", "F93", "F94",
"SchA", "SchB", "SchC", "SchC1", "SchC2", "SchD", "SchE",
"SchF", "TEXT"]
ROW_TYPE_MATCHERS = {
"HDR" => FechUtils::ROW_TYPES[:hdr],
"F1" => FechUtils::ROW_TYPES[:f1],
- "F1M" => FechUtils::ROW_TYPES[:f1m],
- "F2" => FechUtils::ROW_TYPES[:f2],
+ "F1M" => FechUtils::ROW_TYPES[:f1m],
+ "F2" => FechUtils::ROW_TYPES[:f2],
"F24" => FechUtils::ROW_TYPES[:f24],
"F3" => FechUtils::ROW_TYPES[:f3],
"F3L" => FechUtils::ROW_TYPES[:f3l],
"F3P" => FechUtils::ROW_TYPES[:f3p],
"F3S" => FechUtils::ROW_TYPES[:f3s],
"F3P31" => FechUtils::ROW_TYPES[:f3p31],
"F3PS" => FechUtils::ROW_TYPES[:f3ps],
- "F3X" => FechUtils::ROW_TYPES[:f3x],
- "F4" => FechUtils::ROW_TYPES[:f4],
- "F5" => FechUtils::ROW_TYPES[:f5],
+ "F3X" => FechUtils::ROW_TYPES[:f3x],
+ "F4" => FechUtils::ROW_TYPES[:f4],
+ "F5" => FechUtils::ROW_TYPES[:f5],
"F56" => FechUtils::ROW_TYPES[:f56],
"F57" => FechUtils::ROW_TYPES[:f57],
+ "F7" => FechUtils::ROW_TYPES[:f7],
+ "F76" => FechUtils::ROW_TYPES[:f76],
"F9" => FechUtils::ROW_TYPES[:f9],
"F91" => FechUtils::ROW_TYPES[:f91],
"F92" => FechUtils::ROW_TYPES[:f92],
@@ -85,6 +85,14 @@ module Fech
'^5.3|5.2|5.1|5.0' => [:form_type, :filer_committee_id_number, :entity_type, :payee_name, :payee_street_1, :payee_street_2, :payee_city, :payee_state, :payee_zip, :expenditure_purpose_descrip, :expenditure_date, :expenditure_amount, :support_oppose_code, :candidate_id_number, :candidate_name, :candidate_office, :candidate_state, :candidate_district, nil, nil, nil, nil, nil, nil, :conduit_name, :conduit_street_1, :conduit_street_2, :conduit_city, :conduit_state, :conduit_zip, nil, :transaction_id_number, :category_code, :expenditure_purpose_code, :calendar_y_t_d_per_election_office, :election_code, :election_other_description],
'^3' => [:form_type, :filer_committee_id_number, :entity_type, :payee_name, :payee_street_2, nil, :payee_city, :payee_state, :payee_zip, :expenditure_purpose_descrip, :expenditure_date, :expenditure_amount, :support_oppose_code, :candidate_id_number, :candidate_name, :candidate_office, :candidate_state, :candidate_district, nil, nil, nil, nil, nil, nil, :conduit_name, :conduit_street_1, :conduit_street_2, :conduit_city, :conduit_state, :conduit_zip, :amended_code],
},
+ "^f7[na]" => {
+ '^5.3|5.2|5.1|5.0|3.0' => [:form_type, :filer_committee_id_number, :organization_name, :street_1, :street_2, :city, :state, :zip, :organization_type, :report_code, :election_date, :election_state, :coverage_from_date, :coverage_through_date, :total_costs, :person_designated_name, :date_signed, :person_designated_title],
+ '^8.0|7.0|6.4|6.3|6.2|6.1' => [:form_type, :filer_committee_id_number, :organization_name, :street_1, :street_2, :city, :state, :zip, :organization_type, :report_code, :election_date, :election_state, :coverage_from_date, :coverage_through_date, :total_costs, :person_designated_last_name, :person_designated_first_name, :person_designated_middle_name, :person_designated_prefix, :person_designated_suffix, :person_designated_title, :date_signed],
+ },
+ "^f76" => {
+ '^5.3|5.2|5.1|5.0|3.0' => [:form_type, :filer_committee_id_number, :communication_type, :communication_type_description, :communication_class, :communication_date, :support_oppose_code, :candidate_id_number, :candidate_name, :candidate_office, :candidate_state, :candidate_district, :election_code, :communication_cost, nil, :transaction_id],
+ '^8.0|7.0|6.4|6.3|6.2|6.1' => [:form_type, :filer_committee_id_number, :transaction_id, :communication_type, :communication_type_description, :communication_class, :communication_date, :communication_cost, :election_code, :election_other_description, :support_oppose_code, :candidate_id_number, :candidate_last_name, :candidate_first_name, :candidate_middle_name, :candidate_prefix, :candidate_suffix, :candidate_office, :candidate_state, :candidate_district],
+ },
"^f9" => {
'^8.0|7.0|6.4|6.3|6.2' => [:form_type, :filer_committee_id_number, :entity_type, :organization_name, :individual_last_name, :individual_first_name, :individual_middle_name, :individual_prefix, :individual_suffix, :change_of_address, :street_1, :street_2, :city, :state, :zip, :individual_employer, :individual_occupation, :coverage_from_date, :coverage_through_date, :date_public_distribution, :communication_title, :filer_code, :filer_code_description, :segregated_bank_account, :custodian_last_name, :custodian_first_name, :custodian_middle_name, :custodian_prefix, :custodian_suffix, :custodian_street_1, :custodian_street_2, :custodian_city, :custodian_state, :custodian_zip, :custodian_employer, :custodian_occupation, :total_donations, :total_disbursements, :person_completing_last_name, :person_completing_first_name, :person_completing_middle_name, :person_completing_prefix, :person_completing_suffix, :date_signed],
'^6.1' => [:form_type, :filer_committee_id_number, :entity_type, :organization_name, :individual_last_name, :individual_first_name, :individual_middle_name, :individual_prefix, :individual_suffix, :change_of_address, :street_1, :street_2, :city, :state, :zip, :individual_employer, :individual_occupation, :coverage_from_date, :coverage_through_date, :date_public_distribution, :communication_title, :qualified_non_profit, :segregated_bank_account, :custodian_last_name, :custodian_first_name, :custodian_middle_name, :custodian_prefix, :custodian_suffix, :custodian_street_1, :custodian_street_2, :custodian_city, :custodian_state, :custodian_zip, :custodian_employer, :custodian_occupation, :total_donations, :total_disbursements, :person_completing_last_name, :person_completing_first_name, :person_completing_middle_name, :person_completing_prefix, :person_completing_suffix, :date_signed],
View
@@ -0,0 +1 @@
+canonical,^8.0|7.0|6.4|6.3|6.2|6.1,,^5.3|5.2|5.1|5.0|3.0,form_type,1,FORM TYPE,1,FORM TYPEfiler_committee_id_number,2,FILER COMMITTEE ID NUMBER,2,FILER FEC CMTE IDorganization_name,3,ORGANIZATION NAME,3,COMMITTEE NAMEstreet_1,4,ORGANIZATION STREET 1,4,STREET 1street_2,5,ORGANIZATION STREET 2,5,STREET 2city,6,ORGANIZATION CITY,6,CITYstate,7,ORGANIZATION STATE,7,STATEzip,8,ORGANIZATION ZIP,8,ZIPorganization_type,9,ORGANIZATION TYPE,9,ORGANIZATION TYPEreport_code,10,REPORT CODE,10,RPTCODEelection_date,11,DATE OF ELECTION,11,DATE (Of Election)election_state,12,STATE OF ELECTION,12,STATE (Of Election)coverage_from_date,13,COVERAGE FROM DATE,13,DATE (Coverage From)coverage_through_date,14,COVERAGE THROUGH DATE,14,DATE (Coverage To)total_costs,15,TOTAL COSTS,15,TOTAL COSTSperson_designated_name,,,16,NAME/FILER (as signed)person_designated_last_name,16,PERSON DESIGNATED TO SIGN LAST NAME,,person_designated_first_name,17,PERSON DESIGNATED TO SIGN FIRST NAME,,person_designated_middle_name,18,PERSON DESIGNATED TO SIGN MIDDLE NAME,,person_designated_prefix,19,PERSON DESIGNATED TO SIGN PREFIX,,person_designated_suffix,20,PERSON DESIGNATED TO SIGN SUFFIX,,person_designated_title,21,PERSON DESIGNATED TO SIGN TITLE,18,TITLEdate_signed,22,DATE SIGNED,17,DATE (Signed)
View
@@ -0,0 +1 @@
+canonical,^8.0|7.0|6.4|6.3|6.2|6.1,,^5.3|5.2|5.1|5.0|3.0,form_type,1,FORM TYPE,1,FORM TYPEfiler_committee_id_number,2,FILER COMMITTEE ID NUMBER,2,FILER FEC CMTE IDtransaction_id,3,TRANSACTION ID NUMBER,16,TRAN IDcommunication_type,4,COMMUNICATION TYPE,3,COMMUNICATION TYPEcommunication_type_description,5,COMMUNICATION TYPE - OTHER DESCRIPTION,4,TRANSDESC (Comm. Descrip)communication_class,6,COMMUNICATION CLASS,5,COMMUNICATION CLASScommunication_date,7,COMMUNICATION DATE,6,DATE (Of Communication)communication_cost,8,COMMUNICATION COST (per candidate),14,COST OF COMMUNICATIONelection_code,9,ELECTION CODE,13,RPTPGIelection_other_description,10,ELECTION OTHER DESCRIPTION ,,support_oppose_code,11,SUPPORT/OPPOSE ,7,SUPPORT/OPPOSE candidate_id_number,12,S/O CANDIDATE ID NUMBER,8,FEC CANDIDATE ID NUMBERcandidate_name,,,9,CANDIDATE NAMEcandidate_last_name,13,S/O CANDIDATE LAST NAME,,candidate_first_name,14,S/O CANDIDATE FIRST NAME,,candidate_middle_name,15,S/O CANDIDATE MIDDLE NAME,,candidate_prefix,16,S/O CANDIDATE PREFIX,,candidate_suffix,17,S/O CANDIDATE SUFFIX,,candidate_office,18,S/O CANDIDATE OFFICE,10,CAN/OFFICEcandidate_state,19,S/O CANDIDATE STATE ,11,CAN/STATE candidate_district,20,S/O CANDIDATE DISTRICT,12,CAN/DIST

0 comments on commit fbcc5ba

Please sign in to comment.