Created
January 26, 2020 01:16
-
-
Save mrcreel/6dab25b9ee7a3a221ecf98fb27b29da1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for person in df_data: | |
legislator = person['node'] | |
legislator_name = legislator['name'] | |
chamber = legislator['chamber'][0]['organization']['name'] | |
party = legislator['party'][0]['organization']['name'] | |
print('Name: '+legislator_name+'('+party+' '+chamber+'-'+legislator['chamber'][0]['post']['label']+')') | |
links = legislator['links'] | |
for link in links: | |
print('Link: '+link['url']) | |
sources = legislator['sources'] | |
for source in sources: | |
print('Source: ' + source['url']) | |
contactDetails = legislator['contactDetails'] | |
print('------') | |
print('Contact Details') | |
print('------') | |
for contactDetail in contactDetails: | |
print(contactDetail['note'] + ' ' + contactDetail['type'] + ': '+ contactDetail['value']) | |
print('========') | |
print('') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment