Searching for legislators by ZIP code
May 18, 2010 10:54 AM   Subscribe

I'm working on a project that, among other things, lets you look up contact info for your representatives in Congress by ZIP code - since I only require a 5-digit ZIP to keep things simple, the results sometimes includes more than one House district. I can have them refine the results by entering address or ZIP+4, but I was wondering roughly what percentage of people will have this problem. About how many ZIP codes span more than one Congressional district?
posted by OverlappingElvis to Computers & Internet (7 answers total) 1 user marked this as a favorite
 
This is really the kind of question that someone like yourself is best qualified to answer, as it sounds like you have a database from which you can pull that data. Some simple SQL can show you a count representatives per zip code and let you sort so that zip codes with more than one result show at the top. You can then count the total number of instances where that occurs.
posted by disillusioned at 10:59 AM on May 18, 2010


If your setting it up now, why not just query your own database? Think "count(senators)" and "group by zipcode". ;)
posted by jeffburdges at 10:59 AM on May 18, 2010


Part of the problem that you will run into is that Congressional districts are not equal size but rather apportioned on the basis of population. So, New York's congressional districts are smaller the Texas' or Alaska's. Zip codes are not necessarily apportioned similarly.

If you do have the underlying data you should be able to do a database query on it.
posted by dfriedman at 11:03 AM on May 18, 2010


This is a tricky problem, as congressional districts do frequently cross zip codes. Govtrack has them all, and I believe the data is available from them directly. Alternatively, if you are setting up some GIS database the original files are all here.
posted by a womble is an active kind of sloth at 11:12 AM on May 18, 2010


Searching for congresscritters by zip code has already been implemented, for example at house.gov. You may be reinventing the wheel here, and depending on what you want this for it may make sense to just link to someone who's already done it.

dfriedman: the population "of" a typical zip code seems to be larger in high-density areas. For example: the city of Philadelphia has about fifty zip codes for 1.5 million people, or 30,000 people per zip code. A quick google indicates that there are about 45,000 zip codes in total, or one for about every seven thousand people. (I didn't cherry-pick Philadelphia; it's just the example I know best.) Roughly speaking, zip codes correspond to post offices, so this is to be expected because post offices in high-density areas can conveniently serve more people. The Census Bureau has something called ZIP code tabulation areas that they report population figures for, so this could be checked.
posted by madcaptenor at 11:19 AM on May 18, 2010


Best answer: A whole lot. A whole damn lot. I would recommend including the refinement box at the very beginning of the search. (This caused me innumerable headaches in a non-profit advocacy deal I worked on earlier this year.)

You can get an idea of the numbers by looking at the Census' zip code tabulation areas. Choose, say, CA, and look at Congressional districts by ZCTA. There you can see which zip codes (usually the more populous) lie in multiple districts.
posted by quadrilaterals at 11:49 AM on May 18, 2010


Unfortunately I don't the number, but like quadrilaterals says, it's a hefty number. Good news is, there are others out there who have solutions to the problem.

Most sites actually use the same tactic, matching the users information as best as possible given the address they've entered, then querying them for additional information if a conflict exists.

Here are 2 approaches:

- GovIt has a simple zip lookup in AJAX that then asks for more information inline if needed.

- Greater Reading asks for the zip, then prompts for more information to deliver a fuller picture.
posted by 4months at 11:51 AM on May 18, 2010


« Older "When I'm washing windows"   |   Why do your boots leave t-rex prints? Newer »
This thread is closed to new comments.