diff --git a/__pycache__/__init__.cpython-36.pyc b/__pycache__/__init__.cpython-36.pyc index b4b7209..fefd49b 100644 Binary files a/__pycache__/__init__.cpython-36.pyc and b/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_load_data/__pycache__/__init__.cpython-36.pyc b/q01_load_data/__pycache__/__init__.cpython-36.pyc index 92b3ac2..5de6d15 100644 Binary files a/q01_load_data/__pycache__/__init__.cpython-36.pyc and b/q01_load_data/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_load_data/__pycache__/build.cpython-36.pyc b/q01_load_data/__pycache__/build.cpython-36.pyc index e27baf6..aacf235 100644 Binary files a/q01_load_data/__pycache__/build.cpython-36.pyc and b/q01_load_data/__pycache__/build.cpython-36.pyc differ diff --git a/q01_load_data/build.py b/q01_load_data/build.py index 69d7209..af23d97 100644 --- a/q01_load_data/build.py +++ b/q01_load_data/build.py @@ -1,5 +1,15 @@ +# %load q01_load_data/build.py import pandas as pd - +path = 'data/excel-comp-data.xlsx' def q01_load_data(path): - "write your solution here" + data = pd.read_excel(path) + + data['state'] = data.state.str.lower() + data['total'] = data[['Jan','Feb','Mar']].sum(axis=1) + + return data + + + + diff --git a/q01_load_data/tests/__pycache__/__init__.cpython-36.pyc b/q01_load_data/tests/__pycache__/__init__.cpython-36.pyc index 2a2dfc7..d6ca98a 100644 Binary files a/q01_load_data/tests/__pycache__/__init__.cpython-36.pyc and b/q01_load_data/tests/__pycache__/__init__.cpython-36.pyc differ diff --git a/q01_load_data/tests/__pycache__/tests.cpython-36.pyc b/q01_load_data/tests/__pycache__/tests.cpython-36.pyc index 76e04c8..a1757a2 100644 Binary files a/q01_load_data/tests/__pycache__/tests.cpython-36.pyc and b/q01_load_data/tests/__pycache__/tests.cpython-36.pyc differ diff --git a/q02_append_row/__pycache__/__init__.cpython-36.pyc b/q02_append_row/__pycache__/__init__.cpython-36.pyc index de0cf61..a893fa8 100644 Binary files a/q02_append_row/__pycache__/__init__.cpython-36.pyc and b/q02_append_row/__pycache__/__init__.cpython-36.pyc differ diff --git a/q02_append_row/__pycache__/build.cpython-36.pyc b/q02_append_row/__pycache__/build.cpython-36.pyc index 5088267..7a6ac46 100644 Binary files a/q02_append_row/__pycache__/build.cpython-36.pyc and b/q02_append_row/__pycache__/build.cpython-36.pyc differ diff --git a/q02_append_row/build.py b/q02_append_row/build.py index af3701d..7ab7c7e 100644 --- a/q02_append_row/build.py +++ b/q02_append_row/build.py @@ -1,11 +1,24 @@ +# %load q02_append_row/build.py import pandas as pd import sys, os #sys.path.append(os.path.join(os.path.dirname(os.curdir))) from greyatomlib.pandas_guided_project.q01_load_data.build import q01_load_data +path = 'data/excel-comp-data.xlsx' def q02_append_row(path): - "write your solution here" + 'write your solution here' + + df = q01_load_data(path) + a =df['Jan'].sum() + b = df['Feb'].sum() + c = df['Mar'].sum() + d = df['total'].sum() + list_new = [[a,b,c,d]] + df_final = df.append(pd.DataFrame(list_new,columns = ['Jan','Feb','Mar','total'])) + return df_final + + diff --git a/q02_append_row/tests/__pycache__/__init__.cpython-36.pyc b/q02_append_row/tests/__pycache__/__init__.cpython-36.pyc index dab3eca..ef63718 100644 Binary files a/q02_append_row/tests/__pycache__/__init__.cpython-36.pyc and b/q02_append_row/tests/__pycache__/__init__.cpython-36.pyc differ diff --git a/q02_append_row/tests/__pycache__/tests.cpython-36.pyc b/q02_append_row/tests/__pycache__/tests.cpython-36.pyc index 742ee79..4ebb92f 100644 Binary files a/q02_append_row/tests/__pycache__/tests.cpython-36.pyc and b/q02_append_row/tests/__pycache__/tests.cpython-36.pyc differ diff --git a/q03_scrape_clean/__pycache__/__init__.cpython-36.pyc b/q03_scrape_clean/__pycache__/__init__.cpython-36.pyc index e99e173..56206fd 100644 Binary files a/q03_scrape_clean/__pycache__/__init__.cpython-36.pyc and b/q03_scrape_clean/__pycache__/__init__.cpython-36.pyc differ diff --git a/q03_scrape_clean/__pycache__/build.cpython-36.pyc b/q03_scrape_clean/__pycache__/build.cpython-36.pyc index cdec2c4..8cd371b 100644 Binary files a/q03_scrape_clean/__pycache__/build.cpython-36.pyc and b/q03_scrape_clean/__pycache__/build.cpython-36.pyc differ diff --git a/q03_scrape_clean/build.py b/q03_scrape_clean/build.py index a88e3e2..18d3510 100644 --- a/q03_scrape_clean/build.py +++ b/q03_scrape_clean/build.py @@ -1,9 +1,19 @@ +# %load q03_scrape_clean/build.py import pandas as pd import sys, os import requests sys.path.append(os.path.join(os.path.dirname(os.curdir))) - +url = 'https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations' def q03_scrape_clean(url): - "write your solution here" + + from urllib.request import urlopen + + df = pd.read_html(url, skiprows = 11,header = 0) + df[0] = df[0].rename(columns = {'United States of America':'UnitedStatesofAmerica'}) + data_folder = df[0].to_csv('scrapeddata.csv') + return df[0] + +q03_scrape_clean(url) + diff --git a/q03_scrape_clean/tests/__pycache__/__init__.cpython-36.pyc b/q03_scrape_clean/tests/__pycache__/__init__.cpython-36.pyc index bee36fb..4ec2d95 100644 Binary files a/q03_scrape_clean/tests/__pycache__/__init__.cpython-36.pyc and b/q03_scrape_clean/tests/__pycache__/__init__.cpython-36.pyc differ diff --git a/q03_scrape_clean/tests/__pycache__/tests.cpython-36.pyc b/q03_scrape_clean/tests/__pycache__/tests.cpython-36.pyc index 8529c87..a44ca76 100644 Binary files a/q03_scrape_clean/tests/__pycache__/tests.cpython-36.pyc and b/q03_scrape_clean/tests/__pycache__/tests.cpython-36.pyc differ diff --git a/q04_mapping/__pycache__/__init__.cpython-36.pyc b/q04_mapping/__pycache__/__init__.cpython-36.pyc index ee0618f..2f31610 100644 Binary files a/q04_mapping/__pycache__/__init__.cpython-36.pyc and b/q04_mapping/__pycache__/__init__.cpython-36.pyc differ diff --git a/q04_mapping/__pycache__/build.cpython-36.pyc b/q04_mapping/__pycache__/build.cpython-36.pyc index 8283165..ee89387 100644 Binary files a/q04_mapping/__pycache__/build.cpython-36.pyc and b/q04_mapping/__pycache__/build.cpython-36.pyc differ diff --git a/q04_mapping/build.py b/q04_mapping/build.py index 914cfa8..8e613cc 100644 --- a/q04_mapping/build.py +++ b/q04_mapping/build.py @@ -1,10 +1,41 @@ +# %load q04_mapping/build.py import pandas as pd import sys, os import numpy as np -#sys.path.append(os.path.join(os.path.dirname(os.curdir))) +sys.path.append(os.path.join(os.path.dirname(os.curdir))) from greyatomlib.pandas_guided_project.q02_append_row.build import q02_append_row +path1 = 'data/excel-comp-data.xlsx' +path2 = 'data/scraped.csv' +def q01_load_data(path): + data = pd.read_excel(path) + + data['state'] = data.state.str.lower() + data['total'] = data[['Jan','Feb','Mar']].sum(axis=1) + + return data +def q02_append_row(path): + + df = q01_load_data(path) + sum_row = df[['Jan', 'Feb', 'Mar', 'total']].sum() + df_sum = pd.DataFrame(data=sum_row).T + df_final = df.append(df_sum,ignore_index = True) + return df_final + def q04_mapping(path1,path2): - "write your solution here" + + a = pd.read_excel(path1) + b = pd.read_csv(path2) + b['United States of America'] = b['United States of America'].astype(str).str.lower() + b['US'] = b['US'].astype(str) + mapping = b.set_index('United States of America').to_dict()['US'] + mapping['mississipi']=mapping.pop('mississippi') + mapping['tenessee']=mapping.pop('tennessee') + new_df = q02_append_row(path1) +# new['abbr'] = np.nan + new_df.insert(loc = 6,column = 'abbr', value = np.nan) + new_df['state'] = new_df['state'].map(mapping) + return new_df +q04_mapping(path1,path2) diff --git a/q04_mapping/tests/__pycache__/__init__.cpython-36.pyc b/q04_mapping/tests/__pycache__/__init__.cpython-36.pyc index eef3d6b..9c0cf89 100644 Binary files a/q04_mapping/tests/__pycache__/__init__.cpython-36.pyc and b/q04_mapping/tests/__pycache__/__init__.cpython-36.pyc differ diff --git a/q04_mapping/tests/__pycache__/test.cpython-36.pyc b/q04_mapping/tests/__pycache__/test.cpython-36.pyc index 7f7c96e..81ba5d0 100644 Binary files a/q04_mapping/tests/__pycache__/test.cpython-36.pyc and b/q04_mapping/tests/__pycache__/test.cpython-36.pyc differ diff --git a/q05_replace_missing_values/__pycache__/__init__.cpython-36.pyc b/q05_replace_missing_values/__pycache__/__init__.cpython-36.pyc index f50c1d5..2256f52 100644 Binary files a/q05_replace_missing_values/__pycache__/__init__.cpython-36.pyc and b/q05_replace_missing_values/__pycache__/__init__.cpython-36.pyc differ diff --git a/q05_replace_missing_values/__pycache__/build.cpython-36.pyc b/q05_replace_missing_values/__pycache__/build.cpython-36.pyc index 6a32964..e6e8929 100644 Binary files a/q05_replace_missing_values/__pycache__/build.cpython-36.pyc and b/q05_replace_missing_values/__pycache__/build.cpython-36.pyc differ diff --git a/q05_replace_missing_values/build.py b/q05_replace_missing_values/build.py index 97d9755..e98bcab 100644 --- a/q05_replace_missing_values/build.py +++ b/q05_replace_missing_values/build.py @@ -1,3 +1,4 @@ +# %load q05_replace_missing_values/build.py import pandas as pd import numpy as np import sys @@ -7,7 +8,47 @@ path1 = 'data/excel-comp-data.xlsx' path2 = 'data/scraped.csv' +# def q05_replace_missing_values(path1,path2): +def q01_load_data(path): + data = pd.read_excel(path) + + data['state'] = data.state.str.lower() + data['total'] = data[['Jan','Feb','Mar']].sum(axis=1) + + return data + +def q02_append_row(path): + + df = q01_load_data(path) + sum_row = df[['Jan', 'Feb', 'Mar', 'total']].sum() + df_sum = pd.DataFrame(data=sum_row).T + df_final = df.append(df_sum,ignore_index = True) + return df_final +def q04_mapping(path1,path2): + + a = pd.read_excel(path1) + b = pd.read_csv(path2) + b['United States of America'] = b['United States of America'].astype(str).str.lower() + b['US'] = b['US'].astype(str) + mapping = b.set_index('United States of America').to_dict()['US'] + mapping['mississipi']=mapping.pop('mississippi') + mapping['tenessee']=mapping.pop('tennessee') + new_df = q02_append_row(path1) +# new['abbr'] = np.nan + new_df.insert(loc = 6,column = 'abbr', value = np.nan) + new_df['state'] = new_df['state'].map(mapping) + return new_df def q05_replace_missing_values(path1,path2): + df_replace = q04_mapping(path1,path2) + df_mississippi = pd.DataFrame(df_replace.iloc[6,:]).T + df_tenessee = pd.DataFrame(df_replace.iloc[10,:]).T + df_tenessee = df_tenessee.replace(np.nan,'TN') + df_mississippi = df_mississippi.replace(np.nan,'MS') + df_replace.iloc[6,6] = 'MS' + df_replace.iloc[10,6] = 'TN' + return df_replace + +q05_replace_missing_values(path1,path2) +#print(q05_replace_missing_values(path1,path2).shape) -#print(q05_replace_missing_values(path1,path2).shape) \ No newline at end of file diff --git a/q05_replace_missing_values/tests/__pycache__/__init__.cpython-36.pyc b/q05_replace_missing_values/tests/__pycache__/__init__.cpython-36.pyc index 03391a7..8826a7d 100644 Binary files a/q05_replace_missing_values/tests/__pycache__/__init__.cpython-36.pyc and b/q05_replace_missing_values/tests/__pycache__/__init__.cpython-36.pyc differ diff --git a/q05_replace_missing_values/tests/__pycache__/tests.cpython-36.pyc b/q05_replace_missing_values/tests/__pycache__/tests.cpython-36.pyc index 3b9d62a..a6f3ab6 100644 Binary files a/q05_replace_missing_values/tests/__pycache__/tests.cpython-36.pyc and b/q05_replace_missing_values/tests/__pycache__/tests.cpython-36.pyc differ diff --git a/q06_sub_total/__pycache__/__init__.cpython-36.pyc b/q06_sub_total/__pycache__/__init__.cpython-36.pyc index f70134c..8acb1ff 100644 Binary files a/q06_sub_total/__pycache__/__init__.cpython-36.pyc and b/q06_sub_total/__pycache__/__init__.cpython-36.pyc differ diff --git a/q06_sub_total/__pycache__/build.cpython-36.pyc b/q06_sub_total/__pycache__/build.cpython-36.pyc index adaf0ce..4231553 100644 Binary files a/q06_sub_total/__pycache__/build.cpython-36.pyc and b/q06_sub_total/__pycache__/build.cpython-36.pyc differ diff --git a/q06_sub_total/build.py b/q06_sub_total/build.py index c420838..12e2c2d 100644 --- a/q06_sub_total/build.py +++ b/q06_sub_total/build.py @@ -1,3 +1,4 @@ +# %load q06_sub_total/build.py import pandas as pd import numpy as np from sklearn.model_selection import train_test_split @@ -9,8 +10,51 @@ path1 = 'data/excel-comp-data.xlsx' path2 = 'data/scraped.csv' +# def q06_sub_total(path1,path2): +def q01_load_data(path): + data = pd.read_excel(path) + + data['state'] = data.state.str.lower() + data['total'] = data[['Jan','Feb','Mar']].sum(axis=1) + + return data + +def q02_append_row(path): + + df = q01_load_data(path) + sum_row = df[['Jan', 'Feb', 'Mar', 'total']].sum() + df_sum = pd.DataFrame(data=sum_row).T + df_final = df.append(df_sum,ignore_index = True) + return df_final +def q04_mapping(path1,path2): + + a = pd.read_excel(path1) + b = pd.read_csv(path2) + b['United States of America'] = b['United States of America'].astype(str).str.lower() + b['US'] = b['US'].astype(str) + mapping = b.set_index('United States of America').to_dict()['US'] + mapping['mississipi']=mapping.pop('mississippi') + mapping['tenessee']=mapping.pop('tennessee') + new_df = q02_append_row(path1) +# new['abbr'] = np.nan + new_df.insert(loc = 6,column = 'abbr', value = np.nan) + new_df['state'] = new_df['state'].map(mapping) + return new_df +def q05_replace_missing_values(path1,path2): + 'write your solution here' + df_final = q04_mapping(path1,path2) + df_mississipi = df_final[df_final['state'] == 'mississipi'].replace(np.nan, 'MS') + df_tenessee = df_final[df_final['state'] == 'tenessee'].replace(np.nan, 'TN') + df_final.replace(df_final.iloc[6], df_mississipi, inplace=True) + df_final.replace(df_final.iloc[10], df_tenessee, inplace=True) + return df_final + def q06_sub_total(path1,path2): - "write your solution here" + group = q05_replace_missing_values(path1,path2) + df_sub = group[['state', 'Jan', 'Feb', 'Mar', 'total']].groupby('state').sum() + return df_sub + +q06_sub_total(path1,path2) diff --git a/q06_sub_total/tests/__pycache__/__init__.cpython-36.pyc b/q06_sub_total/tests/__pycache__/__init__.cpython-36.pyc index 93ecd56..0142677 100644 Binary files a/q06_sub_total/tests/__pycache__/__init__.cpython-36.pyc and b/q06_sub_total/tests/__pycache__/__init__.cpython-36.pyc differ diff --git a/q06_sub_total/tests/__pycache__/test.cpython-36.pyc b/q06_sub_total/tests/__pycache__/test.cpython-36.pyc index 691280a..59cf383 100644 Binary files a/q06_sub_total/tests/__pycache__/test.cpython-36.pyc and b/q06_sub_total/tests/__pycache__/test.cpython-36.pyc differ diff --git a/scrapeddata.csv b/scrapeddata.csv new file mode 100644 index 0000000..8f8c794 --- /dev/null +++ b/scrapeddata.csv @@ -0,0 +1,78 @@ +,UnitedStatesofAmerica,Federal state,".mw-parser-output .monospaced{font-family:monospace,monospace}USUSA840",US,00,Unnamed: 5,Unnamed: 6,U.S.,U.S..1,U.S.A.,Unnamed: 10,Unnamed: 11,Unnamed: 12,Unnamed: 13,Unnamed: 14 +0,Alabama,State,US-AL,AL,1.0,AL,AL,Ala.,Ala.,,,,,, +1,Alaska,State,US-AK,AK,2.0,AK,AK,Alaska,Alaska,Alas.,,,,, +2,Arizona,State,US-AZ,AZ,4.0,AZ,AZ,Ariz.,Ariz.,Az.,,,,, +3,Arkansas,State,US-AR,AR,5.0,AR,AR,Ark.,Ark.,,,,,, +4,California,State,US-CA,CA,6.0,CA,CF,Calif.,Calif.,"Ca., Cal.",,,,, +5,Colorado,State,US-CO,CO,8.0,CO,CL,Colo.,Colo.,Col.,,,,, +6,Connecticut,State,US-CT,CT,9.0,CT,CT,Conn.,Conn.,Ct.,,,,, +7,Delaware,State,US-DE,DE,10.0,DE,DL,Del.,Del.,De.,,,,, +8,District of Columbia,Federal district,US-DC,DC,11.0,DC,DC,D.C.,D.C.,Wash. D.C.,,,,, +9,Florida,State,US-FL,FL,12.0,FL,FL,Fla.,Fla.,"Fl., Flor.",,,,, +10,Georgia,State,US-GA,GA,13.0,GA,GA,Ga.,Ga.,Geo.,,,,, +11,Hawaii,State,US-HI,HI,15.0,HI,HA,Hawaii,Hawaii,H.I.,,,,, +12,Idaho,State,US-ID,ID,16.0,ID,ID,Idaho,Idaho,"Id., Ida.",,,,, +13,Illinois,State,US-IL,IL,17.0,IL,IL,Ill.,Ill.,"Il., Ills., Ill's",,,,, +14,Indiana,State,US-IN,IN,18.0,IN,IN,Ind.,Ind.,In.,,,,, +15,Iowa,State,US-IA,IA,19.0,IA,IA,Iowa,Iowa,"Ia., Ioa.[1]",,,,, +16,Kansas,State,US-KS,KS,20.0,KS,KA,Kans.,Kan.,"Ks., Ka.",,,,, +17,Kentucky,State (Commonwealth),US-KY,KY,21.0,KY,KY,Ky.,Ky.,"Ken., Kent.",,,,, +18,Louisiana,State,US-LA,LA,22.0,LA,LA,La.,La.,,,,,, +19,Maine,State,US-ME,ME,23.0,ME,ME,Maine,Maine,Me.,,,,, +20,Maryland,State,US-MD,MD,24.0,MD,MD,Md.,Md.,,,,,, +21,Massachusetts,State (Commonwealth),US-MA,MA,25.0,MA,MS,Mass.,Mass.,,,,,, +22,Michigan,State,US-MI,MI,26.0,MI,MC,Mich.,Mich.,,,,,, +23,Minnesota,State,US-MN,MN,27.0,MN,MN,Minn.,Minn.,Mn.,,,,, +24,Mississippi,State,US-MS,MS,28.0,MS,MI,Miss.,Miss.,,,,,, +25,Missouri,State,US-MO,MO,29.0,MO,MO,Mo.,Mo.,,,,,, +26,Montana,State,US-MT,MT,30.0,MT,MT,Mont.,Mont.,,,,,, +27,Nebraska,State,US-NE,NE,31.0,NE,NB,Nebr.,Neb.,,,,,, +28,Nevada,State,US-NV,NV,32.0,NV,NV,Nev.,Nev.,Nv.,,,,, +29,New Hampshire,State,US-NH,NH,33.0,NH,NH,N.H.,N.H.,,,,,, +30,New Jersey,State,US-NJ,NJ,34.0,NJ,NJ,N.J.,N.J.,N.Jersey,,,,, +31,New Mexico,State,US-NM,NM,35.0,NM,NM,N. Mex.,N.M.,New M.,,,,, +32,New York,State,US-NY,NY,36.0,NY,NY,N.Y.,N.Y.,N. York,,,,, +33,North Carolina,State,US-NC,NC,37.0,NC,NC,N.C.,N.C.,N. Car.,,,,, +34,North Dakota,State,US-ND,ND,38.0,ND,ND,N. Dak.,N.D.,NoDak,,,,, +35,Ohio,State,US-OH,OH,39.0,OH,OH,Ohio,Ohio,"O., Oh.",,,,, +36,Oklahoma,State,US-OK,OK,40.0,OK,OK,Okla.,Okla.,Ok.,,,,, +37,Oregon,State,US-OR,OR,41.0,OR,OR,Oreg.,Ore.,Or.,,,,, +38,Pennsylvania,State (Commonwealth),US-PA,PA,42.0,PA,PA,Pa.,Pa.,"Penn., Penna.",,,,, +39,Rhode Island,State,US-RI,RI,44.0,RI,RI,R.I.,R.I.,"R.I. & P.P., R. Isl.",,,,, +40,South Carolina,State,US-SC,SC,45.0,SC,SC,S.C.,S.C.,S. Car.,,,,, +41,South Dakota,State,US-SD,SD,46.0,SD,SD,S. Dak.,S.D.,SoDak,,,,, +42,Tennessee,State,US-TN,TN,47.0,TN,TN,Tenn.,Tenn.,,,,,, +43,Texas,State,US-TX,TX,48.0,TX,TX,Tex.,Texas,Tx.,,,,, +44,Utah,State,US-UT,UT,49.0,UT,UT,Utah,Utah,Ut.,,,,, +45,Vermont,State,US-VT,VT,50.0,VT,VT,Vt.,Vt.,,,,,, +46,Virginia,State (Commonwealth),US-VA,VA,51.0,VA,VA,Va.,Va.,Virg.,,,,, +47,Washington,State,US-WA,WA,53.0,WA,WN,Wash.,Wash.,"Wa., Wn.[2]",,,,, +48,West Virginia,State,US-WV,WV,54.0,WV,WV,W. Va.,W.Va.,"W.V., W. Virg.",,,,, +49,Wisconsin,State,US-WI,WI,55.0,WI,WS,Wis.,Wis.,"Wi., Wisc.",,,,, +50,Wyoming,State,US-WY,WY,56.0,WY,WY,Wyo.,Wyo.,Wy.,,,,, +51,American Samoa,Insular area (Territory),ASASM016US-AS,AS,60.0,AS,AS,A.S.,,,,,,, +52,Guam,Insular area (Territory),GUGUM316US-GU,GU,66.0,GU,GU,Guam,,,,,,, +53,Northern Mariana Islands,Insular area (Commonwealth),MPMNP580US-MP,MP,69.0,MP,CM,M.P.,,CNMI[3],,,,, +54,Puerto Rico,Insular area (Territory),PRPRI630US-PR,PR,72.0,PR,PR,P.R.,,,,,,, +55,U.S. Virgin Islands,Insular area (Territory),VIVIR850US-VI,VI,78.0,VI,VI,V.I.,,U.S.V.I.,,,,, +56,U.S. Minor Outlying Islands,Insular areas,UMUMI581US-UM,UM,74.0,,,,,,,,,, +57,Baker Island,island,UM-81,,81.0,,,,,XB[4],,,,, +58,Howland Island,island,UM-84,,84.0,,,,,XH[4],,,,, +59,Jarvis Island,island,UM-86,,86.0,,,,,XQ[4],,,,, +60,Johnston Atoll,atoll,UM-67,,67.0,,,,,XU[4],,,,, +61,Kingman Reef,atoll,UM-89,,89.0,,,,,XM[4],,,,, +62,Midway Islands,atoll,UM-71,,71.0,,,,,QM[4],,,,, +63,Navassa Island,island,UM-76,,76.0,,,,,XV[4],,,,, +64,Palmyra Atoll[5],atoll[5],UM-95,,95.0,,,,,XL[4],,,,, +65,Wake Island,atoll,UM-79,,79.0,,,,,QW[4],,,,, +66,Micronesia,Freely associated state,FMFSM583,FM,64.0,FM,,,,,,,,, +67,Marshall Islands,Freely associated state,MHMHL584,MH,68.0,MH,,,,,,,,, +68,Palau,Freely associated state,PWPLW585,PW,70.0,PW,,,,,,,,, +69,U.S. Armed Forces – Americas[6],US military mail code,,,,AA,,,,,,,,, +70,U.S. Armed Forces – Europe[7],US military mail code,,,,AE,,,,,,,,, +71,U.S. Armed Forces – Pacific[8],US military mail code,,,,AP,,,,,,,,, +72,Northern Mariana Islands,Obsolete postal code[9],,,,CM,,,,,,,,, +73,Panama Canal Zone,Obsolete postal code,PZPCZ594,,,CZ,,,,,,,,, +74,Nebraska,Obsolete postal code[10],,,,NB,,,,,,,,, +75,Philippine Islands,Obsolete postal code,PHPHL608[11],,,PI,,,,,,,,, +76,Trust Territory of the Pacific Islands,Obsolete postal code,PCPCI582,,,TT,,,,,,,,,