JSON Data Generator

This code will generate a file called customers.js that will contain 25,000 records of customer transactions. The structure of the JSON record is:

{
    "customerid": 100000,
    "identity": {
        "firstname": "Jacob",
        "lastname": "Hines",
        "birthdate": "1982-09-18"
    },
    "contact": {
        "street": "Main Street North",
        "city": "Amherst",
        "state": "OH",
        "zipcode": "44001",
        "email": "Ja.Hines@yahii.com",
        "phone": "813-689-8309"
    },
    "payment": {
        "card_type": "MCCD",
        "card_no": "4742-3005-2829-9227"
    },
    "purchases": [
        {
            "tx_date": "2018-02-14",
            "tx_no": 157972,
            "product_id": 1860,
            "product": "Ugliest Snow Blower",
            "quantity": 1,
            "item_cost": 51.86
        },...
    ]
}

Notebook Parameters

When imbedding this notebook when using %run from another notebook, you can pass one parameter which is the number of records that you want generated. There are additional parameters below which can be changed but requires that you modify this notebook.


In [ ]:
import sys

# Default number of rows to generate
p_rows = 25000

Parameters

Change the following settings to what values you would like.

  • filename: File name to write to in the local Jupyter file system
  • rows: Number of rows to create (see above section on Notebook parameters)
  • custno: Starting point for customer numbers
  • purchases: Maximum number of purchases
  • start birth date: What is the oldest birthdate in the data
  • last birth date: What is the youngest birthdate in the data
  • start tx: What is the oldest transaction in the data (the newest one is today)
  • end tx: Today (Change it to a date if you want something in the past)

In [ ]:
from datetime import date

p_filename = 'customers.js'
p_custno = 100000
p_purchases = 10
#
# All Dates are date(YYYY,MM,DD)
#
p_start_bday = date(1950,1,1).toordinal() 
p_end_bday = date(2000,1,1).toordinal()
p_tx_start = date(2017,1,1).toordinal()
p_tx_end = date.today().toordinal()

Disclaimer

The data used within this program has been derived from public sources, including the US Census Bureau (First names, Last names, Steet names), and the US Postal Service (City, State, Zipcode). The names, product names, credit cards, credit numbers in this program are fictitious. No identification with actual persons (living or deceased), places or products is intended or should be inferred.

Street Names


In [ ]:
print("Street Names")
streets = [
 "Main Street", "Church Street", "Main Street North", "Main Street South", "High Street", "Elm Street",
 "Main Street West", "Main Street East", "Park Avenue", "Washington Street", "Walnut Street", "2nd Street",
 "Chestnut Street", "Maple Avenue", "Broad Street", "Maple Street", "Oak Street", "Center Street",
 "Pine Street", "River Road", "Market Street", "Water Street", "South Street", "Union Street", "3rd Street",
 "Park Street", "Cherry Street", "Washington Avenue", "Court Street", "Highland Avenue", "North Street",
 "Mill Street", "4th Street", "Franklin Street", "Prospect Street", "School Street", "Spring Street",
 "Central Avenue", "1st Street", "State Street", "Front Street", "West Street", "Jefferson Street",
 "Cedar Street", "Bridge Street", "Jackson Street", "Locust Street", "Park Place", "Madison Avenue",
 "Meadow Lane", "Ridge Road", "Spruce Street", "5th Street", "Grove Street", "Lincoln Street",
 "Pearl Street", "Dogwood Drive", "Pennsylvania Avenue", "Pleasant Street", "4th Street West",
 "Adams Street", "Jefferson Avenue", "Lincoln Avenue", "Madison Street", "3rd Street West", "7th Street",
 "Academy Street", "11th Street", "2nd Avenue", "East Street", "Green Street", "12th Street", "5th Avenue",
 "6th Street", "9th Street", "Cherry Lane", "Elizabeth Street", "River Street", "Summit Avenue",
 "10th Street", "Charles Street", "Hickory Lane", "Hill Street", "Virginia Avenue","1st Avenue",
 "Fairway Drive", "Liberty Street", "2nd Street West", "3rd Avenue", "Broadway", "Church Road", "Colonial Drive",
 "Delaware Avenue", "Monroe Street", "Vine Street", "Winding Way", "Woodland Drive", "Brookside Drive",
 "Lake Street", "Prospect Avenue", "Sunset Drive", "Valley Road", "13th Street", "4th Avenue",
 "6th Street West", "College Street", "Dogwood Lane", "Hillside Avenue", "Mill Road","5th Street North",
 "7th Avenue", "8th Street", "Division Street", "Harrison Street", "Lakeview Drive", "Laurel Lane",
 "New Street", "Oak Lane", "Railroad Street", "Willow Street", "5th Street West", "6th Avenue",
 "Beech Street", "Clinton Street", "George Street", "Hillcrest Drive", "Laurel Street", "Park Drive",
 "Penn Street", "Primrose Lane", "Railroad Avenue", "Riverside Drive", "Sherwood Drive", "Summit Street",
 "4th Street North", "Buckingham Drive", "Cedar Lane", "Durham Road", "Grant Street", "Heather Lane",
 "Hillside Drive", "Holly Drive", "King Street", "Lafayette Avenue", "Poplar Street", "6th Street North",
 "Berkshire Drive", "Circle Drive", "Clark Street", "College Avenue", "Elm Avenue", "Essex Court",
 "Franklin Avenue", "Front Street North", "James Street", "Linden Street", "Mulberry Street",
"Ridge Avenue", "Surrey Lane", "Walnut Avenue", "Warren Street", "Williams Street", "Wood Street"
]

street_count = len(streets)

Zip Codes


