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

Use OCD identifiers for districts and legislatures #4

Open
alexmingoia opened this issue Aug 14, 2019 · 3 comments
Open

Use OCD identifiers for districts and legislatures #4

alexmingoia opened this issue Aug 14, 2019 · 3 comments

Comments

@alexmingoia
Copy link
Member

We should use OCD identifiers for districts and legislatures. Right now they're identified by their name, but that name might not match what is in our database.

@alexmingoia
Copy link
Member Author

This will be a lot of work because at the city/county level many OCD IDs will need to be applied for.

@dallasjc
Copy link
Contributor

dallasjc commented Sep 1, 2019

Is this something I can help with? There are a few ways geographically defined legislatures could be useful for people I'm working with.

Does OCD = Open Civic Data?

How would I apply for the IDs? Is it something other than the this format?

ocd-division/country:us/state:nc/county:wake
http://docs.opencivicdata.org/en/latest/proposals/0002.html

@alexmingoia
Copy link
Member Author

alexmingoia commented Sep 2, 2019

OCD ID stands for Open Civic Data Identifier, a standard for globally unique IDs for open civic data. One of the many useful things to come from the Sunlight Foundation.

We'd need to:

  • Add ocd_id fields to api.legislatures and api.legislature_offices, add unique constraint, and update all dependent views.
  • Update private.upsert_user_legislatures to insert api.user_legislatures with legislatures that have offices with boundaries that the user lives within.
  • Update src/tasks/import_legislatures.js task to use OCD IDs.
  • Migrate all the existing legslatures and offices.
  • Apply for any new OCD IDs we need to generate.
  • Update any other code that requires one-to-one association between a legislature and city/state/county.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants