Sign in to follow this  
Followers 0
ntheory

More geocode fun

13 posts in this topic

This could be a very long story, but I'll cut to the (still long) chase.

I wanted to update the geocode information because someone (can't remember who) said that the info was out of date. So I poke around and stumble across the motherload. These guys are the real deal source for this kind of information. So, naturally, I download it all and start hacking.

I built an extended NPA-NXX database and updated my NPA page. I just realized that the UI changes from the previous version broke the command line client so I fixed that too. The older command line clients will need to be updated... actually, I could fix that, but I suppose it's no big deal for everyone to grab the new script since it has added functionality anyway.

So, if you check out my NPA page you'll notice the NXX box. If you only enter the NPA it uses the same database as before. If you enter NPA and NXX you'll get all kinds of neat info that you didn't get before (phreaks will recognize it, it's all magic to me).

For example I tried a random NPA-NXX (702-543). Apparently it's in Nevada. The script returns the following:

NPA-NXX: 702-543 State: NV UseCode: AS OCN: 2817 Company: PAC - WEST TELECOMM, INC. - NV RC: LAUGHLIN Switch: LSVKNV97DS0 IG: I

As before all the information is available for download. I converted their MDB to a MySQL friendly schema and table info (in one file), modified all the scripts and posted the source, and that's that.

Lemme know if anyone finds it useful (or anyone finds bugs of course). Oh, I'll update the use codes tomorrow so they're human readable.

0

Share this post


Link to post
Share on other sites

nice.. but you need to add a "Y" in the date() for the title. so it doesnt error out

0

Share this post


Link to post
Share on other sites

Ah. I totally forgot to check into that. It's fixed now.

Thanks!

0

Share this post


Link to post
Share on other sites

CLLI codes and everything... that is off the chain!

0

Share this post


Link to post
Share on other sites

Thanks. :)

These are the things that happen when you get extra large coffee with sugar and no milk...

0

Share this post


Link to post
Share on other sites

I was wondering what you where working on in irc, now I know.. lol we all have our projects, heh Iv been working hard too.

(I dont want to give up this borrowed laptop :( )

0

Share this post


Link to post
Share on other sites

Handy little tool. Hmm.........Good database with lots of useful info and codes thanxs, NTheory:cool:

0

Share this post


Link to post
Share on other sites
As before all the information is available for download. I converted their MDB to a MySQL friendly schema and table info (in one file), modified all the scripts and posted the source, and that's that.

<homer>mmmmmmm.... database programming.... </homer>

nice addition...how big is the database in terms of filesize?

0

Share this post


Link to post
Share on other sites

And how easy will it be to update is the phone compony decides to start spliting NPA's again? I can just see the future, 5000 entries and 78% of them outdated.... :( :help: :(

Maybe a Admin setup that lets you add and edit parts of the table? I could do the styleing again if you do the rest... Still kinda busy trying to get everythign done while i still can but as always Im willing to help.

0

Share this post


Link to post
Share on other sites

Man, so many quick replies. Awesome.

Dox, I added Canada. It's in the new NPA-NXX.sql.bz2 file along with the vi ex commands I used to convert from their format to the NANPA format (so if you maintain it on your own machines you can just slap their file in vi, cut and paste the commands, and BAM... instant database schema switch).

Regarding the DB size for Stank... hmm. There's about 20k rows for Canada, 240k rows for the US. So as far as row count is concerned it's pretty small. The MySQL MYD file is 12MB for the main table, the other tables are all under 20k. I should probably add an index to it at this point. :P

Edit:

Now if we could get the Telcordia info we'd have a serious database. :)

0

Share this post


Link to post
Share on other sites

Well you know Iv been idling on irc.hakt.tk#chat while using this lappy, if you want my help just ask.

12megs? Already? wow.

0

Share this post


Link to post
Share on other sites

ntheory and i have already discussed having the database reside on the site somewhere so that updates can be made in a centralized location.

idealy, it would look in the local directory first, for the data, then look on the net. That way, if someone wanted to createa specialized database locally, they could. it also allows developement of 1 version of the software that looks in 2 places. that way, porting is easier.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0