Skip to content
Browse files

Updating Senators for 113th congress, including finding new bioguide …

…IDs. Also ignoring pickle files.
  • Loading branch information...
1 parent 8280f4a commit 3716a53a63732dfecb209fc79f5243bbd225b6b8 @konklone konklone committed
Showing with 180 additions and 129 deletions.
  1. +1 −0 .gitignore
  2. +145 −115 legislators-current.yaml
  3. +34 −14 scripts/senate_contacts.py
View
1 .gitignore
@@ -1,2 +1,3 @@
*.pyc
/scripts/cache
+*.pickle
View
260 legislators-current.yaml
@@ -78,7 +78,7 @@
state: OH
party: Democrat
class: 1
- url: http://brown.senate.gov/
+ url: http://www.brown.senate.gov/
address: 713 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2315
fax: 202-228-6321
@@ -133,11 +133,11 @@
state: WA
party: Democrat
class: 1
- url: http://cantwell.senate.gov
+ url: http://www.cantwell.senate.gov
address: 311 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3441
fax: 202-228-0514
- contact_form: http://www.cantwell.senate.gov/contact/
+ contact_form: http://www.cantwell.senate.gov/public/index.cfm/email-maria
office: 311 Hart Senate Office Building
- id:
bioguide: C000141
@@ -239,7 +239,7 @@
state: MD
party: Democrat
class: 1
- url: http://cardin.senate.gov/
+ url: http://www.cardin.senate.gov/
address: 509 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4524
fax: 202-224-1651
@@ -320,11 +320,11 @@
state: DE
party: Democrat
class: 1
- url: http://carper.senate.gov
+ url: http://www.carper.senate.gov
address: 513 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2441
fax: 202-228-2190
- contact_form: http://www.carper.senate.gov/contact/
+ contact_form: http://carper.senate.gov/public/index.cfm/email-senator-carper
office: 513 Hart Senate Office Building
- id:
bioguide: C001070
@@ -363,7 +363,7 @@
state: PA
party: Democrat
class: 1
- url: http://casey.senate.gov/
+ url: http://www.casey.senate.gov/
address: 393 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6324
fax: 202-228-0604
@@ -404,7 +404,7 @@
state: TN
party: Republican
class: 1
- url: http://corker.senate.gov/
+ url: http://www.corker.senate.gov/
address: 185 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3344
fax: 202-228-0566
@@ -465,7 +465,7 @@
state: CA
party: Democrat
class: 1
- url: http://feinstein.senate.gov
+ url: http://www.feinstein.senate.gov
address: 331 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3841
fax: 202-228-3954
@@ -540,7 +540,7 @@
state: UT
party: Republican
class: 1
- url: http://hatch.senate.gov/
+ url: http://www.hatch.senate.gov/
address: 104 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5251
fax: 202-224-6331
@@ -581,7 +581,7 @@
state: MN
party: Democrat
class: 1
- url: http://klobuchar.senate.gov/
+ url: http://www.klobuchar.senate.gov/
address: 302 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3244
fax: 202-228-2186
@@ -622,7 +622,7 @@
state: MO
party: Democrat
class: 1
- url: http://mccaskill.senate.gov/
+ url: http://www.mccaskill.senate.gov/
address: 506 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6154
fax: 202-228-6326
@@ -804,7 +804,7 @@
state: FL
party: Democrat
class: 1
- url: http://billnelson.senate.gov/
+ url: http://www.billnelson.senate.gov/
address: 716 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5274
fax: 202-228-2183
@@ -897,7 +897,7 @@
state: VT
party: Independent
class: 1
- url: http://sanders.senate.gov/
+ url: http://www.sanders.senate.gov/
address: 332 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5141
fax: 202-228-0776
@@ -959,7 +959,7 @@
state: MI
party: Democrat
class: 1
- url: http://stabenow.senate.gov/
+ url: http://www.stabenow.senate.gov/
address: 133 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4822
fax: 202-228-0325
@@ -1000,7 +1000,7 @@
state: MT
party: Democrat
class: 1
- url: http://tester.senate.gov/
+ url: http://www.tester.senate.gov/
address: 724 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2644
fax: 202-224-8594
@@ -1040,7 +1040,7 @@
state: RI
party: Democrat
class: 1
- url: http://whitehouse.senate.gov/
+ url: http://www.whitehouse.senate.gov/
address: 717 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2921
fax: 202-228-6362
@@ -1082,7 +1082,7 @@
state: WY
party: Republican
class: 1
- url: http://barrasso.senate.gov
+ url: http://www.barrasso.senate.gov
address: 307 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6441
fax: 202-224-1724
@@ -1170,7 +1170,7 @@
state: MS
party: Republican
class: 1
- url: http://wicker.senate.gov
+ url: http://www.wicker.senate.gov
address: 555 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6253
fax: 202-228-0378
@@ -1207,7 +1207,7 @@
state: TN
class: 2
party: Republican
- url: http://alexander.senate.gov/
+ url: http://www.alexander.senate.gov/
address: 455 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4944
fax: 202-228-3398
@@ -1288,7 +1288,7 @@
state: MT
class: 2
party: Democrat
- url: http://baucus.senate.gov
+ url: http://www.baucus.senate.gov
address: 511 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2651
fax: 202-224-0515
@@ -1317,7 +1317,7 @@
state: AK
class: 2
party: Democrat
- url: http://begich.senate.gov
+ url: http://www.begich.senate.gov
address: 111 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3004
fax: 202-224-2354
@@ -1378,7 +1378,7 @@
state: GA
class: 2
party: Republican
- url: http://chambliss.senate.gov
+ url: http://www.chambliss.senate.gov
address: 416 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3521
fax: 202-224-0103
@@ -1464,11 +1464,11 @@
state: MS
class: 2
party: Republican
- url: http://cochran.senate.gov
+ url: http://www.cochran.senate.gov
address: 113 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5054
fax: 202-224-9450
- contact_form: http://www.cochran.senate.gov/email.html
+ contact_form: http://www.cochran.senate.gov/public/index.cfm/email-me
office: 113 Dirksen Senate Office Building
- id:
bioguide: C001035
@@ -1508,7 +1508,7 @@
state: ME
class: 2
party: Republican
- url: http://collins.senate.gov
+ url: http://www.collins.senate.gov
address: 413 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2523
fax: 202-224-2693
@@ -1551,7 +1551,7 @@
state: TX
class: 2
party: Republican
- url: http://cornyn.senate.gov/
+ url: http://www.cornyn.senate.gov/
address: 517 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2934
fax: 202-228-2856
@@ -1638,7 +1638,7 @@
state: IL
class: 2
party: Democrat
- url: http://durbin.senate.gov
+ url: http://www.durbin.senate.gov
address: 711 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2152
fax: 202-228-0400
@@ -1682,7 +1682,7 @@
state: WY
class: 2
party: Republican
- url: http://enzi.senate.gov
+ url: http://www.enzi.senate.gov
address: 379A RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3424
fax: 202-228-0359
@@ -1744,7 +1744,7 @@
state: SC
class: 2
party: Republican
- url: http://lgraham.senate.gov/
+ url: http://www.lgraham.senate.gov/
address: 290 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5972
fax: 202-224-3808
@@ -1773,7 +1773,7 @@
state: NC
class: 2
party: Democrat
- url: http://hagan.senate.gov
+ url: http://www.hagan.senate.gov
address: 521 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6342
fax: 202-228-2563
@@ -1860,7 +1860,7 @@
state: IA
class: 2
party: Democrat
- url: http://harkin.senate.gov/
+ url: http://www.harkin.senate.gov/
address: 731 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3254
fax: 202-224-9369
@@ -1936,7 +1936,7 @@
state: OK
class: 2
party: Republican
- url: http://inhofe.senate.gov/
+ url: http://www.inhofe.senate.gov/
address: 205 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4721
fax: 202-228-0380
@@ -1965,7 +1965,7 @@
state: NE
class: 2
party: Republican
- url: http://johanns.senate.gov
+ url: http://www.johanns.senate.gov
address: 404 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4224
fax: 202-228-0436
@@ -2040,7 +2040,7 @@
state: SD
class: 2
party: Democrat
- url: http://johnson.senate.gov/
+ url: http://www.johnson.senate.gov/
address: 136 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5842
fax: 202-228-5765
@@ -2097,7 +2097,7 @@
state: MA
class: 2
party: Democrat
- url: http://kerry.senate.gov/
+ url: http://www.kerry.senate.gov/
address: 218 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2742
fax: 202-224-8525
@@ -2141,11 +2141,11 @@
state: LA
class: 2
party: Democrat
- url: http://landrieu.senate.gov/
+ url: http://www.landrieu.senate.gov/
address: 431 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5824
fax: 202-224-9735
- contact_form: http://www.landrieu.senate.gov/about/contact.cfm
+ contact_form: http://www.landrieu.senate.gov/?p=contact
office: 431 Dirksen Senate Office Building
- id:
bioguide: L000123
@@ -2198,7 +2198,7 @@
state: NJ
class: 2
party: Democrat
- url: http://lautenberg.senate.gov/
+ url: http://www.lautenberg.senate.gov/
address: 324 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3224
fax: 202-228-4054
@@ -2260,7 +2260,7 @@
state: MI
class: 2
party: Democrat
- url: http://levin.senate.gov/
+ url: http://www.levin.senate.gov/
address: 269 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6221
fax: 202-224-1388
@@ -2316,7 +2316,7 @@
state: KY
class: 2
party: Republican
- url: http://mcconnell.senate.gov/
+ url: http://www.mcconnell.senate.gov/
address: 317 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2541
fax: 202-224-2499
@@ -2345,7 +2345,7 @@
state: OR
class: 2
party: Democrat
- url: http://merkley.senate.gov
+ url: http://www.merkley.senate.gov
address: 313 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3753
fax: 202-228-3997
@@ -2382,7 +2382,7 @@
state: AR
class: 2
party: Democrat
- url: http://pryor.senate.gov
+ url: http://www.pryor.senate.gov
address: 255 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2353
fax: 202-228-0908
@@ -2445,7 +2445,7 @@
state: RI
class: 2
party: Democrat
- url: http://reed.senate.gov/
+ url: http://www.reed.senate.gov/
address: 728 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4642
fax: 202-224-4680
@@ -2474,7 +2474,7 @@
state: ID
class: 2
party: Republican
- url: http://risch.senate.gov
+ url: http://www.risch.senate.gov
address: 483 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2752
fax: 202-224-2573
@@ -2566,7 +2566,7 @@
state: KS
class: 2
party: Republican
- url: http://roberts.senate.gov/
+ url: http://www.roberts.senate.gov/
address: 109 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4774
fax: 202-224-3514
@@ -2625,11 +2625,11 @@
state: WV
class: 2
party: Democrat
- url: http://rockefeller.senate.gov/
+ url: http://www.rockefeller.senate.gov/
address: 531 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6472
fax: 202-224-7665
- contact_form: http://www.rockefeller.senate.gov/contact/email.cfm
+ contact_form: http://www.rockefeller.senate.gov/public/index.cfm/email-jay
office: 531 Hart Senate Office Building
- id:
bioguide: S001141
@@ -2670,7 +2670,7 @@
state: AL
class: 2
party: Republican
- url: http://sessions.senate.gov/
+ url: http://www.sessions.senate.gov/
address: 326 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4124
fax: 202-224-3149
@@ -2698,7 +2698,7 @@
state: NH
class: 2
party: Democrat
- url: http://shaheen.senate.gov
+ url: http://www.shaheen.senate.gov
address: 520 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2841
contact_form: http://www.shaheen.senate.gov/contact/
@@ -2760,7 +2760,7 @@
state: CO
class: 2
party: Democrat
- url: http://markudall.senate.gov
+ url: http://www.markudall.senate.gov
address: 328 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5941
fax: 202-226-7840
@@ -2824,7 +2824,7 @@
state: NM
class: 2
party: Democrat
- url: http://tomudall.senate.gov
+ url: http://www.tomudall.senate.gov
address: 110 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6621
fax: 202-226-1331
@@ -2852,7 +2852,7 @@
state: VA
class: 2
party: Democrat
- url: http://warner.senate.gov
+ url: http://www.warner.senate.gov
address: 475 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2023
fax: 202-224-6295
@@ -2907,7 +2907,7 @@
state: NY
party: Democrat
class: 1
- url: http://gillibrand.senate.gov
+ url: http://www.gillibrand.senate.gov
address: 478 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4451
fax: 202-225-1168
@@ -2936,7 +2936,7 @@
state: MN
class: 2
party: Democrat
- url: http://franken.senate.gov
+ url: http://www.franken.senate.gov
address: 309 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5641
contact_form: http://www.franken.senate.gov/?p=contact
@@ -2965,7 +2965,7 @@
state: DE
class: 2
party: Democrat
- url: http://coons.senate.gov/
+ url: http://www.coons.senate.gov/
address: 127A RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5042
contact_form: http://www.coons.senate.gov/contact/
@@ -3005,10 +3005,10 @@
state: WV
party: Democrat
class: 1
- url: http://manchin.senate.gov/
+ url: http://www.manchin.senate.gov/
address: 303 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3954
- contact_form: http://www.manchin.senate.gov/contact_form.cfm
+ contact_form: http://www.manchin.senate.gov/public/index.cfm/contact-form
office: 303 Hart Senate Office Building
- id:
bioguide: A000055
@@ -3339,7 +3339,7 @@
state: NH
class: 3
party: Republican
- url: http://ayotte.senate.gov
+ url: http://www.ayotte.senate.gov
address: 144 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3324
contact_form: http://www.ayotte.senate.gov/?p=contact
@@ -3573,12 +3573,12 @@
state: WI
party: Democrat
class: 1
- url: http://tammybaldwin.house.gov
- address: 2446 Rayburn HOB; Washington DC 20515-4902
+ url: http://www.baldwin.senate.gov/
+ address: 1 RUSSELL COURTYARD WASHINGTON DC 20510
phone: 202-225-2906
fax: 202-225-6942
contact_form: http://www.house.gov/formbaldwin/IMA/get_address.htm
- office: 2446 Rayburn House Office Building
+ office: 1 Russell Courtyard
- id:
bioguide: B001269
thomas: '02054'
@@ -4007,7 +4007,7 @@
state: CO
class: 3
party: Democrat
- url: http://bennet.senate.gov
+ url: http://www.bennet.senate.gov
address: 458 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5852
fax: 202-228-5036
@@ -4531,7 +4531,7 @@
state: CT
class: 3
party: Democrat
- url: http://blumenthal.senate.gov
+ url: http://www.blumenthal.senate.gov
address: 702 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2823
contact_form: http://www.blumenthal.senate.gov/contact/
@@ -4606,7 +4606,7 @@
state: MO
class: 3
party: Republican
- url: http://blunt.senate.gov
+ url: http://www.blunt.senate.gov
address: 260 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5721
contact_form: http://www.blunt.senate.gov/public/index.cfm/contact-form?p=contact-roy
@@ -4843,7 +4843,7 @@
state: AR
class: 3
party: Republican
- url: http://boozman.senate.gov/
+ url: http://www.boozman.senate.gov/
address: 320 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4843
contact_form: http://www.boozman.senate.gov/public/index.cfm/e-mail-me
@@ -5055,7 +5055,7 @@
state: CA
class: 3
party: Democrat
- url: http://boxer.senate.gov
+ url: http://www.boxer.senate.gov
address: 112 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3553
fax: 202-224-0454
@@ -5709,7 +5709,7 @@
state: NC
class: 3
party: Republican
- url: http://burr.senate.gov
+ url: http://www.burr.senate.gov
address: 217 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3154
fax: 202-228-2981
@@ -7304,8 +7304,8 @@
state: IN
class: 3
party: Republican
- url: http://coats.senate.gov
- address: "493 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC \n 20510"
+ url: http://www.coats.senate.gov
+ address: "493 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC\n 20510"
phone: 202-224-5623
contact_form: http://www.coats.senate.gov/contact/
office: 493 Russell Senate Office Building
@@ -7482,7 +7482,7 @@
state: OK
class: 3
party: Republican
- url: http://coburn.senate.gov
+ url: http://www.coburn.senate.gov
address: 172 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5754
fax: 202-224-6008
@@ -8229,7 +8229,7 @@
state: ID
class: 3
party: Republican
- url: http://crapo.senate.gov
+ url: http://www.crapo.senate.gov
address: 239 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6142
fax: 202-228-1375
@@ -9806,12 +9806,12 @@
state: IN
party: Democrat
class: 1
- url: http://donnelly.house.gov
- address: 1530 Longworth HOB; Washington DC 20515-1402
+ url: http://www.donnelly.senate.gov
+ address: B33 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-225-3915
fax: 202-225-6798
contact_form: http://donnelly.house.gov/issue_subscribe.shtml
- office: 1530 Longworth House Office Building
+ office: B33 Russell Senate Office Building
- id:
bioguide: D000482
thomas: '00316'
@@ -11048,12 +11048,12 @@
state: AZ
party: Republican
class: 1
- url: http://flake.house.gov
- address: 240 Cannon HOB; Washington DC 20515-0306
+ url: http://www.flake.senate.gov
+ address: B85 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-225-2635
fax: 202-226-4386
contact_form: http://www.house.gov/writerep
- office: 240 Cannon House Office Building
+ office: B85 Russell Senate Office Building
- id:
bioguide: F000459
thomas: '02061'
@@ -12365,7 +12365,7 @@
state: IA
class: 3
party: Republican
- url: http://grassley.senate.gov
+ url: http://www.grassley.senate.gov
address: 135 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3744
fax: 202-224-6020
@@ -13598,12 +13598,12 @@
state: NM
party: Democrat
class: 1
- url: http://heinrich.house.gov
- address: 336 Cannon HOB; Washington DC 20515-3101
+ url: http://www.heinrich.senate.gov/
+ address: B40D DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-225-6316
fax: 202-225-4975
contact_form: https://forms.house.gov/heinrich/contact-form.shtml
- office: 336 Cannon House Office Building
+ office: B40d Dirksen Senate Office Building
- id:
bioguide: H001036
thomas: 01749
@@ -13956,12 +13956,12 @@
state: HI
party: Democrat
class: 1
- url: http://hirono.house.gov
- address: 1410 Longworth HOB; Washington DC 20515-1102
+ url: http://www.hirono.senate.gov/
+ address: B40E DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-225-4906
fax: 202-225-4987
contact_form: http://hirono.house.gov/IMA/issue_subscribe.htm
- office: 1410 Longworth House Office Building
+ office: B40e Dirksen Senate Office Building
- id:
bioguide: H001061
thomas: 02079
@@ -13985,7 +13985,7 @@
state: ND
class: 3
party: Republican
- url: http://hoeven.senate.gov
+ url: http://www.hoeven.senate.gov
address: 120 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2551
contact_form: http://www.hoeven.senate.gov/public/index.cfm/email-the-senator
@@ -14538,7 +14538,7 @@
state: GA
class: 3
party: Republican
- url: http://isakson.senate.gov
+ url: http://www.isakson.senate.gov
address: 131 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3643
fax: 202-228-0724
@@ -15051,7 +15051,7 @@
state: WI
class: 3
party: Republican
- url: http://ronjohnson.senate.gov/
+ url: http://www.ronjohnson.senate.gov/
address: 386 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5323
contact_form: http://www.ronjohnson.senate.gov/public/index.cfm/contact
@@ -15979,7 +15979,7 @@
state: IL
class: 3
party: Republican
- url: http://kirk.senate.gov
+ url: http://www.kirk.senate.gov
address: 524 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2854
contact_form: http://www.kirk.senate.gov/?p=contact
@@ -16677,7 +16677,7 @@
state: VT
class: 3
party: Democrat
- url: http://leahy.senate.gov/
+ url: http://www.leahy.senate.gov/
address: 437 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4242
fax: 202-224-3479
@@ -16793,7 +16793,7 @@
state: UT
class: 3
party: Republican
- url: http://lee.senate.gov/
+ url: http://www.lee.senate.gov/
address: 316 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5444
contact_form: http://www.lee.senate.gov/public/index.cfm/contact
@@ -18372,7 +18372,7 @@
state: AZ
class: 3
party: Republican
- url: http://mccain.senate.gov/
+ url: http://www.mccain.senate.gov/
address: 241 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2235
fax: 202-228-2862
@@ -19685,7 +19685,7 @@
state: MD
class: 3
party: Democrat
- url: http://mikulski.senate.gov/
+ url: http://www.mikulski.senate.gov/
address: 503 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4654
fax: 202-224-8858
@@ -20311,7 +20311,7 @@
state: KS
class: 3
party: Republican
- url: http://moran.senate.gov
+ url: http://www.moran.senate.gov
address: 354 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6521
contact_form: http://www.moran.senate.gov/public/index.cfm?p=e-mail-jerry
@@ -20393,7 +20393,7 @@
state: AK
class: 3
party: Republican
- url: http://murkowski.senate.gov/
+ url: http://www.murkowski.senate.gov/
address: 709 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6665
fax: 202-224-5301
@@ -20411,7 +20411,7 @@
first: Christopher
middle: S.
last: Murphy
- official_full: Christopher S. Murphy
+ official_full: Christopher Murphy
bio:
birthday: '1973-08-03'
gender: M
@@ -20448,12 +20448,12 @@
state: CT
party: Democrat
class: 1
- url: http://chrismurphy.house.gov
- address: 412 Cannon HOB; Washington DC 20515-0705
+ url: http://www.murphy.senate.gov/
+ address: B40A DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-225-4476
fax: 202-225-5933
contact_form: http://www.house.gov/formchrismurphy/ic_zip_auth.htm
- office: 412 Cannon House Office Building
+ office: B40a Dirksen Senate Office Building
- id:
bioguide: M001151
thomas: '01744'
@@ -20567,7 +20567,7 @@
state: WA
class: 3
party: Democrat
- url: http://murray.senate.gov/
+ url: http://www.murray.senate.gov/
address: 448 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2621
fax: 202-224-0238
@@ -21708,7 +21708,7 @@
state: KY
class: 3
party: Republican
- url: http://paul.senate.gov
+ url: http://www.paul.senate.gov
address: 208 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4343
contact_form: http://www.paul.senate.gov/?p=contact
@@ -22678,7 +22678,7 @@
state: OH
class: 3
party: Republican
- url: http://portman.senate.gov
+ url: http://www.portman.senate.gov
address: 338 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3353
contact_form: http://www.portman.senate.gov/public/index.cfm/contact?p=contact-form
@@ -23438,7 +23438,7 @@
state: NV
class: 3
party: Democrat
- url: http://reid.senate.gov/
+ url: http://www.reid.senate.gov/
address: 522 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3542
fax: 202-224-7327
@@ -24592,7 +24592,7 @@
state: FL
class: 3
party: Republican
- url: http://rubio.senate.gov
+ url: http://www.rubio.senate.gov
address: 317 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-3041
fax: 202-224-3041
@@ -25548,7 +25548,7 @@
state: NY
class: 3
party: Democrat
- url: http://schumer.senate.gov/
+ url: http://www.schumer.senate.gov/
address: 322 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6542
fax: 202-228-3027
@@ -25892,11 +25892,11 @@
state: SC
party: Republican
class: 3
- url: http://timscott.house.gov/
- address: 1117 Longworth HOB; Washington DC 20515-4001
+ url: http://www.scott.senate.gov/
+ address: 113 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-225-3176
fax: 202-225-3407
- office: 322 Cannon House Office Building
+ office: 113 Hart Senate Office Building
- id:
bioguide: S000244
thomas: '01041'
@@ -26358,7 +26358,7 @@
state: AL
class: 3
party: Republican
- url: http://shelby.senate.gov/
+ url: http://www.shelby.senate.gov/
address: 304 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5744
fax: 202-224-3416
@@ -27977,7 +27977,7 @@
state: SD
class: 3
party: Republican
- url: http://thune.senate.gov/
+ url: http://www.thune.senate.gov/
address: 511 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-2321
fax: 202-228-5429
@@ -28277,7 +28277,7 @@
state: PA
class: 3
party: Republican
- url: http://toomey.senate.gov/
+ url: http://www.toomey.senate.gov/
address: 502 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4254
contact_form: http://www.toomey.senate.gov/?p=contact
@@ -28872,7 +28872,7 @@
state: LA
class: 3
party: Republican
- url: http://vitter.senate.gov/
+ url: http://www.vitter.senate.gov/
address: 516 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-4623
fax: 202-228-5061
@@ -30206,7 +30206,7 @@
state: OR
class: 3
party: Democrat
- url: http://wyden.senate.gov/
+ url: http://www.wyden.senate.gov/
address: 221 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-5244
fax: 202-228-2717
@@ -30729,7 +30729,7 @@
state: NV
party: Republican
class: 1
- url: http://heller.senate.gov/
+ url: http://www.heller.senate.gov/
address: 361A RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
phone: 202-224-6244
contact_form: http://www.heller.senate.gov/public/index.cfm/contact-form
@@ -31021,7 +31021,7 @@
phone: 202-224-3934
fax: 202-224-6747
office: G11 Dirksen Senate Office Building
- url: http://schatz.senate.gov
+ url: http://www.schatz.senate.gov
- id:
bioguide: S000018
thomas: 01009
@@ -31827,9 +31827,11 @@
office: 1432 Longworth House Office Building
- id:
govtrack: 412542
+ bioguide: W000817
name:
first: Elizabeth
last: Warren
+ official_full: Elizabeth Warren
bio:
gender: F
terms:
@@ -31839,6 +31841,9 @@
state: MA
party: Democrat
class: 1
+ url: http://www.warren.senate.gov
+ address: 2 RUSSELL COURTYARD WASHINGTON DC 20510
+ office: 2 Russell Courtyard
- id:
govtrack: 412543
bioguide: K000379
@@ -31876,9 +31881,11 @@
office: 1632 Longworth House Office Building
- id:
govtrack: 412545
+ bioguide: K000383
name:
first: Angus
last: King
+ official_full: Angus S. King, Jr.
bio:
gender: M
terms:
@@ -31888,6 +31895,9 @@
state: ME
party: Independent
class: 1
+ url: http://www.king.senate.gov/
+ address: 188 RUSSELL SENATE OFFICE BUILDING WASHINGTON DC 20510
+ office: 188 Russell Senate Office Building
- id:
govtrack: 412546
bioguide: K000380
@@ -32058,9 +32068,11 @@
office: 507 Cannon House Office Building
- id:
govtrack: 412554
+ bioguide: H001069
name:
first: Heidi
last: Heitkamp
+ official_full: Heidi Heitkamp
bio:
gender: F
terms:
@@ -32070,6 +32082,9 @@
state: ND
party: Democrat
class: 1
+ url: http://www.heitkamp.senate.gov/
+ address: G55 DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
+ office: G55 Dirksen Senate Office Building
- id:
govtrack: 412555
bioguide: C001096
@@ -32088,9 +32103,11 @@
office: 1032 Longworth House Office Building
- id:
govtrack: 412556
+ bioguide: F000463
name:
first: Deb
last: Fischer
+ official_full: Deb Fischer
bio:
gender: F
terms:
@@ -32100,6 +32117,9 @@
state: NE
party: Republican
class: 1
+ url: http://www.fischer.senate.gov
+ address: 825 HART SENATE OFFICE BUILDING WASHINGTON DC 20510
+ office: 825 Hart Senate Office Building
- id:
govtrack: 412557
bioguide: K000382
@@ -32366,9 +32386,11 @@
office: 325 Cannon House Office Building
- id:
govtrack: 412573
+ bioguide: C001098
name:
first: Ted
last: Cruz
+ official_full: Ted Cruz
bio:
gender: M
terms:
@@ -32378,6 +32400,9 @@
state: TX
party: Republican
class: 1
+ url: http://www.cruz.senate.gov
+ address: B40B DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
+ office: B40b Dirksen Senate Office Building
- id:
govtrack: 412574
bioguide: W000814
@@ -32511,9 +32536,11 @@
office: 323 Cannon House Office Building
- id:
govtrack: 412582
+ bioguide: K000384
name:
first: Timothy
last: Kaine
+ official_full: Tim Kaine
bio:
gender: M
terms:
@@ -32523,6 +32550,9 @@
state: VA
party: Democrat
class: 1
+ url: http://www.kaine.senate.gov/
+ address: B40C DIRKSEN SENATE OFFICE BUILDING WASHINGTON DC 20510
+ office: B40c Dirksen Senate Office Building
- id:
govtrack: 412583
bioguide: K000381
View
48 scripts/senate_contacts.py
@@ -20,37 +20,53 @@
# Map bioguide IDs to dicts. Reference the same dicts
# in y so we are updating y when we update biogiude.
bioguide = { }
+by_name = { }
for m in y:
- bioguide[m["id"]["bioguide"]] = m
+ if m["id"].has_key("bioguide"):
+ bioguide[m["id"]["bioguide"]] = m
+ party = m["terms"][-1]["party"][0]
+ state = m["terms"][-1]["state"]
+ last_name = m["name"]["last"]
+ member_full = "%s (%s-%s)" % (last_name, party, state)
+ print member_full
+ by_name[member_full] = m
url = "http://www.senate.gov/general/contact_information/senators_cfm.xml"
body = download(url, "legislators/senate.xml", force)
dom = lxml.etree.parse(StringIO.StringIO(body))
for node in dom.getroot():
bioguide_id = str(node.xpath("string(bioguide_id)")).strip()
- print "[%s] Processing Senator..." % bioguide_id
+ member_full = node.xpath("string(member_full)")
+
+ print "[%s] Processing Senator %s..." % (bioguide_id, member_full)
- if not bioguide_id in bioguide:
- print "Missing member", bioguide_id
- continue
-
+ # find member record in our YAML, either by bioguide_id or member_full
+ if bioguide.has_key(bioguide_id):
+ member = bioguide[bioguide_id]
+ else:
+ if by_name.has_key(member_full):
+ member = by_name[member_full]
+ else:
+ print "Missing member", bioguide_id, member_full
+ exit(0)
+
try:
- term = bioguide[bioguide_id]["terms"][-1]
+ term = member["terms"][-1]
except IndexError:
- print "Member has no terms", bioguide_id
+ print "Member has no terms", bioguide_id, member_full
continue
if today < parse_date(term["start"]) or today > parse_date(term["end"]):
- print "Member's last listed term is not current", bioguide_id, term["start"]
+ print "Member's last listed term is not current", bioguide_id, member_full, term["start"]
continue
if term["type"] != "sen":
- print "Member's last listed term is not a Senate term", bioguide_id
+ print "Member's last listed term is not a Senate term", bioguide_id, member_full
continue
if term["state"] != str(node.xpath("string(state)")):
- print "Member's last listed term has the wrong state", bioguide_id
+ print "Member's last listed term has the wrong state", bioguide_id, member_full
continue
if "district" in term: del term["district"]
@@ -60,16 +76,20 @@
if ", " in full_name: full_name, suffix = full_name.split(", ")
full_name += " " + unicode(node.xpath("string(last_name)"))
if suffix: full_name += ", " + suffix
- bioguide[bioguide_id]["name"]["official_full"] = full_name
+ member["name"]["official_full"] = full_name
+
+ member["id"]["bioguide"] = bioguide_id
term["class"] = { "Class I": 1, "Class II": 2, "Class III": 3}[ node.xpath("string(class)") ]
term["party"] = { "D": "Democrat", "R": "Republican", "I": "Independent", "ID": "Independent"}[ node.xpath("string(party)") ]
- url = str(node.xpath("string(website)")).strip().replace("http://www.", "http://")
+ url = str(node.xpath("string(website)")).strip()
term["url"] = url
term["address"] = str(node.xpath("string(address)")).strip()
term["office"] = string.capwords(term["address"].split(" WASHINGTON ")[0])
- # TODO there is also an "email" field with a URL to a contact form (is it always a URL?)
+ contact_form = str(node.xpath("string(email)")).strip()
+ if contact_form: # can be blank
+ term["contact_form"] = contact_form
save_data(y, "legislators-current.yaml")

0 comments on commit 3716a53

Please sign in to comment.
Something went wrong with that request. Please try again.