Exemple #1
0
    def build_section_data(self):
        entity_id, name, cycle, type, external_ids, is_lobbying_firm = \
            self.entity.entity_id, self.entity.standardized_name, self.entity.cycle, self.entity.type, self.entity.external_ids, self.entity_is_lobbying_firm

        self.lobbying_data = True
        self.is_lobbying_firm = is_lobbying_firm

        if is_lobbying_firm:
            self.lobbying_issues    =  [item['issue'] for item in self.data['lobbying_issues']]
            self.lobbying_bills     = [{
                'bill': bill['bill_name'],
                'title': bill['title'],
                'link': make_bill_link(bill),
                'congress': bill['congress_no'],
            } for bill in self.data['lobbying_bills']]
            self.lobbying_links = external_sites.get_lobbying_links('firm', name, external_ids, cycle)
        else:
            self.lobbying_issues    =  [item['issue'] for item in self.data['lobbying_issues']]
            self.lobbying_bills     = [ {
                'bill': bill['bill_name'],
                'title': bill['title'],
                'link': make_bill_link(bill),
                'congress': bill['congress_no'],
            } for bill in self.data['lobbying_bills']]
            self.lobbying_links = external_sites.get_lobbying_links('industry' if type == 'industry' else 'client', name, external_ids, cycle)
Exemple #2
0
    def build_section_data(self):
        entity_id, name, cycle, type, external_ids, is_lobbying_firm = \
            self.entity.entity_id, self.entity.standardized_name, self.entity.cycle, self.entity.type, self.entity.external_ids, self.entity_is_lobbying_firm

        self.lobbying_data = True
        self.is_lobbying_firm = is_lobbying_firm

        if is_lobbying_firm:
            self.lobbying_issues = [
                item['issue'] for item in self.data['lobbying_issues']
            ]
            self.lobbying_bills = [{
                'bill': bill['bill_name'],
                'title': bill['title'],
                'link': make_bill_link(bill),
                'congress': bill['congress_no'],
            } for bill in self.data['lobbying_bills']]
            self.lobbying_links = external_sites.get_lobbying_links(
                'firm', name, external_ids, cycle)
        else:
            self.lobbying_issues = [
                item['issue'] for item in self.data['lobbying_issues']
            ]
            self.lobbying_bills = [{
                'bill': bill['bill_name'],
                'title': bill['title'],
                'link': make_bill_link(bill),
                'congress': bill['congress_no'],
            } for bill in self.data['lobbying_bills']]
            self.lobbying_links = external_sites.get_lobbying_links(
                'industry' if type == 'industry' else 'client', name,
                external_ids, cycle)
Exemple #3
0
 def build_section_data(self):
     entity_id, cycle, standardized_name, external_ids = self.entity.entity_id, self.entity.cycle, self.entity.standardized_name, self.entity.external_ids
     self.lobbying_data = True
     self.issues_lobbied_for = [
         item['issue'] for item in self.data['issues']
     ]
     self.lobbying_links = external_sites.get_lobbying_links(
         'lobbyist', standardized_name, external_ids, cycle)
Exemple #4
0
def indiv_lobbying_section(entity_id, name, cycle, external_ids):
    section = {
        'name': 'Lobbying',
        'template': 'indiv_lobbying.html',
    }
    
    section['lobbying_data'] = True
    section['lobbying_with_firm'] = api.indiv.registrants(entity_id, cycle)
    section['issues_lobbied_for'] =  [item['issue'] for item in api.indiv.issues(entity_id, cycle)]
    section['lobbying_for_clients'] = api.indiv.clients(entity_id, cycle)
    section['lobbying_links'] = external_sites.get_lobbying_links('lobbyist', name, external_ids, cycle)
    
    return section
Exemple #5
0
def org_lobbying_section(entity_id, name, cycle, type, external_ids, is_lobbying_firm):
    section = {
        'name': 'Lobbying',
        'template': '%s_lobbying.html' % ('org' if type == 'organization' else 'industry'),
    }
    
    section['lobbying_data'] = True
    section['is_lobbying_firm'] = is_lobbying_firm

    if is_lobbying_firm:
        section['lobbying_clients']   = api.org.registrant_clients(entity_id, cycle)
        section['lobbying_lobbyists'] = api.org.registrant_lobbyists(entity_id, cycle)
        section['lobbying_issues']    =  [item['issue'] for item in
                                       api.org.registrant_issues(entity_id, cycle)]
        section['lobbying_bills']     = [ {
            'bill': bill['bill_name'],
            'title': bill['title'],
            'link': make_bill_link(bill),
            'congress': bill['congress_no'],
        } for bill in api.org.registrant_bills(entity_id, cycle) ]
        section['lobbying_links'] = external_sites.get_lobbying_links('firm', name, external_ids, cycle)
    else:
        section['lobbying_clients']   = api.org.registrants(entity_id, cycle)
        section['lobbying_lobbyists'] = api.org.lobbyists(entity_id, cycle)
        section['lobbying_issues']    =  [item['issue'] for item in api.org.issues(entity_id, cycle)]
        section['lobbying_bills']     = [ {
            'bill': bill['bill_name'],
            'title': bill['title'],
            'link': make_bill_link(bill),
            'congress': bill['congress_no'],
        } for bill in api.org.bills(entity_id, cycle) ]
        
        section['lobbying_links'] = external_sites.get_lobbying_links('industry' if type == 'industry' else 'client', name, external_ids, cycle)

    section['lobbyist_registration_tracker'] = external_sites.get_lobbyist_tracker_data(external_ids)
    
    return section
Exemple #6
0
 def build_section_data(self):
     entity_id, cycle, standardized_name, external_ids = self.entity.entity_id, self.entity.cycle, self.entity.standardized_name, self.entity.external_ids
     self.lobbying_data = True
     self.issues_lobbied_for =  [item['issue'] for item in self.data['issues']]
     self.lobbying_links = external_sites.get_lobbying_links('lobbyist', standardized_name, external_ids, cycle)