country_mapping = {
   582: 'MEXICO Air Sea, and Not Reported (I-94, no land arrivals)',
   236: 'AFGHANISTAN',
   101: 'ALBANIA',
   316: 'ALGERIA',
   102: 'ANDORRA',
   324: 'ANGOLA',
   529: 'ANGUILLA',
   518: 'ANTIGUA-BARBUDA',
   687: 'ARGENTINA ',
   151: 'ARMENIA',
   532: 'ARUBA',
   438: 'AUSTRALIA',
   103: 'AUSTRIA',
   152: 'AZERBAIJAN',
   512: 'BAHAMAS',
   298: 'BAHRAIN',
   274: 'BANGLADESH',
   513: 'BARBADOS',
   104: 'BELGIUM',
   581: 'BELIZE',
   386: 'BENIN',
   509: 'BERMUDA',
   153: 'BELARUS',
   242: 'BHUTAN',
   688: 'BOLIVIA',
   717: 'BONAIRE, ST EUSTATIUS, SABA',
   164: 'BOSNIA-HERZEGOVINA',
   336: 'BOTSWANA',
   689: 'BRAZIL',
   525: 'BRITISH VIRGIN ISLANDS',
   217: 'BRUNEI',
   105: 'BULGARIA',
   393: 'BURKINA FASO',
   243: 'BURMA',
   375: 'BURUNDI',
   310: 'CAMEROON',
   326: 'CAPE VERDE',
   526: 'CAYMAN ISLANDS',
   383: 'CENTRAL AFRICAN REPUBLIC',
   384: 'CHAD',
   690: 'CHILE',
   245: 'CHINA, PRC',
   721: 'CURACAO',
   270: 'CHRISTMAS ISLAND',
   271: 'COCOS ISLANDS',
   691: 'COLOMBIA',
   317: 'COMOROS',
   385: 'CONGO',
   467: 'COOK ISLANDS',
   575: 'COSTA RICA',
   165: 'CROATIA',
   584: 'CUBA',
   218: 'CYPRUS',
   140: 'CZECH REPUBLIC',
   723: 'FAROE ISLANDS (PART OF DENMARK)',
   108: 'DENMARK',
   322: 'DJIBOUTI',
   519: 'DOMINICA',
   585: 'DOMINICAN REPUBLIC',
   240: 'EAST TIMOR',
   692: 'ECUADOR',
   368: 'EGYPT',
   576: 'EL SALVADOR',
   399: 'EQUATORIAL GUINEA',
   372: 'ERITREA',
   109: 'ESTONIA',
   369: 'ETHIOPIA',
   604: 'FALKLAND ISLANDS',
   413: 'FIJI',
   110: 'FINLAND',
   111: 'FRANCE',
   601: 'FRENCH GUIANA',
   411: 'FRENCH POLYNESIA',
   387: 'GABON',
   338: 'GAMBIA',
   758: 'GAZA STRIP', 
   154: 'GEORGIA',
   112: 'GERMANY',
   339: 'GHANA',
   143: 'GIBRALTAR',
   113: 'GREECE',
   520: 'GRENADA',
   507: 'GUADELOUPE',
   577: 'GUATEMALA',
   382: 'GUINEA',
   327: 'GUINEA-BISSAU',
   603: 'GUYANA',
   586: 'HAITI',
   726: 'HEARD AND MCDONALD IS.',
   149: 'HOLY SEE/VATICAN',
   528: 'HONDURAS',
   206: 'HONG KONG',
   114: 'HUNGARY',
   115: 'ICELAND',
   213: 'INDIA',
   759: 'INDIAN OCEAN AREAS (FRENCH)',
   729: 'INDIAN OCEAN TERRITORY',
   204: 'INDONESIA',
   249: 'IRAN',
   250: 'IRAQ',
   116: 'IRELAND',
   251: 'ISRAEL',
   117: 'ITALY',
   388: 'IVORY COAST',
   514: 'JAMAICA',
   209: 'JAPAN',
   253: 'JORDAN',
   201: 'KAMPUCHEA',
   155: 'KAZAKHSTAN',
   340: 'KENYA',
   414: 'KIRIBATI',
   732: 'KOSOVO',
   272: 'KUWAIT',
   156: 'KYRGYZSTAN',
   203: 'LAOS',
   118: 'LATVIA',
   255: 'LEBANON',
   335: 'LESOTHO',
   370: 'LIBERIA',
   381: 'LIBYA',
   119: 'LIECHTENSTEIN',
   120: 'LITHUANIA',
   121: 'LUXEMBOURG',
   214: 'MACAU',
   167: 'MACEDONIA',
   320: 'MADAGASCAR',
   345: 'MALAWI',
   273: 'MALAYSIA',
   220: 'MALDIVES',
   392: 'MALI',
   145: 'MALTA',
   472: 'MARSHALL ISLANDS',
   511: 'MARTINIQUE',
   389: 'MAURITANIA',
   342: 'MAURITIUS',
   760: 'MAYOTTE (AFRICA - FRENCH)',
   473: 'MICRONESIA, FED. STATES OF',
   157: 'MOLDOVA',
   122: 'MONACO',
   299: 'MONGOLIA',
   735: 'MONTENEGRO',
   521: 'MONTSERRAT',
   332: 'MOROCCO',
   329: 'MOZAMBIQUE',
   371: 'NAMIBIA',
   440: 'NAURU',
   257: 'NEPAL',
   123: 'NETHERLANDS',
   508: 'NETHERLANDS ANTILLES',
   409: 'NEW CALEDONIA',
   464: 'NEW ZEALAND',
   579: 'NICARAGUA',
   390: 'NIGER',
   343: 'NIGERIA',
   470: 'NIUE',
   275: 'NORTH KOREA',
   124: 'NORWAY',
   256: 'OMAN',
   258: 'PAKISTAN',
   474: 'PALAU',
   743: 'PALESTINE',
   504: 'PANAMA',
   441: 'PAPUA NEW GUINEA',
   693: 'PARAGUAY',
   694: 'PERU',
   260: 'PHILIPPINES',
   416: 'PITCAIRN ISLANDS',
   107: 'POLAND',
   126: 'PORTUGAL',
   297: 'QATAR',
   748: 'REPUBLIC OF SOUTH SUDAN',
   321: 'REUNION',
   127: 'ROMANIA',
   158: 'RUSSIA',
   376: 'RWANDA',
   128: 'SAN MARINO',
   330: 'SAO TOME AND PRINCIPE',
   261: 'SAUDI ARABIA',
   391: 'SENEGAL',
   142: 'SERBIA AND MONTENEGRO',
   745: 'SERBIA',
   347: 'SEYCHELLES',
   348: 'SIERRA LEONE',
   207: 'SINGAPORE',
   141: 'SLOVAKIA',
   166: 'SLOVENIA',
   412: 'SOLOMON ISLANDS',
   397: 'SOMALIA',
   373: 'SOUTH AFRICA',
   276: 'SOUTH KOREA',
   129: 'SPAIN',
   244: 'SRI LANKA',
   346: 'ST. HELENA',
   522: 'ST. KITTS-NEVIS',
   523: 'ST. LUCIA',
   502: 'ST. PIERRE AND MIQUELON',
   524: 'ST. VINCENT-GRENADINES',
   716: 'SAINT BARTHELEMY',
   736: 'SAINT MARTIN',
   749: 'SAINT MAARTEN', 
   350: 'SUDAN',
   602: 'SURINAME',
   351: 'SWAZILAND',
   130: 'SWEDEN',
   131: 'SWITZERLAND',
   262: 'SYRIA',
   268: 'TAIWAN',
   159: 'TAJIKISTAN',
   353: 'TANZANIA',
   263: 'THAILAND',
   304: 'TOGO',
   417: 'TONGA',
   516: 'TRINIDAD AND TOBAGO',
   323: 'TUNISIA',
   264: 'TURKEY',
   161: 'TURKMENISTAN',
   527: 'TURKS AND CAICOS ISLANDS',
   420: 'TUVALU',
   352: 'UGANDA',
   162: 'UKRAINE',
   296: 'UNITED ARAB EMIRATES',
   135: 'UNITED KINGDOM',
   695: 'URUGUAY',
   163: 'UZBEKISTAN',
   410: 'VANUATU',
   696: 'VENEZUELA',
   266: 'VIETNAM',
   469: 'WALLIS AND FUTUNA ISLANDS',
   757: 'WEST INDIES (FRENCH)',
   333: 'WESTERN SAHARA',
   465: 'WESTERN SAMOA',
   216: 'YEMEN',
   139: 'YUGOSLAVIA',
   301: 'ZAIRE',
   344: 'ZAMBIA',
   315: 'ZIMBABWE',
   403: 'INVALID: AMERICAN SAMOA',
   712: 'INVALID: ANTARCTICA',
   700: 'INVALID: BORN ON BOARD SHIP',
   719: 'INVALID: BOUVET ISLAND (ANTARCTICA/NORWAY TERR.)',
   574: 'INVALID: CANADA',
   720: 'INVALID: CANTON AND ENDERBURY ISLS',
   106: 'INVALID: CZECHOSLOVAKIA',
   739: 'INVALID: DRONNING MAUD LAND (ANTARCTICA-NORWAY)',
   394: 'INVALID: FRENCH SOUTHERN AND ANTARCTIC',
   501: 'INVALID: GREENLAND',
   404: 'INVALID: GUAM',
   730: 'INVALID: INTERNATIONAL WATERS',
   731: 'INVALID: JOHNSON ISLAND',
   471: 'INVALID: MARIANA ISLANDS, NORTHERN',
   737: 'INVALID: MIDWAY ISLANDS',
   753: 'INVALID: MINOR OUTLYING ISLANDS - USA',
   740: 'INVALID: NEUTRAL ZONE (S. ARABIA/IRAQ)',
   710: 'INVALID: NON-QUOTA IMMIGRANT',
   505: 'INVALID: PUERTO RICO',
    0 : 'INVALID: STATELESS',
   705: 'INVALID: STATELESS',
   583: 'INVALID: UNITED STATES',
   407: 'INVALID: UNITED STATES',
   999: 'INVALID: UNKNOWN',
   239: 'INVALID: UNKNOWN COUNTRY',
   134: 'INVALID: USSR',
   506: 'INVALID: U.S. VIRGIN ISLANDS',
   755: 'INVALID: WAKE ISLAND',
   311: 'Collapsed Tanzania (should not show)',
   741: 'Collapsed Curacao (should not show)',
    54: 'No Country Code (54)',
   100: 'No Country Code (100)',
   187: 'No Country Code (187)',
   190: 'No Country Code (190)',
   200: 'No Country Code (200)',
   219: 'No Country Code (219)',
   238: 'No Country Code (238)',
   277: 'No Country Code (277)',
   293: 'No Country Code (293)',
   300: 'No Country Code (300)',
   319: 'No Country Code (319)',
   365: 'No Country Code (365)',
   395: 'No Country Code (395)',
   400: 'No Country Code (400)',
   485: 'No Country Code (485)',
   503: 'No Country Code (503)',
   589: 'No Country Code (589)',
   592: 'No Country Code (592)',
   791: 'No Country Code (791)',
   849: 'No Country Code (849)',
   914: 'No Country Code (914)',
   944: 'No Country Code (944)',
   996: 'No Country Code (996)'
}