In [ ]:
print("Address (Zipcode, City, State)")
zipcodes = [
 ["00501","Holtsville","NY"],["01001","Agawam","MA"],["01101","Springfield","MA"],["01201","Pittsfield","MA"],
 ["01301","Greenfield","MA"],["01420","Fitchburg","MA"],["01501","Auburn","MA"],["01601","Worcester","MA"],
 ["01701","Framingham","MA"],["01801","Woburn","MA"],["01901","Lynn","MA"],["02018","Accord","MA"],
 ["02108","Boston","MA"],["02201","Boston","MA"],["02301","Brockton","MA"],["02420","Lexington","MA"],
 ["02532","Buzzards Bay","MA"],["02601","Hyannis","MA"],["02702","Assonet","MA"],["02801","Adamsville","RI"],
 ["02901","Providence","RI"],["03031","Amherst","NH"],["03101","Manchester","NH"],
 ["03215","Waterville Valley","NH"],["03301","Concord","NH"],["03431","Keene","NH"],["03561","Littleton","NH"],
 ["03601","Acworth","NH"],["03740","Bath","NH"],["03801","Portsmouth","NH"],["03901","Berwick","ME"],
 ["04001","Acton","ME"], ["04101","Portland","ME"],["04210","Auburn","ME"],["04330","Augusta","ME"],
 ["04401","Bangor","ME"],["04530","Bath","ME"],["04605","Ellsworth","ME"],["04730","Houlton","ME"],
 ["04841","Rockland","ME"],["04901","Waterville","ME"],["05001","White River Junction","VT"],
 ["05101","Bellows Falls","VT"],["05201","Bennington","VT"],["05301","Brattleboro","VT"],
 ["05401","Burlington","VT"],["05501","Andover","MA"],["05601","Montpelier","VT"],["05701","Rutland","VT"],
 ["05819","Saint Johnsbury","VT"],["05901","Averill","VT"],["06001","Avon","CT"],
 ["06101","Hartford","CT"],["06226","Willimantic","CT"],["06320","New London","CT"],
 ["06401","Ansonia","CT"],["06501","New Haven","CT"],["06601","Bridgeport","CT"],["06701","Waterbury","CT"],
 ["06801","Bethel","CT"], ["06901","Stamford","CT"],["07001","Avenel","NJ"],["07101","Newark","NJ"], 
 ["07201","Elizabeth","NJ"],["07302","Jersey City","NJ"],["07401","Allendale","NJ"],["07501","Paterson","NJ"],
 ["07601","Hackensack","NJ"],["07701","Red Bank","NJ"],["07801","Dover","NJ"],["07901","Summit","NJ"],
 ["08001","Alloway","NJ"],["08101","Camden","NJ"],["08201","Absecon","NJ"],["08302","Bridgeton","NJ"], 
 ["08401","Atlantic City","NJ"],["08501","Allentown","NJ"],["08601","Trenton","NJ"],["08701","Lakewood","NJ"],
 ["08801","Annandale","NJ"],["08901","New Brunswick","NJ"],["10001","New York","NY"],["10101","New York","NY"],
 ["10203","New York","NY"],["10301","Staten Island","NY"],["10451","Bronx","NY"],["10501","Amawalk","NY"], 
 ["10601","White Plains","NY"],["10701","Yonkers","NY"],["10801","New Rochelle","NY"],["10901","Suffern","NY"],
 ["11001","Floral Park","NY"],["11101","Long Island City","NY"],["11201","Brooklyn","NY"],
 ["11351","Flushing","NY"],["11405","Jamaica","NY"],["11501","Mineola","NY"],["11690","Far Rockaway","NY"],
 ["11701","Amityville","NY"],["11801","Hicksville","NY"],["11901","Riverhead","NY"],["12007","Alcove","NY"],
 ["12106","Kinderhook","NY"],["12201","Albany","NY"],["12301","Schenectady","NY"],["12401","Kingston","NY"],
 ["12501","Amenia","NY"],["12601","Poughkeepsie","NY"],["12701","Monticello","NY"],["12801","Glens Falls","NY"],
 ["12901","Plattsburgh","NY"],["13020","Apulia Station","NY"],["13101","Mc Graw","NY"],
 ["13201","Syracuse","NY"],["13301","Alder Creek","NY"],["13401","Mc Connellsville","NY"],
 ["13501","Utica","NY"],["13601","Watertown","NY"],["13730","Afton","NY"],["13801","Mc Donough","NY"],
 ["13901","Binghamton","NY"],["14001","Akron","NY"],["14101","Machias","NY"], 
 ["14201","Buffalo","NY"],["14301","Niagara Falls","NY"],["14410","Adams Basin","NY"],["14502","Macedon","NY"],
 ["14602","Rochester","NY"],["14701","Jamestown","NY"],["14801","Addison","NY"],["14901","Elmira","NY"],
 ["15001","Aliquippa","PA"],["15101","Allison Park","PA"],["15201","Pittsburgh","PA"],["15301","Washington","PA"], 
 ["15401","Uniontown","PA"],["15501","Somerset","PA"],["15601","Greensburg","PA"],["15701","Indiana","PA"],
 ["15801","Du Bois","PA"],["15901","Johnstown","PA"],["16001","Butler","PA"],["16101","New Castle","PA"],
 ["16201","Kittanning","PA"],["16301","Oil City","PA"],["16401","Albion","PA"],["16501","Erie","PA"], 
 ["16601","Altoona","PA"],["16701","Bradford","PA"],["16801","State College","PA"],["16901","Wellsboro","PA"],
 ["17001","Camp Hill","PA"],["17101","Harrisburg","PA"],["17201","Chambersburg","PA"],["17301","Abbottstown","PA"],
 ["17401","York","PA"],["17501","Akron","PA"],["17601","Lancaster","PA"],["17701","Williamsport","PA"], 
 ["17801","Sunbury","PA"],["17901","Pottsville","PA"],["18001","Lehigh Valley","PA"],["18101","Allentown","PA"],
 ["18201","Hazleton","PA"],["18301","East Stroudsburg","PA"],["18403","Archbald","PA"],["18501","Scranton","PA"],
 ["18601","Beach Haven","PA"],["18701","Wilkes Barre","PA"],["18801","Montrose","PA"],["18901","Doylestown","PA"], 
 ["19001","Abington","PA"],["19101","Philadelphia","PA"],["19244","Philadelphia","PA"],["19301","Paoli","PA"],
 ["19401","Norristown","PA"],["19501","Adamstown","PA"],["19601","Reading","PA"],["19701","Bear","DE"],
 ["19801","Wilmington","DE"],["19901","Dover","DE"],["20001","Washington","DC"],["20101","Dulles","VA"], 
 ["20201","Washington","DC"],["20301","Washington","DC"],["20401","Washington","DC"],["20500","Washington","DC"],
 ["20601","Waldorf","MD"],["20701","Annapolis Junction","MD"],["20810","Bethesda","MD"],
 ["20901","Silver Spring","MD"],["21001","Aberdeen","MD"],["21102","Manchester","MD"],["21201","Baltimore","MD"],
 ["21401","Annapolis","MD"],["21501","Cumberland","MD"],["21601","Easton","MD"],["21701","Frederick","MD"], 
 ["21801","Salisbury","MD"],["21901","North East","MD"],["22003","Annandale","VA"],["22101","Mc Lean","VA"],
 ["22201","Arlington","VA"],["22301","Alexandria","VA"],["22401","Fredericksburg","VA"],["22501","Ladysmith","VA"],
 ["22601","Winchester","VA"],["22701","Culpeper","VA"],["22801","Harrisonburg","VA"],
 ["22901","Charlottesville","VA"],["23001","Achilles","VA"],["23102","Maidens","VA"],
 ["23218","Richmond","VA"],["23301","Accomac","VA"],["23401","Keller","VA"],["23501","Norfolk","VA"],
 ["23601","Newport News","VA"],["23701","Portsmouth","VA"],["23801","Fort Lee","VA"],
 ["23901","Farmville","VA"],["24001","Roanoke","VA"],["24101","Hardy","VA"], 
 ["24201","Bristol","VA"],["24301","Pulaski","VA"],["24401","Staunton","VA"],["24501","Lynchburg","VA"],
 ["24601","Amonate","VA"],["24701","Bluefield","WV"],["24801","Welch","WV"],["24901","Lewisburg","WV"],
 ["25002","Alloy","WV"],["25102","Handley","WV"],["25201","Tad","WV"],["25301","Charleston","WV"], 
 ["25401","Martinsburg","WV"],["25501","Alkol","WV"],["25601","Logan","WV"],["25701","Huntington","WV"],
 ["25801","Beckley","WV"],["25901","Oak Hill","WV"],["26003","Wheeling","WV"],["26101","Parkersburg","WV"],
 ["26201","Buckhannon","WV"],["26301","Clarksburg","WV"],["26404","Meadowbrook","WV"],["26501","Morgantown","WV"], 
 ["26601","Sutton","WV"],["26704","Augusta","WV"],["26801","Baker","WV"],["27006","Advance","NC"],
 ["27101","Winston Salem","NC"],["27201","Alamance","NC"],["27301","Mc Leansville","NC"],
 ["27401","Greensboro","NC"],["27501","Angier","NC"],["27601","Raleigh","NC"],["27701","Durham","NC"],
 ["27801","Rocky Mount","NC"],["27906","Elizabeth City","NC"],["28001","Albemarle","NC"],
 ["28101","Mc Adenville","NC"],["28201","Charlotte","NC"],["28301","Fayetteville","NC"],
 ["28401","Wilmington","NC"],["28501","Kinston","NC"],["28601","Hickory","NC"],
 ["28701","Alexander","NC"],["28801","Asheville","NC"],["28901","Andrews","NC"],
 ["29001","Alcolu","SC"],["29101","Mc Bee","SC"],["29201","Columbia","SC"],["29301","Spartanburg","SC"], 
 ["29401","Charleston","SC"],["29501","Florence","SC"],["29601","Greenville","SC"],["29702","Blacksburg","SC"],
 ["29801","Aiken","SC"],["29901","Beaufort","SC"],["30002","Avondale Estates","GA"],["30101","Acworth","GA"],
 ["30204","Barnesville","GA"],["30301","Atlanta","GA"],["30401","Swainsboro","GA"],["30501","Gainesville","GA"], 
 ["30601","Athens","GA"],["30701","Calhoun","GA"],["30802","Appling","GA"],["30901","Augusta","GA"],
 ["31001","Abbeville","GA"],["31106","Atlanta","GA"],["31201","Macon","GA"],["31301","Allenhurst","GA"],
 ["31401","Savannah","GA"],["31501","Waycross","GA"],["31601","Valdosta","GA"],["31701","Albany","GA"], 
 ["31801","Box Springs","GA"],["31901","Columbus","GA"],["32003","Fleming Island","FL"],["32102","Astor","FL"],
 ["32201","Jacksonville","FL"],["32301","Tallahassee","FL"],["32401","Panama City","FL"],
 ["32501","Pensacola","FL"],["32601","Gainesville","FL"],["32701","Altamonte Springs","FL"],
 ["32801","Orlando","FL"],["32901","Melbourne","FL"],["33001","Long Key","FL"],
 ["33101","Miami","FL"],["33206","Miami","FL"],["33301","Fort Lauderdale","FL"],
 ["33401","West Palm Beach","FL"],["33503","Balm","FL"], ["33601","Tampa","FL"],["33701","Saint Petersburg","FL"],
 ["33801","Lakeland","FL"],["33901","Fort Myers","FL"],["34101","Naples","FL"],["34201","Bradenton","FL"], 
 ["34420","Belleview","FL"],["34601","Brooksville","FL"],["34705","Astatula","FL"],["34945","Fort Pierce","FL"],
 ["35004","Moody","AL"],["35111","Mc Calla","AL"],["35201","Birmingham","AL"],["35401","Tuscaloosa","AL"],
 ["35501","Jasper","AL"],["35601","Decatur","AL"],["35739","Ardmore","AL"],["35801","Huntsville","AL"], 
 ["35901","Gadsden","AL"],["36003","Autaugaville","AL"],["36101","Montgomery","AL"],["36201","Anniston","AL"],
 ["36301","Dothan","AL"],["36401","Evergreen","AL"],["36502","Atmore","AL"],["36601","Mobile","AL"],
 ["36701","Selma","AL"],["36801","Opelika","AL"],["36901","Bellamy","AL"],["37010","Adams","TN"], 
 ["37101","Mc Ewen","TN"],["37201","Nashville","TN"],["37301","Altamont","TN"],["37401","Chattanooga","TN"],
 ["37501","Memphis","TN"],["37601","Johnson City","TN"],["37701","Alcoa","TN"],["37801","Maryville","TN"],
 ["37901","Knoxville","TN"],["38001","Alamo","TN"],["38101","Memphis","TN"],["38201","Mc Kenzie","TN"], 
 ["38301","Jackson","TN"],["38401","Columbia","TN"],["38501","Cookeville","TN"],["38601","Abbeville","MS"],
 ["38701","Greenville","MS"],["38801","Tupelo","MS"],["38901","Grenada","MS"],["39038","Belzoni","MS"],
 ["39107","Mc Adams","MS"],["39201","Jackson","MS"],["39301","Meridian","MS"],["39401","Hattiesburg","MS"], 
 ["39501","Gulfport","MS"],["39601","Brookhaven","MS"],["39701","Columbus","MS"],["39813","Arlington","GA"],
 ["39901","Atlanta","GA"],["40003","Bagdad","KY"],["40104","Battletown","KY"],["40201","Louisville","KY"],
 ["40310","Burgin","KY"],["40402","Annville","KY"],["40502","Lexington","KY"],["40601","Frankfort","KY"], 
 ["40701","Corbin","KY"],["40801","Ages Brookside","KY"],["40902","Arjay","KY"],["41001","Alexandria","KY"],
 ["41101","Ashland","KY"],["41201","Adams","KY"],["41301","Campton","KY"],["41408","Cannel City","KY"],
 ["41501","Pikeville","KY"], ["41601","Allen","KY"],["41701","Hazard","KY"],["41804","Blackey","KY"], 
 ["42001","Paducah","KY"],["42101","Bowling Green","KY"],["42201","Aberdeen","KY"],["42301","Owensboro","KY"],
 ["42402","Baskett","KY"],["42501","Somerset","KY"],["42602","Albany","KY"],["42701","Elizabethtown","KY"],
 ["43001","Alexandria","OH"],["43101","Adelphi","OH"],["43201","Columbus","OH"],["43301","Marion","OH"], 
 ["43402","Bowling Green","OH"],["43501","Alvordton","OH"],["43601","Toledo","OH"],["43701","Zanesville","OH"],
 ["43802","Adamsville","OH"],["43901","Adena","OH"],["44001","Amherst","OH"],["44101","Cleveland","OH"],
 ["44201","Atwater","OH"],["44301","Akron","OH"],["44401","Berlin Center","OH"],["44501","Youngstown","OH"], 
 ["44601","Alliance","OH"],["44701","Canton","OH"],["44802","Alvada","OH"],["44901","Mansfield","OH"],
 ["45001","Addyston","OH"],["45101","Aberdeen","OH"],["45201","Cincinnati","OH"],["45301","Alpha","OH"],
 ["45401","Dayton","OH"],["45501","Springfield","OH"],["45601","Chillicothe","OH"],["45701","Athens","OH"], 
 ["45801","Lima","OH"],["45999","Cincinnati","OH"],["46001","Alexandria","IN"],["46102","Advance","IN"],
 ["46201","Indianapolis","IN"],["46301","Beverly Shores","IN"],["46401","Gary","IN"],["46501","Argos","IN"],
 ["46601","South Bend","IN"],["46701","Albion","IN"],["46801","Fort Wayne","IN"],["46901","Kokomo","IN"], 
 ["47001","Aurora","IN"],["47102","Austin","IN"],["47201","Columbus","IN"],["47302","Muncie","IN"],
 ["47401","Bloomington","IN"],["47501","Washington","IN"],["47601","Boonville","IN"],["47701","Evansville","IN"],
 ["47801","Terre Haute","IN"],["47901","Lafayette","IN"],["48001","Algonac","MI"],["48101","Allen Park","MI"], 
 ["48201","Detroit","MI"],["48301","Bloomfield Hills","MI"],["48401","Applegate","MI"],["48501","Flint","MI"],
 ["48601","Saginaw","MI"],["48701","Akron","MI"],["48801","Alma","MI"],["48901","Lansing","MI"],
 ["49001","Kalamazoo","MI"],["49101","Baroda","MI"],["49201","Jackson","MI"],["49301","Ada","MI"], 
 ["49401","Allendale","MI"],["49501","Grand Rapids","MI"],["49601","Cadillac","MI"],["49701","Mackinaw City","MI"],
 ["49801","Iron Mountain","MI"],["49901","Ahmeek","MI"],["50001","Ackworth","IA"],["50101","Galt","IA"],
 ["50201","Nevada","IA"],["50301","Des Moines","IA"],["50401","Mason City","IA"],["50501","Fort Dodge","IA"], 
 ["50601","Ackley","IA"],["50701","Waterloo","IA"],["50801","Creston","IA"],["50936","Des Moines","IA"],
 ["51001","Akron","IA"],["51101","Sioux City","IA"],["51201","Sheldon","IA"],["51301","Spencer","IA"],
 ["51401","Carroll","IA"],["51501","Council Bluffs","IA"],["51601","Shenandoah","IA"],["52001","Dubuque","IA"], 
 ["52101","Decorah","IA"],["52201","Ainsworth","IA"],["52301","Marengo","IA"],["52401","Cedar Rapids","IA"],
 ["52501","Ottumwa","IA"],["52601","Burlington","IA"],["52701","Andover","IA"],["52801","Davenport","IA"],
 ["53001","Adell","WI"],["53101","Bassett","WI"],["53201","Milwaukee","WI"],["53401","Racine","WI"], 
 ["53501","Afton","WI"],["53701","Madison","WI"],["53801","Bagley","WI"],["53901","Portage","WI"],
 ["54001","Amery","WI"],["54101","Abrams","WI"],["54201","Algoma","WI"],["54301","Green Bay","WI"],
 ["54401","Wausau","WI"],["54501","Rhinelander","WI"],["54601","La Crosse","WI"],["54701","Eau Claire","WI"], 
 ["54801","Spooner","WI"],["54901","Oshkosh","WI"],["55001","Afton","MN"], ["55101","Saint Paul","MN"],
 ["55301","Albertville","MN"],["55401","Minneapolis","MN"],["55550","Young America","MN"],
 ["55601","Beaver Bay","MN"],["55702","Alborn","MN"], ["55801","Duluth","MN"],["55901","Rochester","MN"],
 ["56001","Mankato","MN"],["56101","Windom","MN"],["56201","Willmar","MN"],["56301","Saint Cloud","MN"],
 ["56401","Brainerd","MN"],["56501","Detroit Lakes","MN"],["56601","Bemidji","MN"],
 ["56701","Thief River Falls","MN"],["56901","Washington","DC"],["57001","Alcester","SD"],
 ["57101","Sioux Falls","SD"],["57201","Watertown","SD"],["57301","Mitchell","SD"],
 ["57401","Aberdeen","SD"],["57501","Pierre","SD"],["57601","Mobridge","SD"],
 ["57701","Rapid City","SD"],["58001","Abercrombie","ND"],["58102","Fargo","ND"],["58201","Grand Forks","ND"],
 ["58301","Devils Lake","ND"],["58401","Jamestown","ND"],["58501","Bismarck","ND"],["58601","Dickinson","ND"],
 ["58701","Minot","ND"],["58801","Williston","ND"],["59001","Absarokee","MT"],["59101","Billings","MT"], 
 ["59201","Wolf Point","MT"],["59301","Miles City","MT"],["59401","Great Falls","MT"],["59501","Havre","MT"],
 ["59601","Helena","MT"],["59701","Butte","MT"],["59801","Missoula","MT"],["59901","Kalispell","MT"],
 ["60001","Alden","IL"],["60101","Addison","IL"],["60201","Evanston","IL"],["60301","Oak Park","IL"], 
 ["60401","Beecher","IL"],["60501","Summit Argo","IL"],["60601","Chicago","IL"],["60701","Chicago","IL"],
 ["60803","Alsip","IL"],["60901","Kankakee","IL"],["61001","Apple River","IL"],["61101","Rockford","IL"],
 ["61201","Rock Island","IL"],["61301","La Salle","IL"],["61401","Galesburg","IL"],["61501","Astoria","IL"], 
 ["61601","Peoria","IL"],["61701","Bloomington","IL"],["61801","Urbana","IL"],["61910","Arcola","IL"],
 ["62001","Alhambra","IL"],["62201","East Saint Louis","IL"],["62301","Quincy","IL"],["62401","Effingham","IL"],
 ["62501","Argenta","IL"],["62601","Alexander","IL"],["62701","Springfield","IL"],["62801","Centralia","IL"], 
 ["62901","Carbondale","IL"],["63005","Chesterfield","MO"],["63101","Saint Louis","MO"],
 ["63301","Saint Charles","MO"],["63401","Hannibal","MO"],["63501","Kirksville","MO"],
 ["63601","Park Hills","MO"],["63701","Cape Girardeau","MO"], ["63801","Sikeston","MO"],
 ["63901","Poplar Bluff","MO"],["64001","Alma","MO"],["64101","Kansas City","MO"], 
 ["64401","Agency","MO"],["64501","Saint Joseph","MO"],["64601","Chillicothe","MO"],["64701","Harrisonville","MO"],
 ["64801","Joplin","MO"],["64999","Kansas City","MO"],["65001","Argyle","MO"],["65101","Jefferson City","MO"],
 ["65201","Columbia","MO"],["65301","Sedalia","MO"],["65401","Rolla","MO"],["65501","Jadwin","MO"], 
 ["65601","Aldrich","MO"],["65702","Macomb","MO"],["65801","Springfield","MO"],["66002","Atchison","KS"],
 ["66101","Kansas City","KS"],["66201","Mission","KS"],["66401","Alma","KS"],["66501","Mc Farland","KS"],
 ["66601","Topeka","KS"],["66701","Fort Scott","KS"],["66801","Emporia","KS"],["66901","Concordia","KS"], 
 ["67001","Andale","KS"],["67101","Maize","KS"],["67201","Wichita","KS"],["67301","Independence","KS"],
 ["67401","Salina","KS"],["67501","Hutchinson","KS"],["67601","Hays","KS"],["67701","Colby","KS"],
 ["67801","Dodge City","KS"],["67901","Liberal","KS"],["68001","Abie","NE"],["68101","Omaha","NE"], 
 ["68301","Adams","NE"],["68401","Mc Cool Junction","NE"],["68501","Lincoln","NE"],["68601","Columbus","NE"],
 ["68701","Norfolk","NE"],["68801","Grand Island","NE"],["68901","Hastings","NE"],["69001","Mc Cook","NE"],
 ["69101","North Platte","NE"],["69201","Valentine","NE"],["69301","Alliance","NE"],["70001","Metairie","LA"],
 ["70112","New Orleans","LA"],["70301","Thibodaux","LA"],["70401","Hammond","LA"],["70501","Lafayette","LA"],
 ["70601","Lake Charles","LA"],["70704","Baker","LA"],["70801","Baton Rouge","LA"],["71001","Arcadia","LA"],
 ["71101","Shreveport","LA"],["71201","Monroe","LA"],["71301","Alexandria","LA"],["71401","Aimwell","LA"],
 ["71601","Pine Bluff","AR"],["71701","Camden","AR"],["71801","Hope","AR"],
 ["71901","Hot Springs National Park","AR"],["72001","Adona","AR"],["72101","Mc Crory","AR"],
 ["72201","Little Rock","AR"],["72301","West Memphis","AR"],["72401","Jonesboro","AR"],
 ["72501","Batesville","AR"],["72601","Harrison","AR"],["72701","Fayetteville","AR"],
 ["72801","Russellville","AR"],["72901","Fort Smith","AR"],["73001","Albert","OK"],["73101","Oklahoma City","OK"],
 ["73301","Austin","TX"],["73401","Ardmore","OK"],["73501","Lawton","OK"],["73601","Clinton","OK"], 
 ["73701","Enid","OK"],["73801","Woodward","OK"],["73901","Adams","OK"],["74001","Avant","OK"],
 ["74101","Tulsa","OK"],["74301","Vinita","OK"],["74401","Muskogee","OK"],["74501","Mcalester","OK"],
 ["74601","Ponca City","OK"],["74701","Durant","OK"],["74801","Shawnee","OK"],["74901","Arkoma","OK"],
 ["75001","Addison","TX"],["75101","Bardwell","TX"],["75201","Dallas","TX"],["75301","Dallas","TX"],
 ["75401","Greenville","TX"],["75501","Texarkana","TX"],["75601","Longview","TX"],["75701","Tyler","TX"],
 ["75801","Palestine","TX"],["75901","Lufkin","TX"],["76001","Arlington","TX"],["76101","Fort Worth","TX"],
 ["76201","Denton","TX"],["76301","Wichita Falls","TX"],["76401","Stephenville","TX"],["76501","Temple","TX"],
 ["76621","Abbott","TX"],["76701","Waco","TX"],["76801","Brownwood","TX"],["76901","San Angelo","TX"],
 ["77001","Houston","TX"],["77201","Houston","TX"],["77301","Conroe","TX"],["77401","Bellaire","TX"],
 ["77501","Pasadena","TX"],["77611","Bridge City","TX"],["77701","Beaumont","TX"],["77801","Bryan","TX"],
 ["77901","Victoria","TX"],["78001","Artesia Wells","TX"],["78101","Adkins","TX"],["78201","San Antonio","TX"],
 ["78330","Agua Dulce","TX"],["78401","Corpus Christi","TX"],["78501","Mcallen","TX"],
 ["78602","Bastrop","TX"],["78701","Austin","TX"],["78801","Uvalde","TX"],["78931","Bleiblerville","TX"],
 ["79001","Adrian","TX"],["79101","Amarillo","TX"], ["79201","Childress","TX"],["79311","Abernathy","TX"],
 ["79401","Lubbock","TX"],["79501","Anson","TX"],["79601","Abilene","TX"],["79701","Midland","TX"],
 ["79821","Anthony","TX"],["79901","El Paso","TX"],["80001","Arvada","CO"],["80101","Agate","CO"],
 ["80201","Denver","CO"],["80301","Boulder","CO"],["80401","Golden","CO"], 
 ["80501","Longmont","CO"],["80601","Brighton","CO"],["80701","Fort Morgan","CO"],["80801","Anton","CO"],
 ["80901","Colorado Springs","CO"],["81001","Pueblo","CO"],["81101","Alamosa","CO"],["81201","Salida","CO"],
 ["81301","Durango","CO"],["81401","Montrose","CO"],["81501","Grand Junction","CO"],["81601","Glenwood Springs","CO"], 
 ["82001","Cheyenne","WY"],["82190","Yellowstone National Park","WY"],["82201","Wheatland","WY"],
 ["82301","Rawlins","WY"],["82401","Worland","WY"],["82501","Riverton","WY"],["82601","Casper","WY"],
 ["82701","Newcastle","WY"],["82801","Sheridan","WY"],["82901","Rock Springs","WY"],["83001","Jackson","WY"], 
 ["83101","Kemmerer","WY"],["83201","Pocatello","ID"],["83301","Twin Falls","ID"],["83401","Idaho Falls","ID"],
 ["83501","Lewiston","ID"],["83601","Atlanta","ID"],["83701","Boise","ID"],["83801","Athol","ID"],
 ["84001","Altamont","UT"],["84101","Salt Lake City","UT"],["84201","Ogden","UT"],["84301","Bear River City","UT"], 
 ["84401","Ogden","UT"],["84501","Price","UT"],["84601","Provo","UT"],["84701","Richfield","UT"],
 ["85001","Phoenix","AZ"],["85118","Gold Canyon","AZ"],["85201","Mesa","AZ"],["85301","Glendale","AZ"],
 ["85501","Globe","AZ"],["85601","Arivaca","AZ"],["85701","Tucson","AZ"],["85901","Show Low","AZ"], 
 ["86001","Flagstaff","AZ"],["86301","Prescott","AZ"],["86401","Kingman","AZ"],["86502","Chambers","AZ"],
 ["87001","Algodones","NM"],["87101","Albuquerque","NM"],["87301","Gallup","NM"],["87401","Farmington","NM"],
 ["87501","Santa Fe","NM"],["87701","Las Vegas","NM"],["87801","Socorro","NM"],
 ["87901","Truth Or Consequences","NM"],["88001","Las Cruces","NM"],["88101","Clovis","NM"],
 ["88201","Roswell","NM"],["88301","Carrizozo","NM"],["88401","Tucumcari","NM"],
 ["88510","El Paso","TX"],["88901","The Lakes","NV"],["89001","Alamo","NV"],
 ["89101","Las Vegas","NV"],["89301","Ely","NV"],["89402","Crystal Bay","NV"],["89501","Reno","NV"], 
 ["89701","Carson City","NV"],["89801","Elko","NV"],["90001","Los Angeles","CA"],["90189","Los Angeles","CA"],
 ["90201","Bell Gardens","CA"],["90301","Inglewood","CA"],["90401","Santa Monica","CA"],["90501","Torrance","CA"],
 ["90601","Whittier","CA"],["90701","Artesia","CA"],["90801","Long Beach","CA"],["91001","Altadena","CA"], 
 ["91101","Pasadena","CA"],["91201","Glendale","CA"],["91301","Agoura Hills","CA"],["91401","Van Nuys","CA"],
 ["91501","Burbank","CA"],["91601","North Hollywood","CA"],["91701","Rancho Cucamonga","CA"],
 ["91801","Alhambra","CA"],["91901","Alpine","CA"],["92003","Bonsall","CA"],
 ["92101","San Diego","CA"],["92201","Indio","CA"],["92301","Adelanto","CA"],
 ["92401","San Bernardino","CA"],["92501","Riverside","CA"],["92602","Irvine","CA"],
 ["92701","Santa Ana","CA"],["92801","Anaheim","CA"],["93001","Ventura","CA"],["93101","Santa Barbara","CA"],
 ["93201","Alpaugh","CA"],["93301","Bakersfield","CA"],["93401","San Luis Obispo","CA"],["93501","Mojave","CA"], 
 ["93601","Ahwahnee","CA"],["93701","Fresno","CA"],["93844","Fresno","CA"], ["93901","Salinas","CA"],
 ["94002","Belmont","CA"],["94102","San Francisco","CA"],["94203","Sacramento","CA"],["94301","Palo Alto","CA"],
 ["94401","San Mateo","CA"],["94501","Alameda","CA"],["94601","Oakland","CA"],["94701","Berkeley","CA"], 
 ["94801","Richmond","CA"],["94901","San Rafael","CA"],["95001","Aptos","CA"],["95101","San Jose","CA"],
 ["95201","Stockton","CA"],["95301","Atwater","CA"],["95401","Santa Rosa","CA"],["95501","Eureka","CA"],
 ["95601","Amador City","CA"],["95701","Alta","CA"],["95811","Sacramento","CA"],["95901","Marysville","CA"], 
 ["96001","Redding","CA"],["96101","Alturas","CA"],["96701","Aiea","HI"],["96801","Honolulu","HI"],
 ["97001","Antelope","OR"],["97101","Amity","OR"],["97201","Portland","OR"],["97301","Salem","OR"],
 ["97401","Eugene","OR"],["97501","Medford","OR"],["97601","Klamath Falls","OR"],["97701","Bend","OR"], 
 ["97801","Pendleton","OR"],["97901","Adrian","OR"],["98001","Auburn","WA"],["98101","Seattle","WA"],
 ["98201","Everett","WA"],["98303","Anderson Island","WA"],["98401","Tacoma","WA"],["98501","Olympia","WA"],
 ["98601","Amboy","WA"],["98801","Wenatchee","WA"],["98901","Yakima","WA"],["99001","Airway Heights","WA"], 
 ["99101","Addy","WA"],["99201","Spokane","WA"],["99301","Pasco","WA"],["99401","Anatone","WA"],
 ["99501","Anchorage","AK"],["99602","Holy Cross","AK"],["99701","Fairbanks","AK"],["99801","Juneau","AK"],
 ["99901","Ketchikan","AK"]
]

