NOTICE:: CivicSpace is Faulty!(zipcode/city/state DB Dump)

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
matt1019
Forum Contributor
Posts: 172
Joined: Thu Jul 06, 2006 6:41 pm

NOTICE:: CivicSpace is Faulty!(zipcode/city/state DB Dump)

Post by matt1019 »

Hi Guys,

Just thought i let you guys know that the database table dump of US City/state/zip from civicspace http://civicspacelabs.org/home/developers/download is faulty.

Sorry, I should say "Partly" Faulty.... but faulty nonetheless.

It's missing 00's & 0's from some of the zip codes.

for example, if the zip code has 2 "00's" before any other number (>0) it just displays the zip code in 3 digits. for example, the first INSERT query has the following #:

"210" (NOTICE that its' missing 00 at the beginning)

I have corrected this issue and have uploaded a corrected file...

http://www.upload2.net/page/download/1Z ... s.rar.html

If you have already found a workaround this, then please ignore this post ;)

hope this helps anyone who encountered similar problems

-Matt
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

It is not faulty, it is just storing the zip as integers instead of strings. The work around is checking the string length of the ZIP during use of it (or, like I did, make the column a varchar(5) field - varchar(10) for + 4's).
matt1019
Forum Contributor
Posts: 172
Joined: Thu Jul 06, 2006 6:41 pm

Post by matt1019 »

Damnn!!!!!

I used the same file that I uploaded at upload2.net..... samn damn result!

the 00's are omitted!

I changed the column from int to varchar(5). yet the same damn result.... so frustrating!

Everah, can you please suggest a workaround this issue? (I already tried varchar(5) instead of int column type)


thanks,

-Matt
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Hang on, let me see if can get a dump of mine. The reason the change on the column didn't help is because after the type change, you need to add the 00 and 0 to the front of the short zips.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Ok, I did a dump of my 41K record table. It is at http://www.everah.com/freebies/zipcode_dump.sql. Please take note that this is a massive 2MB file. I didn't feel like Zipping it up, though I can if anyone wants it zipped. FYI, this is the structure...

Code: Select all

CREATE TABLE `zoom_zipcodes` (
  `zc_id` int(11) NOT NULL auto_increment,
  `zc_value` varchar(5) NOT NULL default '',
  `zc_city` varchar(50) NOT NULL default '',
  `zc_state` varchar(2) NOT NULL default '',
  `zc_lat` double(8,6) NOT NULL default '0.000000',
  `zc_lon` double(8,6) NOT NULL default '0.000000',
  PRIMARY KEY  (`zc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
matt1019
Forum Contributor
Posts: 172
Joined: Thu Jul 06, 2006 6:41 pm

Post by matt1019 »

Thanks Everah!

-Matt
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

matt, come on man, this did not need another thread.
matt1019 wrote:Hey Guys,

Check this site out if you are into making zip/city/state table

http://www.cfdynamics.com/cfdynamics/zipbase/index.cfm

the site is in Cold Fusion.... but the database comes in two formats:

text version
MS Access version

Not sure How this could be used with php but.... it's here as an alternative for anyone who's looking for one ;)

Hope this helps,

-Matt
matt1019
Forum Contributor
Posts: 172
Joined: Thu Jul 06, 2006 6:41 pm

Post by matt1019 »

Sorry feyd.

my apologies.

I assumed that it had to be another thread :oops:

sorry.

-Matt
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

We're good. Image
Post Reply