transportation_mapping = {
    1: 'Air',
    2: 'Sea',
    3: 'Land',
    9: 'Not reported'
}

state_mapping = {
    'AL': 'ALABAMA',
    'AK': 'ALASKA',
    'AZ': 'ARIZONA',
    'AR': 'ARKANSAS',
    'CA': 'CALIFORNIA',
    'CO': 'COLORADO',
    'CT': 'CONNECTICUT',
    'DE': 'DELAWARE',
    'DC': 'DIST. OF COLUMBIA',
    'FL': 'FLORIDA',
    'GA': 'GEORGIA',
    'GU': 'GUAM',
    'HI': 'HAWAII',
    'ID': 'IDAHO',
    'IL': 'ILLINOIS',
    'IN': 'INDIANA',
    'IA': 'IOWA',
    'KS': 'KANSAS',
    'KY': 'KENTUCKY',
    'LA': 'LOUISIANA',
    'ME': 'MAINE',
    'MD': 'MARYLAND',
    'MA': 'MASSACHUSETTS',
    'MI': 'MICHIGAN',
    'MN': 'MINNESOTA',
    'MS': 'MISSISSIPPI',
    'MO': 'MISSOURI',
    'MT': 'MONTANA',
    'NC': 'N. CAROLINA',
    'ND': 'N. DAKOTA',
    'NE': 'NEBRASKA',
    'NV': 'NEVADA',
    'NH': 'NEW HAMPSHIRE',
    'NJ': 'NEW JERSEY',
    'NM': 'NEW MEXICO',
    'NY': 'NEW YORK',
    'OH': 'OHIO',
    'OK': 'OKLAHOMA',
    'OR': 'OREGON',
    'PA': 'PENNSYLVANIA',
    'PR': 'PUERTO RICO',
    'RI': 'RHODE ISLAND',
    'SC': 'S. CAROLINA',
    'SD': 'S. DAKOTA',
    'TN': 'TENNESSEE',
    'TX': 'TEXAS',
    'UT': 'UTAH',
    'VT': 'VERMONT',
    'VI': 'VIRGIN ISLANDS',
    'VA': 'VIRGINIA',
    'WV': 'W. VIRGINIA',
    'WA': 'WASHINGTON',
    'WI': 'WISCONSON',
    'WY': 'WYOMING',
    '99': 'All Other Codes'
}

visa_type_mapping = {
    1: "Business",
    2: "Pleasure",
    3: "Student"
}