zipcode_count = len(zipcodes)

Male First Names


In [ ]:
print("First Names (Male)")
male = [
 "James", "John", "Robert", "Michael", "William", "David", "Richard", "Joseph", "Thomas", "Charles", "Christopher",
 "Daniel", "Matthew", "Anthony", "Donald", "Mark", "Paul", "Steven", "Andrew", "Kenneth", "George", "Joshua", 
 "Kevin", "Brian", "Edward", "Ronald", "Timothy", "Jason", "Jeffrey", "Ryan", "Gary", "Jacob", "Nicholas", 
 "Eric", "Stephen", "Jonathan", "Larry", "Justin", "Scott", "Frank", "Brandon", "Raymond", "Gregory", 
 "Benjamin", "Samuel", "Patrick", "Alexander", "Jack", "Dennis", "Jerry", "Tyler", "Aaron", "Henry", 
 "Douglas", "Jose", "Peter", "Adam", "Zachary", "Nathan", "Walter", "Harold", "Kyle", "Carl", "Arthur", 
 "Gerald", "Roger", "Keith", "Jeremy", "Terry", "Lawrence", "Sean", "Christian", "Albert", "Joe", 
 "Ethan", "Austin", "Jesse", "Willie", "Billy", "Bryan", "Bruce", "Jordan", "Ralph", "Roy", "Noah", 
 "Dylan", "Eugene", "Wayne", "Alan", "Juan", "Louis", "Russell", "Gabriel", "Randy", "Philip",
 "Harry", "Vincent", "Bobby", "Johnny","Logan"
]

