Skip to content

Commit

Permalink
[fill-NA-values][xs] Filling missing values - refs #39
Browse files Browse the repository at this point in the history
  • Loading branch information
gradedSystem committed Nov 21, 2024
1 parent 08b1422 commit 324c43e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 47 deletions.
94 changes: 47 additions & 47 deletions data/code-list.csv
Original file line number Diff line number Diff line change
Expand Up @@ -23736,53 +23736,53 @@ x,GP,PAP,Pointe-à-Pitre,Pointe-a-Pitre,,XX,--3-----,2307,,1614N 06131W,
,MZ,VNX,Vilanculos,Vilanculos,,RQ,---4----,0901,,2200S 03516E,
,MZ,VJB,Xai-Xai,Xai-Xai,G,AI,---4----,0212,,2503S 03339E,
,MZ,ZBZ,Zambezia,Zambezia,P,RQ,--3--6--,1007,,1254S 03942E,
,,AIW,Ai-Ais,Ai-Ais,,AI,---4----,0001,,,
,,ADI,Arandis,Arandis,,AI,---4----,0001,,,
,,VFG,Ariamsvlei,Ariamsvlei,KA,RL,--3-----,1601,,2807S 01949E,
,,ZAR,Aussenkehr,Aussenkehr,,RL,-----6--,0901,,2821S 01723E,
,,BQI,Bagani,Bagani,,AI,---4----,0001,,,
,,GOG,Gobabis,Gobabis,,AI,---4----,0001,,,
,,GFY,Grootfontein,Grootfontein,,AI,---4----,9601,,,
,,HAL,Halali,Halali,,AI,---4----,0001,,,
,,HTN,Henties Bay (Hentiesbaai),Henties Bay (Hentiesbaai),ER,RL,--3-----,1501,,2207S 01417E,
,,KAS,Karasburg,Karasburg,,AI,---45---,9805,,,
,,KRB,Karibib,Karibib,,RL,--3-----,0201,,2156S 01551E,
,,KAT,Katima Mulilo,Katima Mulilo,CA,RL,--3-----,1707,,1730S 02416E,
,,KMP,Keetmanshoop,Keetmanshoop,,AI,---4----,9601,,,
,,LUD,Lüderitz,Luderitz,,AI,1--4----,0212,,2639S 01510E,
,,MTH,Maltahohe,Maltahohe,HA,RQ,-----6--,1001,,2450S 01659E,
,,MAR,Mariental,Mariental,,AI,----5---,9805,,,
,,MQG,Midgard,Midgard,,AI,---4----,0001,,,
,,OKU,Mokuti Lodge,Mokuti Lodge,,AI,---4----,0001,,,
,,MJO,Mount Etjo Lodge,Mount Etjo Lodge,,AI,---4----,0001,,,
,,MPA,Mpacha,Mpacha,,AI,---4----,0001,,,
,,NNI,Namutoni,Namutoni,,AI,---4----,0001,,,
,,WOR,Noordoewer,Noordoewer,KA,AI,--3-5---,0307,,2845S 01737E,
,,OOZ,Okahandja,Okahandja,OD,RL,-----6--,1401,,2159S 01655E,
,,OKF,Okaukuejo,Okaukuejo,,AI,---4----,0001,,,
,,OMA,Omaruru,Omaruru,ER,RL,--3-----,0901,,2126S 01556E,
,,OMG,Omega,Omega,,AI,---4----,0001,,,
,,OND,Ondangwa,Ondangwa,,AI,---4----,0001,,,
,,OGV,Ongava Game Reserve,Ongava Game Reserve,,AI,---4----,0001,,,
,,ONG,Ongwediva,Ongwediva,ON,RL,--3-----,1901,,1746S 01545E,
,,OPW,Opuwa,Opuwa,,AI,---4----,0001,,,
,,OMD,Oranjemund,Oranjemund,,RQ,---4----,9012,,,
,,OHI,Oshakati,Oshakati,,AI,---45---,9805,,,
,,OSH,Oshikango,Oshikango,OW,RL,-----6--,1407,,1724S 01553E,
,,OVO,Oshivelo,Oshivelo,OT,RL,--3-----,1707,,1837S 01710E,
,,OTP,Otavi,Otavi,OD,RL,--3-----,1601,,1939S 01720E,
,,OTJ,Otjiwarongo,Otjiwarongo,,AI,---45---,9805,,,
,,OUT,Outjo,Outjo,KU,RL,--3-----,1901,,2007S 01609E,
,,RUA,Ruacana,Ruacana,KU,RQ,1----6--,1001,,1726S 01421E,
,,NDU,Rundu,Rundu,,AI,---4----,0001,,,
,,SZM,Sesriem,Sesriem,,AI,---4----,0001,,,
,,SWP,Swakopmund,Swakopmund,,AI,---45---,9805,,,
,,TCY,Terrace Bay,Terrace Bay,,AI,---4----,0001,,,
,,TSB,Tsumeb,Tsumeb,,AI,---4----,9601,,,
,,UIS,Uis,Uis,ER,RL,--3-----,1801,,2113S 01451E,
,,WVB,Walvis Bay,Walvis Bay,,QQ,1-------,8103,,,
,,WDH,Windhoek,Windhoek,,AI,---45---,9601,,,
,,ERS,Windhoek Eros Airport,Windhoek Eros Airport,KH,RL,---4----,1607,,2236S 01704E,
,NA,AIW,Ai-Ais,Ai-Ais,,AI,---4----,0001,,,
,NA,ADI,Arandis,Arandis,,AI,---4----,0001,,,
,NA,VFG,Ariamsvlei,Ariamsvlei,KA,RL,--3-----,1601,,2807S 01949E,
,NA,ZAR,Aussenkehr,Aussenkehr,,RL,-----6--,0901,,2821S 01723E,
,NA,BQI,Bagani,Bagani,,AI,---4----,0001,,,
,NA,GOG,Gobabis,Gobabis,,AI,---4----,0001,,,
,NA,GFY,Grootfontein,Grootfontein,,AI,---4----,9601,,,
,NA,HAL,Halali,Halali,,AI,---4----,0001,,,
,NA,HTN,Henties Bay (Hentiesbaai),Henties Bay (Hentiesbaai),ER,RL,--3-----,1501,,2207S 01417E,
,NA,KAS,Karasburg,Karasburg,,AI,---45---,9805,,,
,NA,KRB,Karibib,Karibib,,RL,--3-----,0201,,2156S 01551E,
,NA,KAT,Katima Mulilo,Katima Mulilo,CA,RL,--3-----,1707,,1730S 02416E,
,NA,KMP,Keetmanshoop,Keetmanshoop,,AI,---4----,9601,,,
,NA,LUD,Lüderitz,Luderitz,,AI,1--4----,0212,,2639S 01510E,
,NA,MTH,Maltahohe,Maltahohe,HA,RQ,-----6--,1001,,2450S 01659E,
,NA,MAR,Mariental,Mariental,,AI,----5---,9805,,,
,NA,MQG,Midgard,Midgard,,AI,---4----,0001,,,
,NA,OKU,Mokuti Lodge,Mokuti Lodge,,AI,---4----,0001,,,
,NA,MJO,Mount Etjo Lodge,Mount Etjo Lodge,,AI,---4----,0001,,,
,NA,MPA,Mpacha,Mpacha,,AI,---4----,0001,,,
,NA,NNI,Namutoni,Namutoni,,AI,---4----,0001,,,
,NA,WOR,Noordoewer,Noordoewer,KA,AI,--3-5---,0307,,2845S 01737E,
,NA,OOZ,Okahandja,Okahandja,OD,RL,-----6--,1401,,2159S 01655E,
,NA,OKF,Okaukuejo,Okaukuejo,,AI,---4----,0001,,,
,NA,OMA,Omaruru,Omaruru,ER,RL,--3-----,0901,,2126S 01556E,
,NA,OMG,Omega,Omega,,AI,---4----,0001,,,
,NA,OND,Ondangwa,Ondangwa,,AI,---4----,0001,,,
,NA,OGV,Ongava Game Reserve,Ongava Game Reserve,,AI,---4----,0001,,,
,NA,ONG,Ongwediva,Ongwediva,ON,RL,--3-----,1901,,1746S 01545E,
,NA,OPW,Opuwa,Opuwa,,AI,---4----,0001,,,
,NA,OMD,Oranjemund,Oranjemund,,RQ,---4----,9012,,,
,NA,OHI,Oshakati,Oshakati,,AI,---45---,9805,,,
,NA,OSH,Oshikango,Oshikango,OW,RL,-----6--,1407,,1724S 01553E,
,NA,OVO,Oshivelo,Oshivelo,OT,RL,--3-----,1707,,1837S 01710E,
,NA,OTP,Otavi,Otavi,OD,RL,--3-----,1601,,1939S 01720E,
,NA,OTJ,Otjiwarongo,Otjiwarongo,,AI,---45---,9805,,,
,NA,OUT,Outjo,Outjo,KU,RL,--3-----,1901,,2007S 01609E,
,NA,RUA,Ruacana,Ruacana,KU,RQ,1----6--,1001,,1726S 01421E,
,NA,NDU,Rundu,Rundu,,AI,---4----,0001,,,
,NA,SZM,Sesriem,Sesriem,,AI,---4----,0001,,,
,NA,SWP,Swakopmund,Swakopmund,,AI,---45---,9805,,,
,NA,TCY,Terrace Bay,Terrace Bay,,AI,---4----,0001,,,
,NA,TSB,Tsumeb,Tsumeb,,AI,---4----,9601,,,
,NA,UIS,Uis,Uis,ER,RL,--3-----,1801,,2113S 01451E,
,NA,WVB,Walvis Bay,Walvis Bay,,QQ,1-------,8103,,,
,NA,WDH,Windhoek,Windhoek,,AI,---45---,9601,,,
,NA,ERS,Windhoek Eros Airport,Windhoek Eros Airport,KH,RL,---4----,1607,,2236S 01704E,
,NC,BDB,Baie de Prony,Baie de Prony,,RL,--3-----,0212,,2222S 16652E,
,NC,BMY,Bélep I.,Belep I.,,AI,---4----,1901,,1943S 16340E,
,NC,4NB,Bourail,Bourail,,RL,-----6--,1901,,2134S 16529E,
Expand Down
1 change: 1 addition & 0 deletions scripts/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def process(extracted_files):
codelist_df = codelist_df.reindex(columns=['Change', 'Country', 'Location', 'Name', 'NameWoDiacritics', 'Subdivision',
'Status', 'Function', 'Date', 'IATA', 'Coordinates', 'Remarks'])
# Keep only rows where 'Country' values are empty, 1 character, or exactly 2 characters
codelist_df['Country'] = codelist_df['Country'].fillna('NA')
codelist_df = codelist_df[codelist_df['Country'].str.len().fillna(0).between(0, 2)]
codelist_df = correct_swapped_function_status(codelist_df)
codelist_df = clean_extra_rows(codelist_df)
Expand Down

0 comments on commit 324c43e

Please sign in to comment.