Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unique IDs for district offices #13

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

lavaturtle
Copy link

This modifies the legislators-district-offices.yaml file to add a unique id 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.

@tcarobruce tcarobruce merged commit 07f1f40 into TheWalkers:master Feb 22, 2017
@tcarobruce
Copy link
Collaborator

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!)

@lavaturtle
Copy link
Author

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)

@lavaturtle lavaturtle deleted the add-office-ids branch February 22, 2017 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants