davglass / zipcodes

Zipcode lookup node module
Other
157 stars 83 forks source link

Missing zip codes #25

Closed CyberCyclone closed 5 years ago

CyberCyclone commented 5 years ago

There appears to be a lot of missing ZIP codes. E.g, 62117 isn't being returned and the return JSON doesn't seem to have it, while the CSV from http://federalgovernmentzipcodes.us/ does have it.

I'm using chancejs library to do a random zip lookup and it seems to always fail. It looks like chance does purely random numbers, not valid zips.

davglass commented 5 years ago

I don't see 62117 inside the data file. I see a record id number of that which is the zip code of 77437. Also doing a quick google search gives me that in France not the US.

62117,"77437","STANDARD","WEST PAYNE","TX","NOT ACCEPTABLE",29.19,-96.27,-0.09,-0.86,0.48,"NA","US","West Payne, TX","NA-US-TX-WEST PAYNE","false",7483,13671,242942574,
CyberCyclone commented 5 years ago

You're correct, it was the record id I was looking at.

I've had a look at the source code of Chance and the random ZIP code function says that it's U.S, however it's purely just doing a random number; it's not grabbing a valid code from a database.