Quick and easy Congressional District lookups for your CiviCRM contacts

Published
2010-01-18 05:45
Written by
dalin - member of the CiviCRM community - view blog guidelines
By definition CiviCRM is used by many organizations in the political sphere. For those organizations working in the US one useful metric to have on your contacts is their congressional district. Up until now this has usually been accomplished with either custom code, or exporting your contacts, sending them through a bulk lookup tool, and re-importing them. There is now an easier way to get this with the CiviCRM Sunlight Congressional District module. Yes the name is long but verbosity is perhaps better than obscurity when naming your open source project* (Login Toboggan and Deadwood I'm looking at you). As the name implies this module integrates with the excellent Sunlight API. The Sunlight API is a way for developers to easily fetch information about congressional districts and the members of congress that represent them. With this module you can now integrate this into CiviCRM with ease:
  1. Enable the module
  2. Create some custom fields in CiviCRM to store the congressional district
  3. Tell the module about your fields
  4. Watch as the module fetches information from Sunlight
The module also exposes its own API so that you can go even further to fit your site's needs (list all users in a district, show the members of congress for a district, etc. ). As an example of how to utilize this API it includes an additional module called "Congress" that provides a user tab showing the user's congress members, and a directory of all your user's districts. The module is currently in Beta. There's some polishing that needs to be done to make the module useful in a wide variety of use cases. But don't let that hold you back. The module is used in production on at least one major site and has already done several hundred thousand lookups. * The downside to such a long name is that through the rest of this blog post I need to refer to it as "the module" :P This has been cross-posted to advomatic.com
Filed under

Comments

Anonymous (not verified)
2010-01-19 - 15:05

This is great. Thanks for this tool. I've been looking forward to there being a feature like this.

Now it would be great if we could expand that to other elected officials, such as state representatives and senators. I know a lot of organizations who use other CRM tools instead of CiviCRM for two reasons:

- advocacy tools
- elected representative lookup

If we could get those tools into CiviCRM, we can get a lot more organizations using CiviCRM.

Anonymous (not verified)
2010-02-15 - 20:04

This is great to see. Thanks so much for your work on the project. I work with groups in Massachusetts who would love to have CiviCRM lookup state representatives as well. Wondering if there are plans to incorporate the work going on with the Fifty State Project to update this module or other modules to provide this same functionality for people at a state level.

Ah cool! I knew that there was a 50 state project, but I didn't know anything about it. The module could be extended to include this, albeit with a fair amount of work involved (It took a lot more than I expected to get the Federal level working).