mirror of
https://github.com/unitedstates/congress-legislators.git
synced 2025-12-19 09:50:37 -05:00
add district offices to sweep.py tool and run it
This commit is contained in:
@@ -1997,31 +1997,6 @@
|
||||
latitude: 34.3671955
|
||||
longitude: -89.5213847
|
||||
phone: 662-236-1018
|
||||
- id:
|
||||
bioguide: C000714
|
||||
govtrack: 400080
|
||||
thomas: '00229'
|
||||
offices:
|
||||
- id: C000714-detroit
|
||||
address: 231 W. Lafayette
|
||||
building: 669 Federal Bldg
|
||||
city: Detroit
|
||||
state: MI
|
||||
zip: '48226'
|
||||
latitude: 42.3303626
|
||||
longitude: -83.0496208
|
||||
fax: 313-226-2085
|
||||
phone: 313-961-5670
|
||||
- id: C000714-westland
|
||||
address: 33300 Warren Rd.
|
||||
suite: Suite 13
|
||||
city: Westland
|
||||
state: MI
|
||||
zip: '48185'
|
||||
latitude: 42.339678
|
||||
longitude: -83.3701998
|
||||
fax: 734-675-4218
|
||||
phone: 734-675-4084
|
||||
- id:
|
||||
bioguide: C000754
|
||||
govtrack: 400081
|
||||
|
||||
@@ -31,5 +31,14 @@ def run():
|
||||
socialmedia_current.remove(member)
|
||||
save_data(socialmedia_current, "legislators-social-media.yaml")
|
||||
|
||||
# remove out-of-office people from district offices
|
||||
print("Sweeping district offices...")
|
||||
district_offices = load_data("legislators-district-offices.yaml")
|
||||
for member in list(district_offices):
|
||||
if member["id"]["bioguide"] not in current_bioguide:
|
||||
print("\t[%s] Ding ding ding! (%s)" % (member["id"]["bioguide"], member["offices"]))
|
||||
district_offices.remove(member)
|
||||
save_data(district_offices, "legislators-district-offices.yaml")
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
|
||||
Reference in New Issue
Block a user