<commit_before># zip-lookup

zip-lookup is a lightweight JSON based (no database) look-up script that uses a pre-configured list of json files to perform a zip-code look-up on (nearly) all available zip-codes. Simply add this library anywhere you have an address form in your websites and make your client's lives a little easier!

*Test it out here*:
----------
http://clevertree.github.io/zip-lookup/index.html


No installation required
----------

*To use it on your form*, simply include 

`<script src="http://clevertree.github.io/zip-lookup/zip-lookup.min.js" type="text/javascript" ></script>`

in your html header.

The script will listen for changes to any form field with the class 

`class='zip-lookup-field-zipcode'`

and will attempt to look up the zipcode on change. 
The script will then update nearby fields with the following classes: 

`class='zip-lookup-field-city' => gets updated with city name`

`class='zip-lookup-field-state' => gets updated with state full name`

`class='zip-lookup-field-state-short' => gets updated with state short name`


*It's that easy*! When the zip-code is found, the city, state and state abbreviation will be updated. 

Example
----------

`<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Test zipLookup</title>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
        <script src="http://clevertree.github.io/zip-lookup/zip-lookup.js" type="text/javascript"></script>
    </head>
    <body>
        <form>
            <legend>Test zip-lookup</legend>
            <div>Enter ZipCode:</div>
            <input type='text' name='zipcode' class='zip-lookup-field-zipcode' />
            <div>Enter City:</div>
            <input type='text' name='city' class='zip-lookup-field-city' /> 
            <div>Enter State:</div>
            <input type='text' name='state' class='zip-lookup-field-state' />
            <input type='text' name='state-short' class='zip-lookup-field-state-short' /> 
            <div class="zip-lookup-message info">Status</div>
        </form>
    </body>
</html>`


Updates
----------

 * New permanent url for zero-installation users: http://clevertree.github.io/zip-lookup/zip-lookup.js
 * New Demo page: http://clevertree.github.io/zip-lookup/
 * Re-wrote db gen script in node.js. Fixed 0XXXX bug. Fixed default city bug.
 * Removed jQuery dependency
 * Code/DB cleanup
 * Event driven js

Dependencies
----------

None

Authentication
----------

It is not recommended to use this library for authentication of zip-codes. The primary reason is that zip-codes are added all the time, and someone's zip-code may not exist in this database in real-time.


little something for the effort
----------

 * BTC: 1AT6o3mmPRZVdzXPh7SbThgAhv9g4o3j92

 * PP: ari at asu dot edu<commit_msg>readme fix<commit_after># zip-lookup

zip-lookup is a lightweight JSON based (no database) look-up script that uses a pre-configured list of json files to perform a zip-code look-up on (nearly) all available zip-codes. Simply add this library anywhere you have an address form in your websites and make your client's lives a little easier!

*Test it out here*:
----------
http://clevertree.github.io/zip-lookup/index.html


No installation required
----------

*To use it on your form*, simply include 

`<script src="http://clevertree.github.io/zip-lookup/zip-lookup.min.js" type="text/javascript" ></script>`

in your html header.

The script will listen for changes to any form field with the class 

`class='zip-lookup-field-zipcode'`

and will attempt to look up the zipcode on change. 
The script will then update nearby fields with the following classes: 

`class='zip-lookup-field-city' => gets updated with city name`

`class='zip-lookup-field-state' => gets updated with state full name`

`class='zip-lookup-field-state-short' => gets updated with state short name`


*It's that easy*! When the zip-code is found, the city, state and state abbreviation will be updated. 

Example
----------

`<!DOCTYPE html>`
`<html lang="en">`
    `<head>`
        `<title>Test zipLookup</title>`
        `<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />`
        `<script src="http://clevertree.github.io/zip-lookup/zip-lookup.js" type="text/javascript"></script>`
    `</head>`
    `<body>`
        `<form>`
            `<legend>Test zip-lookup</legend>`
            `<div>Enter ZipCode:</div>`
            `<input type='text' name='zipcode' class='zip-lookup-field-zipcode' />`
            `<div>Enter City:</div>`
            `<input type='text' name='city' class='zip-lookup-field-city' />`
            `<div>Enter State:</div>`
            `<input type='text' name='state' class='zip-lookup-field-state' />`
            `<input type='text' name='state-short' class='zip-lookup-field-state-short' />`
            `<div class="zip-lookup-message info">Status</div>`
        `</form>`
    `</body>`
`</html>`


Updates
----------

 * New permanent url for zero-installation users: http://clevertree.github.io/zip-lookup/zip-lookup.js
 * New Demo page: http://clevertree.github.io/zip-lookup/
 * Re-wrote db gen script in node.js. Fixed 0XXXX bug. Fixed default city bug.
 * Removed jQuery dependency
 * Code/DB cleanup
 * Event driven js

Dependencies
----------

None

Authentication
----------

It is not recommended to use this library for authentication of zip-codes. The primary reason is that zip-codes are added all the time, and someone's zip-code may not exist in this database in real-time.


little something for the effort
----------

 * BTC: 1AT6o3mmPRZVdzXPh7SbThgAhv9g4o3j92

 * PP: ari at asu dot edu
{'fraction_non_alphanumeric': 0.14096613374591713, 'fraction_numerical': 0.005157297576070139, 'mean_word_length': 2.705732484076433, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2904485', 'n_tokens_mistral': 1902, 'n_tokens_neox': 1698, 'n_words': 556}