Skip to content

Instantly share code, notes, and snippets.

@mrcreel
Created January 26, 2020 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrcreel/6dab25b9ee7a3a221ecf98fb27b29da1 to your computer and use it in GitHub Desktop.
Save mrcreel/6dab25b9ee7a3a221ecf98fb27b29da1 to your computer and use it in GitHub Desktop.
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