male_count = len(male)

Female First Names


In [ ]:
print("First Names (Female)")
female = [
 "Mary", "Patricia", "Jennifer", "Elizabeth", "Linda", "Barbara", "Susan", "Jessica", "Margaret", "Sarah",
 "Karen", "Nancy", "Betty", "Lisa", "Dorothy", "Sandra", "Ashley", "Kimberly", "Donna", "Carol", "Michelle",
 "Emily", "Amanda", "Helen", "Melissa", "Deborah", "Stephanie", "Laura", "Rebecca", "Sharon", "Cynthia",
 "Kathleen", "Amy", "Shirley", "Anna", "Angela", "Ruth", "Brenda", "Pamela", "Nicole", "Katherine",
 "Virginia", "Catherine", "Christine", "Samantha", "Debra", "Janet", "Rachel", "Carolyn", "Emma", "Maria",
 "Heather", "Diane", "Julie", "Joyce", "Evelyn", "Frances", "Joan", "Christina", "Kelly", "Victoria",
 "Lauren", "Martha", "Judith", "Cheryl", "Megan", "Andrea", "Ann", "Alice", "Jean", "Doris", "Jacqueline",
 "Kathryn", "Hannah", "Olivia", "Gloria", "Marie", "Teresa", "Sara", "Janice", "Julia", "Grace", "Judy",
 "Theresa", "Rose", "Beverly", "Denise", "Marilyn", "Amber", "Madison", "Danielle", "Brittany","Diana",
 "Abigail", "Jane", "Natalie", "Lori", "Tiffany", "Alexis", "Kayla"
]

