Skip to content

Commit

Permalink
deal with vacant smds properly
Browse files Browse the repository at this point in the history
  • Loading branch information
stvnrlly committed Mar 8, 2014
1 parent 16d5e0c commit fad7784
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/scraped-anc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@
"address": "Washington, DC 20011",
"email": "[email protected]",
"first_name": "Vacant",
"last_name": "Vacant",
"last_name": "",
"middle_name": "",
"nickname": "",
"official_name": "Vacant",
Expand Down Expand Up @@ -1697,7 +1697,7 @@
"address": "",
"email": "[email protected]",
"first_name": "vacant",
"last_name": "vacant",
"last_name": "",
"middle_name": "",
"nickname": "",
"official_name": "vacant",
Expand Down Expand Up @@ -2346,7 +2346,7 @@
"address": "Washington, DC 20003",
"email": "[email protected]",
"first_name": "Vacant",
"last_name": "Vacant",
"last_name": "",
"middle_name": "",
"nickname": "",
"official_name": "Vacant",
Expand Down Expand Up @@ -2863,7 +2863,7 @@
"address": "",
"email": "[email protected]",
"first_name": "Vacant",
"last_name": "Vacant",
"last_name": "",
"middle_name": "",
"nickname": "",
"official_name": "Vacant",
Expand Down
2 changes: 2 additions & 0 deletions scrape_anc.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
else:
data[smd]['suffix'] = ''
data[smd]['last_name'] = name[len(name) - 1]
if data[smd]['last_name'] in ['Vacant', 'vacant']:
data[smd]['last_name'] = ''
for word in name[1:len(name) - 1]: #nickname or Middle Name?
if word[0] == '"' or word[0] == '(':
data[smd]['nickname'] = word
Expand Down

0 comments on commit fad7784

Please sign in to comment.