Give your visitors the ability to lookup US Congress members for specific zip codes and addresses.
Google GeoCoding API is used to obtain the longitude and latitude of a particular address. This is the most accurate way to determine within which legislative districts an address is located.
GeoCoding is not 100% accurate. Sometimes an entered address will not return the correct location. For this reason, we have included a Google Map the visitor can use to verify the location is correct.
The plugin’s Google map has a movable pointer you can click and drag to more accurately target the desired location. The address in the input window (and the corresponding legislators) will automatically recalculate each time the red marker is repositioned.
You can tell Google of any inaccuracies by clicking the link in the lower right corner of the map: “Report a map error”.
We, the developers, created CongressLookup plugin to be free and do not limit how much you can use it, however, both Google GeoCoding and Sunlight Labs have restrictions and/or limits imposed when using their APIs. Please consult their websites for more information on the legal use of their APIs.
Google GeoCoding API limits its use to 2,500 requests per IP address per day.
We have added a cache feature you can set to reduce the number of requests made to the API. The default setting will clear the cache every 30 minutes. If you anticipate 2,500 requests per day will not be enough for your site, even with the caching, please contact us about a custom solution.
CongressLookup uses free databases provided by the Sunlight Foundation whose mission is to make government more transparent and accessible. Part of what they do is maintain free databases of information about the US government. We make use of their legislator information and legislator photos databases in CongressLookup plugin. From Sunlight Labs website:
Sunlight Labs takes data inside and about government and transforms it into services developers can use. We do it for free because we think that if people can see what’s going on, it makes the country better. It might not sound like the most glamorous life ever, but it’s pretty great for us, as long as you make use of it.
You must use your own API key because it is required by their terms of service:
Usage of Sunlight Services depends upon an API key which should only be used by the individual/organization which requested it. Sharing or distribution of API keys is not permitted.
To obtain a free API key for your site, create a free account and it will be emailed to you.
Simply enter and save it on the CongressLookup Admin Settings page.
WP Admin > Settings > CongressLookup
Members of Congress change after elections and sometimes leave or are replaced midterm. When this happens, your locally hosted zip file of their pictures needs to be updated to stay accurate. There is a button in the plugin Admin settings to download the most recent copy of the picture zip file. Note: when the Sunlight Labs picture folder changes, you will receive a notice in your WP Admin to update the pictures.
The following information can be displayed for each legislator. You can turn any of these on/off in the Admin settings:
Minimum information needed is a 5-digit zip code. However, some zip codes cover more than one congressional district so the more of the address is entered, the more accurate the results will be.
There are three themes to choose from:
Use the following shortcode in a page or post:
Use the following code in your template, outside of the loop:
<?php echo do_shortcode("[CongressLookup]"); ?>
Requires: 3.0 or higher
Compatible up to: 3.9.1
Last Updated: 2014-6-1
1 of 2 support threads in the last two months have been resolved.
Got something to say? Need help?