female_count = len(female)

Last Names


In [ ]:
print("Last Names")
lastnames = [
"Smith","Johnson","Williams","Jones","Brown","Davis","Miller","Wilson","Moore","Taylor","Anderson","Thomas",
"Jackson","White","Harris","Martin","Thompson","Garcia","Martinez","Robinson","Clark","Rodriguez","Lewis",
"Lee","Walker","Hall","Allen","Young","Hernandez","King","Wright","Lopez","Hill","Scott","Green","Adams","Baker",
"Gonzalez","Nelson","Carter","Mitchell","Perez","Roberts","Turner","Phillips","Campbell","Parker","Evans",
"Edwards","Collins","Stewart","Sanchez","Morris","Rogers","Reed","Cook","Morgan","Bell","Murphy","Bailey",
"Rivera","Cooper","Richardson","Cox","Howard","Ward","Torres","Peterson","Gray","Ramirez","James","Watson",
"Brooks","Kelly","Sanders","Price","Bennett","Wood","Barnes","Ross","Henderson","Coleman","Jenkins","Perry",
"Powell","Long","Patterson","Hughes","Flores","Washington","Butler","Simmons","Foster","Gonzales","Bryant",
"Alexander","Russell","Griffin","Diaz","Hayes","Myers","Ford","Hamilton","Graham","Sullivan","Wallace","Woods",
"Cole","West","Jordan","Owens","Reynolds","Fisher","Ellis","Harrison","Gibson","Mcdonald","Cruz","Marshall",
"Ortiz","Gomez","Murray","Freeman","Wells","Webb","Simpson","Stevens","Tucker","Porter","Hunter","Hicks",
"Crawford","Henry","Boyd","Mason","Morales","Kennedy","Warren","Dixon","Ramos","Reyes","Burns","Gordon",
"Shaw","Holmes","Rice","Robertson","Hunt","Black","Daniels","Palmer","Mills","Nichols","Grant","Knight",
"Ferguson","Rose","Stone","Hawkins","Dunn","Perkins","Hudson","Spencer","Gardner","Stephens","Payne","Pierce",
"Berry","Matthews","Arnold","Wagner","Willis","Ray","Watkins","Olson","Carroll","Duncan","Snyder","Hart",
"Cunningham","Bradley","Lane","Andrews","Ruiz","Harper","Fox","Riley","Armstrong","Carpenter","Weaver","Greene",
"Lawrence","Elliott","Chavez","Sims","Austin","Peters","Kelley","Franklin","Lawson","Fields","Gutierrez",
"Ryan","Schmidt","Carr","Vasquez","Castillo","Wheeler","Chapman","Oliver","Montgomery","Richards","Williamson",
"Johnston","Banks","Meyer","Bishop","Mccoy","Howell","Alvarez","Morrison","Hansen","Fernandez","Garza","Harvey",
"Little","Burton","Stanley","Nguyen","George","Jacobs","Reid","Kim","Fuller","Lynch","Dean","Gilbert",
"Garrett","Romero","Welch","Larson","Frazier","Burke","Hanson","Day","Mendoza","Moreno","Bowman","Medina",
"Fowler","Brewer","Hoffman","Carlson","Silva","Pearson","Holland","Douglas","Fleming","Jensen","Vargas","Byrd",
"Davidson","Hopkins","May","Terry","Herrera","Wade","Soto","Walters","Curtis","Neal","Caldwell","Lowe",
"Jennings","Barnett","Graves","Jimenez","Horton","Shelton","Barrett","Obrien","Castro","Sutton","Gregory",
"Mckinney","Lucas","Miles","Craig","Rodriquez","Chambers","Holt","Lambert","Fletcher","Watts","Bates","Hale",
"Rhodes","Pena","Beck","Newman","Haynes","Mcdaniel","Mendez","Bush","Vaughn","Parks","Dawson","Santiago",
"Norris","Hardy","Love","Steele","Curry","Powers","Schultz","Barker","Guzman","Page","Munoz","Ball","Keller",
"Chandler","Weber","Leonard","Walsh","Lyons","Ramsey","Wolfe","Schneider","Mullins","Benson","Sharp","Bowen",
"Daniel","Barber","Cummings","Hines","Baldwin","Griffith","Valdez","Hubbard","Salazar","Reeves","Warner",
"Stevenson","Burgess","Santos","Tate","Cross","Garner","Mann","Mack","Moss","Thornton","Dennis","Mcgee",
"Farmer","Delgado","Aguilar","Vega","Glover","Manning","Cohen","Harmon","Rodgers","Robbins","Newton","Todd",
"Blair","Higgins","Ingram","Reese","Cannon","Strickland","Townsend","Potter","Goodwin","Walton","Rowe","Hampton",
"Ortega","Patton","Swanson","Joseph","Francis","Goodman","Maldonado","Yates","Becker","Erickson","Hodges","Rios",
"Conner","Adkins","Webster","Norman","Malone","Hammond","Flowers","Cobb","Moody","Quinn","Blake","Maxwell","Pope",
"Floyd","Osborne","Paul","Mccarthy","Guerrero","Lindsey","Estrada","Sandoval","Gibbs","Tyler","Gross","Fitzgerald",
"Stokes","Doyle","Sherman","Saunders","Wise","Colon","Gill","Alvarado","Greer","Padilla","Simon","Waters","Nunez",
"Ballard","Schwartz","Mcbride","Houston","Christensen","Klein","Pratt","Briggs","Parsons","Mclaughlin","Zimmerman",
"French","Buchanan","Moran","Copeland","Roy","Pittman","Brady","Mccormick","Holloway","Brock","Poole","Frank",
"Logan","Owen","Bass","Marsh","Drake","Wong","Jefferson","Park","Morton","Abbott","Sparks","Patrick","Norton",
"Huff","Clayton","Massey","Lloyd","Figueroa","Carson","Bowers","Roberson","Barton","Tran","Lamb","Harrington",
"Casey","Boone","Cortez","Clarke","Mathis","Singleton","Wilkins","Cain","Bryan","Underwood","Hogan","Mckenzie",
"Collier","Luna","Phelps","Mcguire","Allison","Bridges","Wilkerson","Nash","Summers","Atkins","Wilcox","Pitts",
"Conley","Marquez","Burnett","Richard","Cochran","Chase","Davenport","Hood","Gates","Clay","Ayala","Sawyer","Roman",
"Vazquez","Dickerson","Hodge","Acosta","Flynn","Espinoza","Nicholson","Monroe","Wolf","Morrow","Kirk","Randall",
"Anthony","Whitaker","Oconnor","Skinner","Ware","Molina","Kirby","Huffman","Bradford","Charles","Gilmore","Dominguez",
"Oneal","Bruce","Lang","Combs","Kramer","Heath","Hancock","Gallagher","Gaines","Shaffer","Short","Wiggins","Mathews",
"Mcclain","Fischer","Wall","Small","Melton","Hensley","Bond","Dyer","Cameron","Grimes","Contreras","Christian","Wyatt",
"Baxter","Snow","Mosley","Shepherd","Larsen","Hoover","Beasley","Glenn","Petersen","Whitehead","Meyers","Keith",
"Garrison","Vincent","Shields","Horn","Savage","Olsen","Schroeder","Hartman","Woodard","Mueller","Kemp","Deleon",
"Booth","Patel","Calhoun","Wiley","Eaton","Cline","Navarro","Harrell","Lester","Humphrey","Parrish","Duran",
"Hutchinson","Hess","Dorsey","Bullock","Robles","Beard","Dalton","Avila","Vance","Rich","Blackwell","York","Johns",
"Blankenship","Trevino","Salinas","Campos","Pruitt","Moses","Callahan","Golden","Montoya","Hardin","Guerra","Mcdowell"
,"Carey","Stafford","Gallegos","Henson","Wilkinson","Booker","Merritt","Miranda","Atkinson","Orr","Decker","Hobbs",
"Preston","Tanner","Knox","Pacheco","Stephenson","Glass","Rojas","Serrano","Marks","Hickman","English","Sweeney",
"Strong","Prince","Mcclure","Conway","Walter","Roth","Maynard","Farrell","Lowery","Hurst","Nixon","Weiss","Trujillo",
"Ellison","Sloan","Juarez","Winters","Mclean","Randolph","Leon","Boyer","Villarreal","Mccall","Gentry","Carrillo",
"Kent","Ayers","Lara","Shannon","Sexton","Pace","Hull","Leblanc","Browning","Velasquez","Leach","Chang","House",
"Sellers","Herring","Noble","Foley","Bartlett","Mercado","Landry","Durham","Walls","Barr","Mckee","Bauer","Rivers",
"Everett","Bradshaw","Pugh","Velez","Rush","Estes","Dodson","Morse","Sheppard","Weeks","Camacho","Bean","Barron",
"Livingston","Middleton","Spears","Branch","Blevins","Chen","Kerr","Mcconnell","Hatfield","Harding","Ashley","Solis",
"Herman","Frost","Giles","Blackburn","William","Pennington","Woodward","Finley","Mcintosh","Koch","Best","Solomon",
"Mccullough","Dudley","Nolan","Blanchard","Rivas","Brennan","Mejia","Kane","Benton","Joyce","Buckley","Haley","Valentine",
"Maddox","Russo","Mcknight","Buck","Moon","Mcmillan","Crosby","Berg","Dotson","Mays","Roach","Church","Chan","Richmond",
"Meadows","Faulkner","Oneill","Knapp","Kline","Barry","Ochoa","Jacobson","Gay","Avery","Hendricks","Horne","Shepard",
"Hebert","Cherry","Cardenas","Mcintyre","Whitney","Waller","Holman","Donaldson","Cantu","Terrell","Morin","Gillespie",
"Fuentes","Tillman","Sanford","Bentley","Peck","Key","Salas","Rollins","Gamble","Dickson","Battle","Santana","Cabrera",
"Cervantes","Howe","Hinton","Hurley","Spence","Zamora","Yang","Mcneil","Suarez","Case","Petty","Gould","Mcfarland",
"Sampson","Carver","Bray","Rosario","Macdonald","Stout","Hester","Melendez","Dillon","Farley","Hopper","Galloway",
"Potts","Bernard","Joyner","Stein","Aguirre","Osborn","Mercer","Bender","Franco","Rowland","Sykes","Benjamin",
"Travis","Pickett","Crane","Sears","Mayo","Dunlap","Hayden","Wilder","Mckay","Coffey","Mccarty","Ewing","Cooley",
"Vaughan","Bonner","Cotton","Holder","Stark","Ferrell","Cantrell","Fulton","Lynn","Lott","Calderon","Rosa","Pollard",
"Hooper","Burch","Mullen","Fry","Riddle","Levy","David","Duke","Odonnell","Guy","Michael","Britt","Frederick","Daugherty",
"Berger","Dillard","Alston","Jarvis","Frye","Riggs","Chaney","Odom","Duffy","Fitzpatrick","Valenzuela","Merrill","Mayer",
"Alford","Mcpherson","Acevedo","Donovan","Barrera","Albert","Cote","Reilly","Compton","Raymond","Mooney","Mcgowan",
"Craft","Cleveland","Clemons","Wynn","Nielsen","Baird","Stanton","Snider","Rosales","Bright","Witt","Stuart","Hays",
"Holden","Rutledge","Kinney","Clements","Castaneda","Slater","Hahn","Emerson","Conrad","Burks","Delaney","Pate",
"Lancaster","Sweet","Justice","Tyson","Sharpe","Whitfield","Talley","Macias","Irwin","Burris","Ratliff","Mccray",
"Madden","Kaufman","Beach","Goff","Cash","Bolton","Mcfadden","Levine","Good","Byers","Kirkland","Kidd","Workman",
"Carney","Dale","Mcleod","Holcomb","England","Finch","Head","Burt","Hendrix","Sosa","Haney","Franks","Sargent",
"Nieves","Downs","Rasmussen","Bird","Hewitt","Lindsay","Le","Foreman","Valencia","Oneil","Delacruz","Vinson",
"Dejesus","Hyde","Forbes","Gilliam","Guthrie","Wooten","Huber","Barlow","Boyle","Mcmahon","Buckner","Rocha",
"Puckett","Langley","Knowles","Cooke","Velazquez","Whitley","Noel","Vang"
]

