def build(self):
   self.create_results_table()
   states = utils.get_states()
   election_years = utils.get_election_years(base_dir=BASE_DIR)
   house_files = utils.get_election_files(BASE_DIR, election_years, 'house', states)
   for hfile in house_files:
     self.parse_results_data(hfile)
 def build(self):
   self.base_dir = BASE_DIR + 'divisions/'
   self.create_electorates_table()
   states = utils.get_states()
   election_years = utils.get_election_years(base_dir=BASE_DIR)
   election_files = utils.get_election_files(BASE_DIR, election_years, 'house', states)
   for efile in election_files:
     self.parse_electorate_file(efile)
 def build(self):
     self.create_parties_table()
     states = utils.get_states()
     election_years = utils.get_election_years(base_dir=BASE_DIR)
     house_files = utils.get_election_files(BASE_DIR, election_years, "house", states)
     senate_files = utils.get_election_files(BASE_DIR, election_years, "senate", states)
     party_dictionary = {}
     for fdata in house_files:
         self.parse_party_data(fdata, party_dictionary)
     for sdata in senate_files:
         self.parse_party_data(sdata, party_dictionary)
     self.insert_party_data(party_dictionary)
 def build(self):
   self.create_elections_table()
   years = utils.get_election_years(base_dir=BASE_DIR)
   self.populate_elections_table(years)