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."
Re:No (Score:3, Insightful)
Presumably he already has a database of people addresses. All he needs to do is figure out which congressmen correspond to each of those addresses, based on their zipcodes. Nobody's asking for a list of the addresses, congressmen, and sexual orientation of every person in the country.
Furthermore, even if you consider his mailings as "junk mail", how is it an invasion of your privacy to recieve it? Unless he puts a little wireless camera in every envelope, the only bad thing that can come of it is a little more junk in the landfills.
Really now.
Alright, so junk mail is annoying. But from my impression of his question, this doesn't even sound like email spam. So what if it is? He's not scamming people, or increasing the size of anyone's penis. This would be a list where you specifically ask to recieve information about political, um, stuff.
OK, so I'm making assumptions too. But hopefully you won't jump to such harsh and damning conclusions every time somebody mentions "zip code" and "mailing list" in the same sentence. There *are* legitimate reasons to want this.
Re:No (Score:3, Informative)
http://www.house.gov/writerep/
That is easy. I belive he wants a voter registration database for the districts themselves...
Mass mailings are Spam.
Keeping an individual specific private database is Privacy invasion. Can I call up his consulting firm and ask them what they know about me? Can I have myself removed? Would anyone realisticly opt-in to this? no. 99% would opt out.
Walking into Kragen Auto Parts I'm pissed that I can't just pay for my parts and leave. No, they keep a damn database. They know everything they've sold me for the past 5 years. Problem is I've only benn shopping ther for 2 years. The database is cataloged by phone numbers. The jerkoff that had my phone number wrote bad checks all over town.
So not only are there databases everywhere about me, most of them are entirely wrong. Kragen can't delete the database entry until they get paid. I get hasseled just because I want a battery.
Databases are privacy invasive bullshit.
Political database... what the hell is this? 1984?
Re:No (Score:4, Insightful)
But these same databases are what allows me, the typical mechanically-inclined consumer, to keep bringing back a set of brake pads and rotors every six months or so. This allows me to drive at stupid-fast speeds without having to worry that the brakes might not have enough friction material left to handle yet another triple-digit-to-zero stop, increasing the survival rate of the human species by an order of magnitude, I'm sure.
Therefore, such databases are good for humanity.
Also works with water pumps and thermostats, which for some reason are fundamentally troublesome on my vehicle. I get new ones every year or so, for free.
Also works with spark plugs, wires, alternators, and a whole lot of other consumable (and not-so-consumable) items.
And dig this: I don't need a receipt. I just show up and buy parts. When I'm done replacing them, hours, days, weeks, or months later, I just take them back in the same box and get refunded.
Many times, the same part is made in the same place, with the same tools, but sold under different names with different warranties. I usually pick the long warranty.
And, besides, it's nowhere near as scary as what collection agencies will do to you. These are just fucking car parts, the same quality of which is available down the street from a completely different retailer for about the same amount of money if things get too weird at a particular shop.
And dig this, as well: The parts store I generally go to tracks by phone number, name, and address. It seems to be a pretty fool-proof way to go about things, unless an enemy of yours is walking around pretending to be you. And if that's happening, you've got more things to worry about than such annoyances as a weak car battery. [as an aside: the database has some sort of UNIX-like backend, controlled by plain dumb terminals, which is inarguably a boon for the human race. I can't imagine how tedious the process would be if it relied on a series of look, see, click, wait, type, look, see, click, wait repetitions under Windows.]
Paranoid linux geeks (Score:2)
Maybe the database of zip codes has been bought from acme-evil-spam-company, but, oh shit, maybe just maybe it hasn't!! Maybe those people all happily gave their zipcodes and salaries in return for the chance to win a new car. Maybe they gave that information because it only took them 10 seconds to do and they felt like helping out some research company.
Jeez, lighten up will you.
Um...No (Score:2)
No it's not. Could somebody call you and demand that they be removed from your rolodex?
Privacy invasion...that's just silly.
Political database... what the hell is this? 1984?
No, more like 1930; databases have always been essential to getting elected. It's just that they used card catalogs back then. Nobody has ever been elected to Congress without an ass-kicking database. If you don't know that, you ought not be making political accusations.
-Waldo Jaquith
Re:No (Score:2)
That is easy. I belive he wants a voter registration database for the districts themselves...
How do you extrapolate that from the original request:
"Even something as simple as a list of Congressional Districts and all zip codes underneath them would suffice."
Some sources (Score:3, Informative)
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.
Re: (Score:2)
Spam? (Score:1)
Re: (Score:2)
Easy (Score:4, Informative)
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.
Why does everyone naturally assume spam? (ot) (Score:4, Insightful)
"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.
Re:Why does everyone naturally assume spam? (ot) (Score:1)
The UK situation (Score:2)
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.
Re:The UK situation (Score:2)
Generalize the Problem (Score:2)
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.
TIGER Data (Score:2)
Zip codes don't map neatly to political districts (Score:2)
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.