lastname_count = len(lastnames)

Adjectives and Products


In [ ]:
print("Adjectives")
adjectives = [
 "Adorable", "Beautiful", "Clean", "Drab", "Elegant", "Fancy", "Glamorous", "Handsome",  
 "Magnificent", "Old-Fashioned", "Plain", "Quaint", "Sparkling", "Ugliest", "Unsightly",  
 "Red", "Orange", "Yellow", "Green", "Blue", "Purple", "Gray", "Black", "White", "Broad", "Chubby", 
 "Crooked", "Curved", "Deep", "Flat", "High", "Hollow", "Low", "Narrow", "Round", "Shallow", "Skinny", 
 "Square", "Steep", "Straight", "Wide", "Big", "Colossal", "Fat", "Gigantic", "Great", "Huge", "Immense", 
 "Large", "Little", "Mammoth", "Massive", "Miniature", "Petite", "Puny", "Scrawny", "Short", "Small",
 "Tall", "Teeny", "Tiny", "Ancient", "Fast", "Long", "Modern", "Old", "Quick",
 "Rapid", "Low", "Swift", "Hot", "Heavy", "Light"
]

adjective_count = len(adjectives)

print("Product Names")
products = [
 "Trimmer", "Sprinkler", "Hedge Trimmer", "Aerator", "Leaf Sweeper", "Leaf Blower", "Chainsaw", "Tractor",
 "Axe", "Sickle", "Pitchfork", "Spade", "Scythe", "Shovel", "Trowel", "Hoe", "Fork", "Rake", "Compressor",
 "Grinder", "Bandsaw", "Belt Sander", "Biscuit Joiner", "Chainsaw", "Circular Saw", "Drill", "Sander",
 "Food processor", "Heat Gun", "Hedge Trimmer", "Wrench", "Jointer", "Jigsaw", "Knitting Machine",
 "Lathe", "Lawn Mower", "String Trimmer", "Snow Blower", "Edgers", "Rakes", "Leaf Blower",
 "Shovel", "Trowel", "Sprinkler", "Watering Can", "Leaf Blower", "Miter", "Multi-tool", "Nail Gun",
 "Pressure Washer", "Saw", "Sander", "Sewing Machine", "Table Saw", "Vacuum cleaner", "Washing Machine"
]

