Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Slashdot.org News

Linux Solutions for Zip Codes and Congressional Districts? 30

davidmcn asks: "There is an overabundance of solutions available for the Microsoft brand of operating systems which allow the mapping of zip-codes to congressional districts. However, I work for a small consulting firm that works primarily with Linux/Apache/PHP/MySQL, and would like to find a way to take address information, and create mailings based on Congressional Mappings. Does anyone know of a solution that is available for a linux enviroment? Even something as simple as a list of Congressional Districts and all zip codes underneath them would suffice."
This discussion has been archived. No new comments can be posted.

Linux Solutions for Zip Codes and Congressional Districts?

Comments Filter:
  • Some sources (Score:3, Informative)

    by dagnabit ( 89294 ) on Friday September 13, 2002 @04:26AM (#4250036)
    <karma whoring>

    I ran "zip codes" "congressional districts" through Google [google.com] and got back a bunch of links.

    This place [tpsnet.com] seems to have zip code info sliced several ways, including congressional districts, for a fee.

    This place [electiondataservices.com] seems to specialize in providing info like this as well...

    </karma whoring>

    With the yearly redistricting that some/all states do, it's probably easiest to purchase the info. Perhaps even from the Post Office themselves... congressional district info seems to be a component field that they track anyway... call the National Customer Support Center at 1-800-238-3150. Hours of operation are 7:00 AM through 5:30 PM CT.
  • Comment removed based on user account deletion
    • How is a zip code going to help a spammer? The poster is looking to send junk snail mail, and frankly I'm more in favor of that because you have to spend time sorting your database, printing your mail, sorting your mail, trucking it down to your local bulk mail center, and paying postage.
  • Easy (Score:4, Informative)

    by benh57 ( 525452 ) <bhines@alumn[ ]csd.edu ['i.u' in gap]> on Friday September 13, 2002 @06:50AM (#4250254) Homepage
    Using google I found this in about 30 seconds:

    Congress Merge [congressmerge.com] offers tables linking zip codes to congressional and/or state legislative districts and congressional databases Data can be provided either as a text (flat) file or an Access database

    So there you go.. A flat text file could easily be imported into mysql surely.

  • by a2800276 ( 50374 ) on Friday September 13, 2002 @07:27AM (#4250295) Homepage
    Why is it that the great majority of threads in this story follow the line:

    "Great, help you out, you're just a dirty rotten spammer that wants to build a big fat spamdatabase, you spamlord!"

    Did any of you guys read the story? What possible use could it be for a spammer to know what Zip code is in which congressional district, or vice versa? Give the guy a break, not everyone is malicious.

    And what's up with "you're using Linux, so that means you're just out to get a free lunch"? Even if that were true, who cares about peoples motivation for using Linux, or Windows for that matter.

    • It's fairly obvious that this guy wants to send mail to people. He said so. "Create mailings" is pretty clear. He apparently would like to be able to tailor the message according to which congressional district the recipient is in. So a likely case would be a PAC or political party that would like to send out a "sample ballot" or some other similar mailing. Which personally I'd roundfile in under five seconds... but yeah, what's the BFD?
  • In case anyone is interested in how this works outside of the US...

    In the UK the administrative regions don't map to postcodes (which is fairly insane). However, as you can't post census forms to 'John Q. Public, Borough of Wandsworth', the census bureau take care of producing a mapping every ten years.

    This product [statistics.gov.uk] is the 1991 copy, quite cheap at only £740 for corporate use (compared to other map data)

    This one [statistics.gov.uk] is from the most recent census and is the only mapping that covers the new boundaries in Scotland. A bit steep at £8000-odd. I say steep, because for roughly the same price, the Ordnance Survey will sell you (at the top whack corporate rate) the source data this is based on, complete with geometries for every postcode and every region. Doh!

    If you just need something to narrow down someones administrative area from their postcode (to a handful at most), on the very very very cheap...Download this map of the regions [ordsvy.gov.uk] and this map of the postcodes [geoplan.com], overlay them in photoshop, and figure out the mapping for yourself.

    • Our zip codes are fairly small there are at most 100,000 although we probably are not using all of them yet, most small towns have their own, and most larger cities have several, and there are only about 450 congressional districts, which range in size from a city, to whole states in the west, to my favorites the gerrymanders, which are districts created with the main purpose of ensuring that the party that does the redistricting gets the most seats in the house. Some of them are fairly interesting. One district, which was tossed out by a judge, got as narrow in parts as to not even include the entire width of a 4 lane divided highway. It was set up to include several towns along the highway, which would preserve a small majority of one of the parties in the entire district. Another common tactic, is creating a district that is overwhelmingly liberal or conservative, which allows you to make more districts that are slightly the opposite. Politics is a pretty funny game sometimes.
  • The real need is to have a spatial representation for geographic region information. You are trying to translate between two specific maps: zip codes to congressional districts. Actually, 5-digit zip codes are probably not accurate enough (districts cut across zipcode zones) and then you get into the realm of geocoding which attempts to translate a real world address into latitude, longitude and accuracy.

    In the proprietary realm, there are products like Mapinfo and Mapmarker for address geocoding and zoning. Oracle has a spatial option which creates object types in the database for storing arbitrary sets of points and polygons and querying based on their intersection/overlap properties.
  • What you are are looking for is freely provided by the census in the form of TIGER/line files. TIGER Data contains all the census data from 2000. You can find an overview here: Tiger Overview [census.gov]
  • Bad news: my understanding is that congressional districts do not terminate along neat zip-code boundaries. At one time, my zip code was divided between TWO congressmen, TWO state senators, and THREE state assemblypersons. Thus, to do proper mapping, you need street-address level divisions or perhaps precinct maps. I would think that if you buy voter-registration data from the counties (states?) it would designate what district each voteris in.

    Of course, you could simply alter the letter for multi-district zip codes, urging the voter to vote for whichever of these candidates is on their ballot, but that might seem awkward.

    Generally, politicians don't campaign very heavily in this town because of the split, and instead concentrate their campaigning in places where all the voters are in the "right" district.

    If you rely just on general mailing addresses, be aware that many folks have a mailing address different than there residence and voting address. I've almost always had a P.O. Box, and when I lived in San Francisco and Oakland, the zip code for the PO Box was different from my home. If your list may include office addresses, then things get even more complicated, due to commuting patterns.

    Finally, the U.S. post office often assigns zip codes based on their carrier routes, and not based on political boundaries. Thus, a number of homes in unincorporated areas adjacent to Danville and San Ramon, California, in the Tassajara Valley, are politically in those Contra Costa County political districts, yet they share my Pleasanton zip code, which is in Alameda County.

If you want to put yourself on the map, publish your own map.

Working...