#Simple function to derive state abbreviation from FP code
def state( fpcode):
    if fpcode == '01':
        return "AL"
    elif fpcode == '02':
        return "AK"
    elif fpcode == '04':
        return "AZ"
    elif fpcode == '05':
        return "AR"
    elif fpcode == '06':
        return "CA"
    elif fpcode == '08':
        return "CO"
    elif fpcode == '09':
        return "CT"
    elif fpcode == '10':
        return "DE"
    elif fpcode == '11':
        return "DC"
    elif fpcode == '12':
        return "FL"
    elif fpcode == '13':
        return "GA"
    elif fpcode == '15':
        return "HI"
    elif fpcode == '16':
        return "ID"
    elif fpcode == '17':
        return "IL"
    elif fpcode == '18':
        return "IN"
    elif fpcode == '19':
        return "IA"
    elif fpcode == '20':
        return "KS"
    elif fpcode == '21':
        return "KY"
    elif fpcode == '22':
        return "LA"
    elif fpcode == '23':
        return "ME"
    elif fpcode == '24':
        return "MD"
    elif fpcode == '25':
        return "MA"
    elif fpcode == '26':
        return "MI"
    elif fpcode == '27':
        return "MN"
    elif fpcode == '28':
        return "MS"
    elif fpcode == '29':
        return "MO"
    elif fpcode == '30':
        return "MT"
    elif fpcode == '31':
        return "NE"
    elif fpcode == '32':
        return "NV"
    elif fpcode == '33':
        return "NH"
    elif fpcode == '34':
        return "NJ"
    elif fpcode == '35':
        return "NM"
    elif fpcode == '36':
        return "NY"
    elif fpcode == '37':
        return "NC"
    elif fpcode == '38':
        return "ND"
    elif fpcode == '39':
        return "OH"
    elif fpcode == '40':
        return "OK"
    elif fpcode == '41':
        return "OR"
    elif fpcode == '42':
        return "PA"
    elif fpcode == '44':
        return "RI"
    elif fpcode == '45':
        return "SC"
    elif fpcode == '46':
        return "SD"
    elif fpcode == '47':
        return "TN"
    elif fpcode == '48':
        return "TX"
    elif fpcode == '49':
        return "UT"
    elif fpcode == '50':
        return "VT"
    elif fpcode == '51':
        return "VA"
    elif fpcode == '53':
        return "WA"
    elif fpcode == '54':
        return "WV"
    elif fpcode == '55':
        return "WI"
    elif fpcode == '56':
        return "WY"
    else:
        return "Not a US FP code."