product_count = len(products)

Email Addresses


In [ ]:
print("Email Sites")
emails = [
    "yahii.com", "giggle.com", "ail.com", "ricketmail.com", "acloud.com", "hatmail.com", "ijit.com",
    "obet.com", "nada.com", "snailmail.com", "org.com", "yetii.com", "giggle.com", "giggle.com",
    "ijit.com", "yahii.com", "nada.com", "snailmail.com"
]
email_count = len(emails)

Credit Cards


In [ ]:
print("Credit Card Names")
cc = [
    "VASA", "MCCD", "AMIX", "DYNY", "PKUP", "CASH", "VASA", "VASA", "MCCD", "PKUP", "VASA", "MCCD"
]
cc_count = len(cc)

Build List of Products and Prices


In [ ]:
import random

print("Product Names and Prices")
product_id = []
product_name = []
product_price = []
p_id = 1000

for i in range(0,10000):
    rand = int(random.uniform(0,adjective_count))
    current_adjective = adjectives[rand]
    rand = int(random.uniform(0,product_count))
    current_product = products[rand]
    
    # 40% 10-50$ 30% 50-100$ 20% 100-150$ 10% 150-300$
    
    rangep = random.randint(1,10)
    if (rangep <= 4):
        start_price = 10
        end_price = 50
    elif (rangep > 5 and rangep <= 7):
        start_price = 50
        end_price = 100
    if (rangep > 7 and rangep <= 9):
        start_price = 100
        end_price = 150
    elif (rangep == 10):
        start_price = 150
        end_price = 300
    else:
        start_price = 150
        end_price = 300            
        
    price = random.uniform(start_price,end_price)
    p_price = '{:.2f}'.format(price)
    
    p_name = current_adjective + " " + current_product
    if (p_name in product_name): continue
        
    product_id.append(p_id)
    product_name.append(p_name)
    product_price.append(p_price)
    
    p_id = p_id + 1
    if (p_id == 2000): break

