diff --git a/location/International/Atlas/clean.py b/location/International/Atlas/clean.py index 756e41e..0015c32 100644 --- a/location/International/Atlas/clean.py +++ b/location/International/Atlas/clean.py @@ -74,6 +74,12 @@ def get_wdi_data(): services, left_on="code", right_index=True, how="left" ) + former = pd.read_csv("./in/former_countries.csv", index_col="code") + former = former.astype(float) + parent_id_table = parent_id_table.merge( + former, left_on="code", right_index=True, how="left" + ) + # Services flags should be False in case of regions, per Huy's request parent_id_table.loc[parent_id_table.level == "region", "reported_serv"] = 0 parent_id_table.loc[parent_id_table.level == "region", "reported_serv_recent"] = 0 diff --git a/location/International/Atlas/in/former_countries.csv b/location/International/Atlas/in/former_countries.csv new file mode 100644 index 0000000..60dbdec --- /dev/null +++ b/location/International/Atlas/in/former_countries.csv @@ -0,0 +1,252 @@ +code,former_country +ABW,FALSE +AFG,FALSE +AGO,FALSE +AIA,FALSE +ALB,FALSE +AND,FALSE +ANT,FALSE +ARE,FALSE +ARG,FALSE +ARM,FALSE +ASM,FALSE +ATA,FALSE +ATF,FALSE +ATG,FALSE +AUS,FALSE +AUT,FALSE +AZE,FALSE +BDI,FALSE +BEL,FALSE +BEN,FALSE +BES,FALSE +BFA,FALSE +BGD,FALSE +BGR,FALSE +BHR,FALSE +BHS,FALSE +BIH,FALSE +BLM,FALSE +BLR,FALSE +BLZ,FALSE +BMU,FALSE +BOL,FALSE +BRA,FALSE +BRB,FALSE +BRN,FALSE +BTN,FALSE +BVT,FALSE +BWA,FALSE +CAF,FALSE +CAN,FALSE +CCK,FALSE +CHE,FALSE +CHL,FALSE +CHN,FALSE +CIV,FALSE +CMR,FALSE +COD,FALSE +COG,FALSE +COK,FALSE +COL,FALSE +COM,FALSE +CPV,FALSE +CRI,FALSE +CSK,FALSE +CUB,FALSE +CUW,FALSE +CXR,FALSE +CYM,FALSE +CYP,FALSE +CZE,FALSE +DDR,TRUE +DEU,FALSE +DJI,FALSE +DMA,FALSE +DNK,FALSE +DOM,FALSE +DZA,FALSE +ECU,FALSE +EGY,FALSE +ERI,FALSE +ESH,FALSE +ESP,FALSE +EST,FALSE +ETH,FALSE +FIN,FALSE +FJI,FALSE +FLK,FALSE +FRA,FALSE +FRO,FALSE +FSM,FALSE +GAB,FALSE +GBR,FALSE +GEO,FALSE +GHA,FALSE +GIB,FALSE +GIN,FALSE +GLP,FALSE +GMB,FALSE +GNB,FALSE +GNQ,FALSE +GRC,FALSE +GRD,FALSE +GRL,FALSE +GTM,FALSE +GUF,FALSE +GUM,FALSE +GUY,FALSE +HKG,FALSE +HMD,FALSE +HND,FALSE +HRV,FALSE +HTI,FALSE +HUN,FALSE +IDN,FALSE +IND,FALSE +IOT,FALSE +IRL,FALSE +IRN,FALSE +IRQ,FALSE +ISL,FALSE +ISR,FALSE +ITA,FALSE +JAM,FALSE +JOR,FALSE +JPN,FALSE +KAZ,FALSE +KEN,FALSE +KGZ,FALSE +KHM,FALSE +KIR,FALSE +KNA,FALSE +KOR,FALSE +KWT,FALSE +LAO,FALSE +LBN,FALSE +LBR,FALSE +LBY,FALSE +LCA,FALSE +LKA,FALSE +LSO,FALSE +LTU,FALSE +LUX,FALSE +LVA,FALSE +MAC,FALSE +MAR,FALSE +MDA,FALSE +MDG,FALSE +MDV,FALSE +MEX,FALSE +MHL,FALSE +MKD,FALSE +MLI,FALSE +MLT,FALSE +MMR,FALSE +MNE,FALSE +MNG,FALSE +MNP,FALSE +MOZ,FALSE +MRT,FALSE +MSR,FALSE +MTQ,FALSE +MUS,FALSE +MWI,FALSE +MYS,FALSE +MYT,FALSE +NAM,FALSE +NCL,FALSE +NER,FALSE +NFK,FALSE +NGA,FALSE +NIC,FALSE +NIU,FALSE +NLD,FALSE +NOR,FALSE +NPL,FALSE +NRU,FALSE +NZL,FALSE +OMN,FALSE +PAK,FALSE +PAN,FALSE +PCI,TRUE +PCN,FALSE +PCZ,FALSE +PER,FALSE +PHL,FALSE +PLW,FALSE +PNG,FALSE +POL,FALSE +PRK,FALSE +PRT,FALSE +PRY,FALSE +PSE,FALSE +PYF,FALSE +QAT,FALSE +REU,FALSE +ROU,FALSE +RUS,FALSE +RWA,FALSE +SAU,FALSE +SCG,FALSE +SDN,FALSE +SEN,FALSE +SGP,FALSE +SGS,FALSE +SHN,FALSE +SLB,FALSE +SLE,FALSE +SLV,FALSE +SMR,FALSE +SOM,FALSE +SPM,FALSE +SRB,FALSE +SSD,FALSE +STP,FALSE +SUN,TRUE +SUR,FALSE +SVK,FALSE +SVN,FALSE +SWE,FALSE +SWZ,FALSE +SXM,FALSE +SYC,FALSE +SYR,FALSE +TCA,FALSE +TCD,FALSE +TGO,FALSE +THA,FALSE +TJK,FALSE +TKL,FALSE +TKM,FALSE +TLS,FALSE +TON,FALSE +TTO,FALSE +TUN,FALSE +TUR,FALSE +TUV,FALSE +TZA,FALSE +UGA,FALSE +UKR,FALSE +UMI,FALSE +URY,FALSE +USA,FALSE +UZB,FALSE +VAT,FALSE +VCT,FALSE +VDR,TRUE +VEN,FALSE +VGB,FALSE +VIR,FALSE +VNM,FALSE +VUT,FALSE +WLF,FALSE +WSM,FALSE +YEM,FALSE +YMD,TRUE +YUG,FALSE +ZAF,FALSE +ZMB,FALSE +ZWE,FALSE +TWN,FALSE +ANS,FALSE diff --git a/setup.py b/setup.py index 184642d..fa9b824 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="linnaeus", - version="v113", + version="v115", author="Mali Akmanalp ", description=("Harvard CID's classification tools."), url="http://github.com/cid-harvard/classifications/",