import random
# All 50 US states
states = [
("Alabama", "AL"), ("Alaska", "AK"), ("Arizona", "AZ"), ("Arkansas", "AR"),
("California", "CA"), ("Colorado", "CO"), ("Connecticut", "CT"), ("Delaware", "DE"),
("Florida", "FL"), ("Georgia", "GA"), ("Hawaii", "HI"), ("Idaho", "ID"),
("Illinois", "IL"), ("Indiana", "IN"), ("Iowa", "IA"), ("Kansas", "KS"),
("Kentucky", "KY"), ("Louisiana", "LA"), ("Maine", "ME"), ("Maryland", "MD"),
("Massachusetts", "MA"), ("Michigan", "MI"), ("Minnesota", "MN"), ("Mississippi", "MS"),
("Missouri", "MO"), ("Montana", "MT"), ("Nebraska", "NE"), ("Nevada", "NV"),
("New Hampshire", "NH"), ("New Jersey", "NJ"), ("New Mexico", "NM"), ("New York", "NY"),
("North Carolina", "NC"), ("North Dakota", "ND"), ("Ohio", "OH"), ("Oklahoma", "OK"),
("Oregon", "OR"), ("Pennsylvania", "PA"), ("Rhode Island", "RI"), ("South Carolina", "SC"),
("South Dakota", "SD"), ("Tennessee", "TN"), ("Texas", "TX"), ("Utah", "UT"),
("Vermont", "VT"), ("Virginia", "VA"), ("Washington", "WA"), ("West Virginia", "WV"),
("Wisconsin", "WI"), ("Wyoming", "WY")
]
# Base real US cities
base_cities = [
"Springfield", "Riverside", "Franklin", "Greenville", "Bristol",
"Clinton", "Fairview", "Salem", "Madison", "Georgetown",
"Arlington", "Ashland", "Oxford", "Jackson", "Burlington"
]
# Area codes (sample realistic)
area_codes = ["212", "213", "305", "312", "404", "415", "512", "617", "704", "808"]
# Generate 1000+ unique cities
def generate_cities(n=1000):
cities = set()
while len(cities) < n:
base = random.choice(base_cities)
suffix = random.choice([
"City", "Town", "Heights", "Park", "Village", "County",
"Hills", "Bay", "Point", "Creek", "Valley", "Lake"
])
city_name = f"{base} {suffix}"
zip_code = str(random.randint(10000, 99999))
area_code = random.choice(area_codes)
state_name, state_code = random.choice(states)
cities.add((city_name, state_name, state_code, zip_code, area_code))
return list(cities)
# Generate phone dataset
def generate_us_data(count=500):
cities = generate_cities(1000)
results = set()
while len(results) < count:
city, state_name, state_code, zip_code, area_code = random.choice(cities)
prefix = random.randint(200, 999)
line = random.randint(1000, 9999)
phone = f"+1-{area_code}-{prefix}-{line}"
results.add((phone, city, state_name, zip_code))
return list(results)
# Run
data = generate_us_data(10000)
# Print
for phone, city, state, zip_code in data:
print(f"{phone} | {city}, {state} {zip_code}")