Generate Records


In [ ]:
import json
from collections import OrderedDict

print("Generating JSON Records")

fout = open(p_filename,"w")
cust = 0

for cust in range(0,p_rows):
    custno = p_custno + cust
    customer = OrderedDict()
    
    # Build Structure First
    
    customer['customerid'] = custno
    customer['identity'] = {}
    customer['contact'] = {}
    customer['payment'] = {}
    customer['purchases'] = []
    
    # Create customer identity
    
    if (cust % 2 == 0):
        first = male[ random.randint(0,male_count-1)]
        customer['identity']['firstname'] = first
    else:
        first = female[ random.randint(0,female_count-1)] 
        customer['identity']['firstname'] = first
        
    last = lastnames[random.randint(0,lastname_count-1)]    
    
    customer['identity']['lastname'] = last
    customer['identity']['birthdate'] = date.fromordinal(random.randint(p_start_bday, p_end_bday)).isoformat()

    # Create contact information
    
    zip = zipcodes[random.randint(0,zipcode_count-1)]

    customer['contact']['street'] = streets[random.randint(0,street_count-1)]
    customer['contact']['city'] = zip[1]
    customer['contact']['state'] = zip[2]
    customer['contact']['zipcode'] = zip[0]
    customer['contact']['email'] = \
       first[0:random.randint(1,len(first))] + "." + last + "@" + emails[ random.randint(0,email_count-1)]
    customer['contact']['phone'] = \
       str(random.randint(201,999)) + "-" + \
       str(random.randint(200,999)) + "-" + \
       '{:04d}'.format(random.randint(0,9999))    
        
    # Payment information
    
    ccard = str(random.randint(1000,9999)) + "-" + \
    str(random.randint(1000,9999)) + "-" + \
    str(random.randint(1000,9999)) + "-" + \
    str(random.randint(1000,9999))  
        
    card_type = cc[random.randint(0,cc_count-1)]   
    
    customer['payment']['card_type'] = card_type
    customer['payment']['card_no'] = ccard
    
    # Create product purchases
          
    for pc in range(0, random.randint(1,p_purchases)):
        pchoose = random.randint(0,4)
        if (pchoose == 0):
            pno = random.randint(0,100)
        elif (pchoose == 1):
            pno = random.randint(100,400)            
        elif (pchoose == 2):
            pno = random.randint(600,1000-1)
        elif (pchoose == 3):
            pno = random.randint(300,700)            
        elif (pchoose == 4):
            pno = random.randint(0,1000-1)    
        else:
            pno = random.randint(0,1000-1)        
        #pno = random.randint(0,1000-1)
        if (float(product_price[pno]) < 20):
            quantity = random.randint(1,4)        
        if (float(product_price[pno]) < 40):
            quantity = random.randint(1,3)            
        if (float(product_price[pno]) < 60):
            quantity = random.randint(1,2)
        else:
            quantity = 1
        ccard = str(random.randint(1000,9999)) + "-" + \
                str(random.randint(1000,9999)) + "-" + \
                str(random.randint(1000,9999)) + "-" + \
                str(random.randint(1000,9999))              
        product = {
            'tx_date'    : date.fromordinal(random.randint(p_tx_start, p_tx_end)).isoformat(),
            'tx_no'      : custno + random.randint(1000,200000),
            'product_id' : product_id[pno], 
            'product'    : product_name[pno],
            'quantity'   : quantity,
            'item_cost'  : float(product_price[pno])
            }
        customer['purchases'].append(product)
        
    ojs = json.dumps(customer)
    fout.write(ojs+"\n")    
    if ((cust % 5000) == 0 and cust != 0): 
        print(str(cust)+" rows written.")
        
fout.close()
print(str(cust+1) + " rows written.")
print("File creation completed.")