Closed lavaturtle closed 7 years ago
Looks great, thank you! Can you share the specific approach taken to generate these ids? I'd like to add that to TheWalkers/congress-turk and district office validation tests (once we have them!)
Sure! I ran this script to add the IDs to the file: https://github.com/controlshift/congress-legislators/blob/add-ids-to-offices-script/add_ids_to_offices.rb
(Just running that on the existing file also caused other YAML normalization changes, so what I actually did was: load/dump the YAML on a different local branch to normalize it; run the script on the normalized file; cherry-pick that second commit to get just the ID changes)
This modifies the
legislators-district-offices.yaml
file to add a uniqueid
field to each office record. The purpose is to make it easier for clients ingesting the data to update their records when the file changes.The ID is comprised of the legislator's bioguide ID, the name of the city the office is in, and an optional integer for disambiguation.