From d0068b0ce0ba53f4fa63705d2534c864fb3f3136 Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Wed, 25 Sep 2019 15:39:02 +0200 Subject: [PATCH 1/8] WIP update target info --- clusters/target-information.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/clusters/target-information.json b/clusters/target-information.json index 67cdb0a..4f162a1 100644 --- a/clusters/target-information.json +++ b/clusters/target-information.json @@ -4835,10 +4835,36 @@ "calling-code": [ "+264" ], + "capital": [ + "Windhoek" + ], + "currency": [ + "Namibian dollar", + "NAD", + "South African rand", + "ZAR" + ], "iso-code": [ "NA", "NAM" ], + "official-languages": [ + "English" + ], + "synomyms": [ + "Republic of Namibia", + "Republiek van Namibië", + "Republik Namibia", + "Namibiab Republiki dib", + "Republika yaNamibia", + "Orepublika yaNamibia", + "Republika zaNamibia", + "Rephaboliki ya Namibia", + "Namibia ye Lukuluhile" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".na" }, "uuid": "964471d5-e84a-486c-94e2-95107b59de61", From c3056402905bb4417f6cd9a3c082016f44db3c86 Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Thu, 26 Sep 2019 13:01:41 +0200 Subject: [PATCH 2/8] new galaxy - Region based on UN M49 --- clusters/region.json | 541 +++++++++++++++++++++++++++++++++++++++++++ galaxies/region.json | 9 + 2 files changed, 550 insertions(+) create mode 100644 clusters/region.json create mode 100644 galaxies/region.json diff --git a/clusters/region.json b/clusters/region.json new file mode 100644 index 0000000..7e31005 --- /dev/null +++ b/clusters/region.json @@ -0,0 +1,541 @@ +{ + "authors": [ + "Unknown" + ], + "category": "location", + "description": "Regions based on UN M49.", + "name": "Regions UN M49", + "source": "https://unstats.un.org/unsd/methodology/m49/overview/", + "type": "region", + "uuid": "eea087b6-e02f-11e9-89c1-cf406e0267ec", + "values": [ + { + "meta": { + "subregion": [ + "002 - Africa", + "019 - Americas", + "142 - Asia", + "150 - Europe", + "009 - Oceania", + "010 - Antarctica" + ] + }, + "uuid": "8d87018b-e8bb-472e-841b-4429fb6b9bc0", + "value": "001 - World" + }, + { + "meta": { + "subregion": [ + "015 - Northern Africa", + "202 - Sub-Saharan Africa" + ] + }, + "uuid": "48fc57a4-3a9f-42dd-8e2b-83488d08a1be", + "value": "002 - Africa" + }, + { + "meta": { + "subregion": [ + "419 - Latin America and the Caribbean", + "021 - Northern America" + ] + }, + "uuid": "a6427c40-6fba-46dc-9995-72e16a4c57a7", + "value": "019 - Americas" + }, + { + "meta": { + "subregion": [ + "143 - Central Asia", + "030 - Eastern Asia", + "035 - South-eastern Asia", + "034 - Southern Asia", + "145 - Western Asia" + ] + }, + "uuid": "4b09b683-5650-4a6c-a383-d8f3b686ebc2", + "value": "142 - Asia" + }, + { + "meta": { + "subregion": [ + "151 - Eastern Europe", + "154 - Northern Europe", + "039 - Southern Europe", + "155 - Western Europe" + ] + }, + "uuid": "739c285c-fe59-4540-b323-bf713af30347", + "value": "150 - Europe" + }, + { + "meta": { + "subregion": [ + "053 - Australia and New Zealand", + "054 - Melanesia", + "057 - Micronesia", + "061 - Polynesia" + ] + }, + "uuid": "d9e8c021-b387-4d67-8b8e-5e5ae57e6647", + "value": "009 - Oceania" + }, + { + "meta": { + "subregion": [ + "012 - Algeria", + "818 - Egypt", + "434 - Libya", + "504 - Morocco", + "729 - Sudan", + "788 - Tunisia", + "732 - Western Sahara" + ] + }, + "uuid": "4a65b439-849b-4fdd-b34d-e80f738a4309", + "value": "015 - Northern Africa" + }, + { + "meta": { + "subregion": [ + "014 - Eastern Africa", + "017 - Middle Africa", + "018 - Southern Africa", + "011 - Western Africa" + ] + }, + "uuid": "130997e8-c900-4457-829a-447eec3fbb89", + "value": "202 - Sub-Saharan Africa" + }, + { + "meta": { + "subregion": [ + "029 - Caribbean", + "013 - Central America", + "005 - South America" + ] + }, + "uuid": "aef21eb1-eccd-46e1-a4c8-9e9b8452d912", + "value": "419 - Latin America and the Caribbean" + }, + { + "meta": { + "subregion": [ + "060 - Bermuda", + "124 - Canada", + "304 - Greenland", + "666 - Saint Pierre and Miquelon", + "840 - United States of America" + ] + }, + "uuid": "64974dea-c6c9-462d-9fcf-4456a397d591", + "value": "021 - Northern America" + }, + { + "meta": { + "subregion": [ + "398 - Kazakhstan", + "417 - Kyrgyzstan", + "762 - Tajikistan", + "795 - Turkmenistan", + "860 - Uzbekistan" + ] + }, + "uuid": "a5515b7c-594b-4e37-a60f-3bab8808c54c", + "value": "143 - Central Asia" + }, + { + "meta": { + "subregion": [ + "156 - China", + "344 - China, Hong Kong Special Administrative Region", + "446 - China, Macao Special Administrative Region", + "408 - Democratic People's Republic of Korea", + "392 - Japan", + "496 - Mongolia", + "410 - Republic of Korea" + ] + }, + "uuid": "aa46fbd1-54df-4e1e-a5d6-7bced5c59803", + "value": "030 - Eastern Asia" + }, + { + "meta": { + "subregion": [ + "096 - Brunei Darussalam", + "116 - Cambodia", + "360 - Indonesia", + "418 - Lao People's Democratic Republic", + "458 - Malaysia", + "104 - Myanmar", + "608 - Philippines", + "702 - Singapore", + "764 - Thailand", + "626 - Timor-Leste", + "704 - Viet Nam" + ] + }, + "uuid": "990d0e8e-dfd0-45d1-ab8b-758b9139c0fe", + "value": "035 - South-eastern Asia" + }, + { + "meta": { + "subregion": [ + "004 - Afghanistan", + "050 - Bangladesh", + "064 - Bhutan", + "356 - India", + "364 - Iran (Islamic Republic of)", + "462 - Maldives", + "524 - Nepal", + "586 - Pakistan", + "144 - Sri Lanka" + ] + }, + "uuid": "f86776cd-274f-438a-8beb-9349aebda0bb", + "value": "034 - Southern Asia" + }, + { + "meta": { + "subregion": [ + "051 - Armenia", + "031 - Azerbaijan", + "048 - Bahrain", + "196 - Cyprus", + "268 - Georgia", + "368 - Iraq", + "376 - Israel", + "400 - Jordan", + "414 - Kuwait", + "422 - Lebanon", + "512 - Oman", + "634 - Qatar", + "682 - Saudi Arabia", + "275 - State of Palestine", + "760 - Syrian Arab Republic", + "792 - Turkey", + "784 - United Arab Emirates", + "887 - Yemen" + ] + }, + "uuid": "d66b2e98-39fb-4710-b075-5bee2fa00cd4", + "value": "145 - Western Asia" + }, + { + "meta": { + "subregion": [ + "112 - Belarus", + "100 - Bulgaria", + "203 - Czechia", + "348 - Hungary", + "616 - Poland", + "498 - Republic of Moldova", + "642 - Romania", + "643 - Russian Federation", + "703 - Slovakia", + "804 - Ukraine" + ] + }, + "uuid": "c7cb0859-5680-4bdb-9c78-46cab3504a62", + "value": "151 - Eastern Europe" + }, + { + "meta": { + "subregion": [ + "830 - Channel Islands", + "248 - Åland Islands", + "208 - Denmark", + "233 - Estonia", + "234 - Faroe Islands", + "246 - Finland", + "352 - Iceland", + "372 - Ireland", + "833 - Isle of Man", + "428 - Latvia", + "440 - Lithuania", + "578 - Norway", + "744 - Svalbard and Jan Mayen Islands", + "752 - Sweden", + "826 - United Kingdom of Great Britain and Northern Ireland" + ] + }, + "uuid": "f93cb275-0366-4ecc-abf0-a17928d1e177", + "value": "154 - Northern Europe" + }, + { + "meta": { + "subregion": [ + "008 - Albania", + "020 - Andorra", + "070 - Bosnia and Herzegovina", + "191 - Croatia", + "292 - Gibraltar", + "300 - Greece", + "336 - Holy See", + "380 - Italy", + "470 - Malta", + "499 - Montenegro", + "807 - North Macedonia", + "620 - Portugal", + "674 - San Marino", + "688 - Serbia", + "705 - Slovenia", + "724 - Spain" + ] + }, + "uuid": "63880bb3-f959-4200-b8ae-e25d9fa84c22", + "value": "039 - Southern Europe" + }, + { + "meta": { + "subregion": [ + "040 - Austria", + "056 - Belgium", + "250 - France", + "276 - Germany", + "438 - Liechtenstein", + "442 - Luxembourg", + "492 - Monaco", + "528 - Netherlands", + "756 - Switzerland" + ] + }, + "uuid": "7048c324-c9c2-4c53-a42a-912e78f3aeec", + "value": "155 - Western Europe" + }, + { + "meta": { + "subregion": [ + "036 - Australia", + "162 - Christmas Island", + "166 - Cocos (Keeling) Islands", + "334 - Heard Island and McDonald Islands", + "554 - New Zealand", + "574 - Norfolk Island" + ] + }, + "uuid": "93dd8987-1466-493f-b5dc-c2b7fe762d75", + "value": "053 - Australia and New Zealand" + }, + { + "meta": { + "subregion": [ + "242 - Fiji", + "540 - New Caledonia", + "598 - Papua New Guinea", + "090 - Solomon Islands", + "548 - Vanuatu" + ] + }, + "uuid": "4cb4b767-2db4-4858-bb28-656816350fef", + "value": "054 - Melanesia" + }, + { + "meta": { + "subregion": [ + "316 - Guam", + "296 - Kiribati", + "584 - Marshall Islands", + "583 - Micronesia (Federated States of)", + "520 - Nauru", + "580 - Northern Mariana Islands", + "585 - Palau", + "581 - United States Minor Outlying Islands" + ] + }, + "uuid": "fbe052e0-a4ab-4d74-8765-5a9786e7bdbc", + "value": "057 - Micronesia" + }, + { + "meta": { + "subregion": [ + "016 - American Samoa", + "184 - Cook Islands", + "258 - French Polynesia", + "570 - Niue", + "612 - Pitcairn", + "882 - Samoa", + "772 - Tokelau", + "776 - Tonga", + "798 - Tuvalu", + "876 - Wallis and Futuna Islands" + ] + }, + "uuid": "a387db42-cdb4-4f75-98c4-5b51a03d0c68", + "value": "061 - Polynesia" + }, + { + "meta": { + "subregion": [ + "086 - British Indian Ocean Territory", + "108 - Burundi", + "174 - Comoros", + "262 - Djibouti", + "232 - Eritrea", + "231 - Ethiopia", + "260 - French Southern Territories", + "404 - Kenya", + "450 - Madagascar", + "454 - Malawi", + "480 - Mauritius", + "175 - Mayotte", + "508 - Mozambique", + "638 - Réunion", + "646 - Rwanda", + "690 - Seychelles", + "706 - Somalia", + "728 - South Sudan", + "800 - Uganda", + "834 - United Republic of Tanzania", + "894 - Zambia", + "716 - Zimbabwe" + ] + }, + "uuid": "9b15e8e9-2adb-4aa8-baea-d63ccc434428", + "value": "014 - Eastern Africa" + }, + { + "meta": { + "subregion": [ + "024 - Angola", + "120 - Cameroon", + "140 - Central African Republic", + "148 - Chad", + "178 - Congo", + "180 - Democratic Republic of the Congo", + "226 - Equatorial Guinea", + "266 - Gabon", + "678 - Sao Tome and Principe" + ] + }, + "uuid": "1a79ac27-1580-4482-826e-d4db9a26b080", + "value": "017 - Middle Africa" + }, + { + "meta": { + "subregion": [ + "072 - Botswana", + "748 - Eswatini", + "426 - Lesotho", + "516 - Namibia", + "710 - South Africa" + ] + }, + "uuid": "b95340de-8f29-4dbf-ad0f-a4c0be367e59", + "value": "018 - Southern Africa" + }, + { + "meta": { + "subregion": [ + "204 - Benin", + "854 - Burkina Faso", + "132 - Cabo Verde", + "384 - Côte d’Ivoire", + "270 - Gambia", + "288 - Ghana", + "324 - Guinea", + "624 - Guinea-Bissau", + "430 - Liberia", + "466 - Mali", + "478 - Mauritania", + "562 - Niger", + "566 - Nigeria", + "654 - Saint Helena", + "686 - Senegal", + "694 - Sierra Leone", + "768 - Togo" + ] + }, + "uuid": "d44cf4b4-8025-4827-960c-b666dfdc5243", + "value": "011 - Western Africa" + }, + { + "meta": { + "subregion": [ + "660 - Anguilla", + "028 - Antigua and Barbuda", + "533 - Aruba", + "044 - Bahamas", + "052 - Barbados", + "535 - Bonaire, Sint Eustatius and Saba", + "092 - British Virgin Islands", + "136 - Cayman Islands", + "192 - Cuba", + "531 - Curaçao", + "212 - Dominica", + "214 - Dominican Republic", + "308 - Grenada", + "312 - Guadeloupe", + "332 - Haiti", + "388 - Jamaica", + "474 - Martinique", + "500 - Montserrat", + "630 - Puerto Rico", + "652 - Saint Barthélemy", + "659 - Saint Kitts and Nevis", + "662 - Saint Lucia", + "663 - Saint Martin (French Part)", + "670 - Saint Vincent and the Grenadines", + "534 - Sint Maarten (Dutch part)", + "780 - Trinidad and Tobago", + "796 - Turks and Caicos Islands", + "850 - United States Virgin Islands" + ] + }, + "uuid": "e16efc93-ae3b-471a-a888-eda66d1da22b", + "value": "029 - Caribbean" + }, + { + "meta": { + "subregion": [ + "084 - Belize", + "188 - Costa Rica", + "222 - El Salvador", + "320 - Guatemala", + "340 - Honduras", + "484 - Mexico", + "558 - Nicaragua", + "591 - Panama" + ] + }, + "uuid": "105247d9-e619-4231-b88e-17dd9aed1580", + "value": "013 - Central America" + }, + { + "meta": { + "subregion": [ + "032 - Argentina", + "068 - Bolivia (Plurinational State of)", + "074 - Bouvet Island", + "076 - Brazil", + "152 - Chile", + "170 - Colombia", + "218 - Ecuador", + "238 - Falkland Islands (Malvinas)", + "254 - French Guiana", + "328 - Guyana", + "600 - Paraguay", + "604 - Peru", + "239 - South Georgia and the South Sandwich Islands", + "740 - Suriname", + "858 - Uruguay", + "862 - Venezuela (Bolivarian Republic of)" + ] + }, + "uuid": "e9ee6728-d325-4726-be7d-08b5ccf3f3d6", + "value": "005 - South America" + }, + { + "meta": { + "subregion": [ + "831 - Guernsey", + "832 - Jersey", + "680 - Sark" + ] + }, + "uuid": "76adc9e0-215a-4496-8642-b98ac7715d0f", + "value": "830 - Channel Islands" + } + ], + "version": 1 +} diff --git a/galaxies/region.json b/galaxies/region.json new file mode 100644 index 0000000..111faee --- /dev/null +++ b/galaxies/region.json @@ -0,0 +1,9 @@ +{ + "description": "Regions based on UN M49.", + "icon": "globe-europe", + "name": "Regions UN M49", + "namespace": "misp", + "type": "regions", + "uuid": "d151a79a-e029-11e9-9409-f3e0cf3d93aa", + "version": 1 +} From 1ea212612a8f36b3ea799876fd59473c71b641f3 Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Thu, 26 Sep 2019 13:27:31 +0200 Subject: [PATCH 3/8] add script used to create region galaxy (Not optimised or anything) --- tools/UN M49/UNSD.csv | 250 ++++++++++++++++++++++++++++++++++ tools/UN M49/region_galaxy.py | 186 +++++++++++++++++++++++++ 2 files changed, 436 insertions(+) create mode 100644 tools/UN M49/UNSD.csv create mode 100644 tools/UN M49/region_galaxy.py diff --git a/tools/UN M49/UNSD.csv b/tools/UN M49/UNSD.csv new file mode 100644 index 0000000..254f0fb --- /dev/null +++ b/tools/UN M49/UNSD.csv @@ -0,0 +1,250 @@ +Global Code,Global Name,Region Code,Region Name,Sub-region Code,Sub-region Name,Intermediate Region Code,Intermediate Region Name,M49 Code,Country or Area,ISO-alpha3 Code,Least Developed Countries (LDC),Land Locked Developing Countries (LLDC),Small Island Developing States (SIDS),Developed / Developing Countries +001,World,002,Africa,015,Northern Africa,,,012,Algeria,DZA,,,,Developing +001,World,002,Africa,015,Northern Africa,,,818,Egypt,EGY,,,,Developing +001,World,002,Africa,015,Northern Africa,,,434,Libya,LBY,,,,Developing +001,World,002,Africa,015,Northern Africa,,,504,Morocco,MAR,,,,Developing +001,World,002,Africa,015,Northern Africa,,,729,Sudan,SDN,x,,,Developing +001,World,002,Africa,015,Northern Africa,,,788,Tunisia,TUN,,,,Developing +001,World,002,Africa,015,Northern Africa,,,732,Western Sahara,ESH,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,086,British Indian Ocean Territory,IOT,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,108,Burundi,BDI,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,174,Comoros,COM,x,,x,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,262,Djibouti,DJI,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,232,Eritrea,ERI,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,231,Ethiopia,ETH,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,260,French Southern Territories,ATF,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,404,Kenya,KEN,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,450,Madagascar,MDG,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,454,Malawi,MWI,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,480,Mauritius,MUS,,,x,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,175,Mayotte,MYT,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,508,Mozambique,MOZ,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,638,Réunion,REU,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,646,Rwanda,RWA,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,690,Seychelles,SYC,,,x,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,706,Somalia,SOM,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,728,South Sudan,SSD,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,800,Uganda,UGA,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,834,United Republic of Tanzania,TZA,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,894,Zambia,ZMB,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,014,Eastern Africa,716,Zimbabwe,ZWE,,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,024,Angola,AGO,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,120,Cameroon,CMR,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,140,Central African Republic,CAF,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,148,Chad,TCD,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,178,Congo,COG,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,180,Democratic Republic of the Congo,COD,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,226,Equatorial Guinea,GNQ,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,266,Gabon,GAB,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,017,Middle Africa,678,Sao Tome and Principe,STP,x,,x,Developing +001,World,002,Africa,202,Sub-Saharan Africa,018,Southern Africa,072,Botswana,BWA,,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,018,Southern Africa,748,Eswatini,SWZ,,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,018,Southern Africa,426,Lesotho,LSO,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,018,Southern Africa,516,Namibia,NAM,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,018,Southern Africa,710,South Africa,ZAF,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,204,Benin,BEN,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,854,Burkina Faso,BFA,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,132,Cabo Verde,CPV,,,x,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,384,Côte d’Ivoire,CIV,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,270,Gambia,GMB,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,288,Ghana,GHA,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,324,Guinea,GIN,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,624,Guinea-Bissau,GNB,x,,x,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,430,Liberia,LBR,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,466,Mali,MLI,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,478,Mauritania,MRT,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,562,Niger,NER,x,x,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,566,Nigeria,NGA,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,654,Saint Helena,SHN,,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,686,Senegal,SEN,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,694,Sierra Leone,SLE,x,,,Developing +001,World,002,Africa,202,Sub-Saharan Africa,011,Western Africa,768,Togo,TGO,x,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,660,Anguilla,AIA,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,028,Antigua and Barbuda,ATG,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,533,Aruba,ABW,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,044,Bahamas,BHS,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,052,Barbados,BRB,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,535,"Bonaire, Sint Eustatius and Saba",BES,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,092,British Virgin Islands,VGB,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,136,Cayman Islands,CYM,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,192,Cuba,CUB,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,531,Curaçao,CUW,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,212,Dominica,DMA,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,214,Dominican Republic,DOM,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,308,Grenada,GRD,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,312,Guadeloupe,GLP,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,332,Haiti,HTI,x,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,388,Jamaica,JAM,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,474,Martinique,MTQ,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,500,Montserrat,MSR,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,630,Puerto Rico,PRI,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,652,Saint Barthélemy,BLM,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,659,Saint Kitts and Nevis,KNA,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,662,Saint Lucia,LCA,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,663,Saint Martin (French Part),MAF,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,670,Saint Vincent and the Grenadines,VCT,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,534,Sint Maarten (Dutch part),SXM,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,780,Trinidad and Tobago,TTO,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,796,Turks and Caicos Islands,TCA,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,029,Caribbean,850,United States Virgin Islands,VIR,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,013,Central America,084,Belize,BLZ,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,013,Central America,188,Costa Rica,CRI,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,013,Central America,222,El Salvador,SLV,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,013,Central America,320,Guatemala,GTM,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,013,Central America,340,Honduras,HND,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,013,Central America,484,Mexico,MEX,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,013,Central America,558,Nicaragua,NIC,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,013,Central America,591,Panama,PAN,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,032,Argentina,ARG,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,068,Bolivia (Plurinational State of),BOL,,x,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,074,Bouvet Island,BVT,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,076,Brazil,BRA,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,152,Chile,CHL,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,170,Colombia,COL,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,218,Ecuador,ECU,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,238,Falkland Islands (Malvinas),FLK,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,254,French Guiana,GUF,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,328,Guyana,GUY,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,600,Paraguay,PRY,,x,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,604,Peru,PER,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,239,South Georgia and the South Sandwich Islands,SGS,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,740,Suriname,SUR,,,x,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,858,Uruguay,URY,,,,Developing +001,World,019,Americas,419,Latin America and the Caribbean,005,South America,862,Venezuela (Bolivarian Republic of),VEN,,,,Developing +001,World,019,Americas,021,Northern America,,,060,Bermuda,BMU,,,,Developed +001,World,019,Americas,021,Northern America,,,124,Canada,CAN,,,,Developed +001,World,019,Americas,021,Northern America,,,304,Greenland,GRL,,,,Developed +001,World,019,Americas,021,Northern America,,,666,Saint Pierre and Miquelon,SPM,,,,Developed +001,World,019,Americas,021,Northern America,,,840,United States of America,USA,,,,Developed +001,World,,,,,,,010,Antarctica,ATA,,,, +001,World,142,Asia,143,Central Asia,,,398,Kazakhstan,KAZ,,x,,Developing +001,World,142,Asia,143,Central Asia,,,417,Kyrgyzstan,KGZ,,x,,Developing +001,World,142,Asia,143,Central Asia,,,762,Tajikistan,TJK,,x,,Developing +001,World,142,Asia,143,Central Asia,,,795,Turkmenistan,TKM,,x,,Developing +001,World,142,Asia,143,Central Asia,,,860,Uzbekistan,UZB,,x,,Developing +001,World,142,Asia,030,Eastern Asia,,,156,China,CHN,,,,Developing +001,World,142,Asia,030,Eastern Asia,,,344,"China, Hong Kong Special Administrative Region",HKG,,,,Developing +001,World,142,Asia,030,Eastern Asia,,,446,"China, Macao Special Administrative Region",MAC,,,,Developing +001,World,142,Asia,030,Eastern Asia,,,408,Democratic People's Republic of Korea,PRK,,,,Developing +001,World,142,Asia,030,Eastern Asia,,,392,Japan,JPN,,,,Developed +001,World,142,Asia,030,Eastern Asia,,,496,Mongolia,MNG,,x,,Developing +001,World,142,Asia,030,Eastern Asia,,,410,Republic of Korea,KOR,,,,Developing +001,World,142,Asia,035,South-eastern Asia,,,096,Brunei Darussalam,BRN,,,,Developing +001,World,142,Asia,035,South-eastern Asia,,,116,Cambodia,KHM,x,,,Developing +001,World,142,Asia,035,South-eastern Asia,,,360,Indonesia,IDN,,,,Developing +001,World,142,Asia,035,South-eastern Asia,,,418,Lao People's Democratic Republic,LAO,x,x,,Developing +001,World,142,Asia,035,South-eastern Asia,,,458,Malaysia,MYS,,,,Developing +001,World,142,Asia,035,South-eastern Asia,,,104,Myanmar,MMR,x,,,Developing +001,World,142,Asia,035,South-eastern Asia,,,608,Philippines,PHL,,,,Developing +001,World,142,Asia,035,South-eastern Asia,,,702,Singapore,SGP,,,x,Developing +001,World,142,Asia,035,South-eastern Asia,,,764,Thailand,THA,,,,Developing +001,World,142,Asia,035,South-eastern Asia,,,626,Timor-Leste,TLS,x,,x,Developing +001,World,142,Asia,035,South-eastern Asia,,,704,Viet Nam,VNM,,,,Developing +001,World,142,Asia,034,Southern Asia,,,004,Afghanistan,AFG,x,x,,Developing +001,World,142,Asia,034,Southern Asia,,,050,Bangladesh,BGD,x,,,Developing +001,World,142,Asia,034,Southern Asia,,,064,Bhutan,BTN,x,x,,Developing +001,World,142,Asia,034,Southern Asia,,,356,India,IND,,,,Developing +001,World,142,Asia,034,Southern Asia,,,364,Iran (Islamic Republic of),IRN,,,,Developing +001,World,142,Asia,034,Southern Asia,,,462,Maldives,MDV,,,x,Developing +001,World,142,Asia,034,Southern Asia,,,524,Nepal,NPL,x,x,,Developing +001,World,142,Asia,034,Southern Asia,,,586,Pakistan,PAK,,,,Developing +001,World,142,Asia,034,Southern Asia,,,144,Sri Lanka,LKA,,,,Developing +001,World,142,Asia,145,Western Asia,,,051,Armenia,ARM,,x,,Developing +001,World,142,Asia,145,Western Asia,,,031,Azerbaijan,AZE,,x,,Developing +001,World,142,Asia,145,Western Asia,,,048,Bahrain,BHR,,,,Developing +001,World,142,Asia,145,Western Asia,,,196,Cyprus,CYP,,,,Developed +001,World,142,Asia,145,Western Asia,,,268,Georgia,GEO,,,,Developing +001,World,142,Asia,145,Western Asia,,,368,Iraq,IRQ,,,,Developing +001,World,142,Asia,145,Western Asia,,,376,Israel,ISR,,,,Developed +001,World,142,Asia,145,Western Asia,,,400,Jordan,JOR,,,,Developing +001,World,142,Asia,145,Western Asia,,,414,Kuwait,KWT,,,,Developing +001,World,142,Asia,145,Western Asia,,,422,Lebanon,LBN,,,,Developing +001,World,142,Asia,145,Western Asia,,,512,Oman,OMN,,,,Developing +001,World,142,Asia,145,Western Asia,,,634,Qatar,QAT,,,,Developing +001,World,142,Asia,145,Western Asia,,,682,Saudi Arabia,SAU,,,,Developing +001,World,142,Asia,145,Western Asia,,,275,State of Palestine,PSE,,,,Developing +001,World,142,Asia,145,Western Asia,,,760,Syrian Arab Republic,SYR,,,,Developing +001,World,142,Asia,145,Western Asia,,,792,Turkey,TUR,,,,Developing +001,World,142,Asia,145,Western Asia,,,784,United Arab Emirates,ARE,,,,Developing +001,World,142,Asia,145,Western Asia,,,887,Yemen,YEM,x,,,Developing +001,World,150,Europe,151,Eastern Europe,,,112,Belarus,BLR,,,,Developed +001,World,150,Europe,151,Eastern Europe,,,100,Bulgaria,BGR,,,,Developed +001,World,150,Europe,151,Eastern Europe,,,203,Czechia,CZE,,,,Developed +001,World,150,Europe,151,Eastern Europe,,,348,Hungary,HUN,,,,Developed +001,World,150,Europe,151,Eastern Europe,,,616,Poland,POL,,,,Developed +001,World,150,Europe,151,Eastern Europe,,,498,Republic of Moldova,MDA,,x,,Developed +001,World,150,Europe,151,Eastern Europe,,,642,Romania,ROU,,,,Developed +001,World,150,Europe,151,Eastern Europe,,,643,Russian Federation,RUS,,,,Developed +001,World,150,Europe,151,Eastern Europe,,,703,Slovakia,SVK,,,,Developed +001,World,150,Europe,151,Eastern Europe,,,804,Ukraine,UKR,,,,Developed +001,World,150,Europe,154,Northern Europe,,,248,Åland Islands,ALA,,,,Developed +001,World,150,Europe,154,Northern Europe,830,Channel Islands,831,Guernsey,GGY,,,,Developed +001,World,150,Europe,154,Northern Europe,830,Channel Islands,832,Jersey,JEY,,,,Developed +001,World,150,Europe,154,Northern Europe,830,Channel Islands,680,Sark,,,,,Developed +001,World,150,Europe,154,Northern Europe,,,208,Denmark,DNK,,,,Developed +001,World,150,Europe,154,Northern Europe,,,233,Estonia,EST,,,,Developed +001,World,150,Europe,154,Northern Europe,,,234,Faroe Islands,FRO,,,,Developed +001,World,150,Europe,154,Northern Europe,,,246,Finland,FIN,,,,Developed +001,World,150,Europe,154,Northern Europe,,,352,Iceland,ISL,,,,Developed +001,World,150,Europe,154,Northern Europe,,,372,Ireland,IRL,,,,Developed +001,World,150,Europe,154,Northern Europe,,,833,Isle of Man,IMN,,,,Developed +001,World,150,Europe,154,Northern Europe,,,428,Latvia,LVA,,,,Developed +001,World,150,Europe,154,Northern Europe,,,440,Lithuania,LTU,,,,Developed +001,World,150,Europe,154,Northern Europe,,,578,Norway,NOR,,,,Developed +001,World,150,Europe,154,Northern Europe,,,744,Svalbard and Jan Mayen Islands,SJM,,,,Developed +001,World,150,Europe,154,Northern Europe,,,752,Sweden,SWE,,,,Developed +001,World,150,Europe,154,Northern Europe,,,826,United Kingdom of Great Britain and Northern Ireland,GBR,,,,Developed +001,World,150,Europe,039,Southern Europe,,,008,Albania,ALB,,,,Developed +001,World,150,Europe,039,Southern Europe,,,020,Andorra,AND,,,,Developed +001,World,150,Europe,039,Southern Europe,,,070,Bosnia and Herzegovina,BIH,,,,Developed +001,World,150,Europe,039,Southern Europe,,,191,Croatia,HRV,,,,Developed +001,World,150,Europe,039,Southern Europe,,,292,Gibraltar,GIB,,,,Developed +001,World,150,Europe,039,Southern Europe,,,300,Greece,GRC,,,,Developed +001,World,150,Europe,039,Southern Europe,,,336,Holy See,VAT,,,,Developed +001,World,150,Europe,039,Southern Europe,,,380,Italy,ITA,,,,Developed +001,World,150,Europe,039,Southern Europe,,,470,Malta,MLT,,,,Developed +001,World,150,Europe,039,Southern Europe,,,499,Montenegro,MNE,,,,Developed +001,World,150,Europe,039,Southern Europe,,,807,North Macedonia,MKD,,x,,Developed +001,World,150,Europe,039,Southern Europe,,,620,Portugal,PRT,,,,Developed +001,World,150,Europe,039,Southern Europe,,,674,San Marino,SMR,,,,Developed +001,World,150,Europe,039,Southern Europe,,,688,Serbia,SRB,,,,Developed +001,World,150,Europe,039,Southern Europe,,,705,Slovenia,SVN,,,,Developed +001,World,150,Europe,039,Southern Europe,,,724,Spain,ESP,,,,Developed +001,World,150,Europe,155,Western Europe,,,040,Austria,AUT,,,,Developed +001,World,150,Europe,155,Western Europe,,,056,Belgium,BEL,,,,Developed +001,World,150,Europe,155,Western Europe,,,250,France,FRA,,,,Developed +001,World,150,Europe,155,Western Europe,,,276,Germany,DEU,,,,Developed +001,World,150,Europe,155,Western Europe,,,438,Liechtenstein,LIE,,,,Developed +001,World,150,Europe,155,Western Europe,,,442,Luxembourg,LUX,,,,Developed +001,World,150,Europe,155,Western Europe,,,492,Monaco,MCO,,,,Developed +001,World,150,Europe,155,Western Europe,,,528,Netherlands,NLD,,,,Developed +001,World,150,Europe,155,Western Europe,,,756,Switzerland,CHE,,,,Developed +001,World,009,Oceania,053,Australia and New Zealand,,,036,Australia,AUS,,,,Developed +001,World,009,Oceania,053,Australia and New Zealand,,,162,Christmas Island,CXR,,,,Developed +001,World,009,Oceania,053,Australia and New Zealand,,,166,Cocos (Keeling) Islands,CCK,,,,Developed +001,World,009,Oceania,053,Australia and New Zealand,,,334,Heard Island and McDonald Islands,HMD,,,,Developed +001,World,009,Oceania,053,Australia and New Zealand,,,554,New Zealand,NZL,,,,Developed +001,World,009,Oceania,053,Australia and New Zealand,,,574,Norfolk Island,NFK,,,,Developed +001,World,009,Oceania,054,Melanesia,,,242,Fiji,FJI,,,x,Developing +001,World,009,Oceania,054,Melanesia,,,540,New Caledonia,NCL,,,x,Developing +001,World,009,Oceania,054,Melanesia,,,598,Papua New Guinea,PNG,,,x,Developing +001,World,009,Oceania,054,Melanesia,,,090,Solomon Islands,SLB,x,,x,Developing +001,World,009,Oceania,054,Melanesia,,,548,Vanuatu,VUT,x,,x,Developing +001,World,009,Oceania,057,Micronesia,,,316,Guam,GUM,,,x,Developing +001,World,009,Oceania,057,Micronesia,,,296,Kiribati,KIR,x,,x,Developing +001,World,009,Oceania,057,Micronesia,,,584,Marshall Islands,MHL,,,x,Developing +001,World,009,Oceania,057,Micronesia,,,583,Micronesia (Federated States of),FSM,,,x,Developing +001,World,009,Oceania,057,Micronesia,,,520,Nauru,NRU,,,x,Developing +001,World,009,Oceania,057,Micronesia,,,580,Northern Mariana Islands,MNP,,,x,Developing +001,World,009,Oceania,057,Micronesia,,,585,Palau,PLW,,,x,Developing +001,World,009,Oceania,057,Micronesia,,,581,United States Minor Outlying Islands,UMI,,,,Developing +001,World,009,Oceania,061,Polynesia,,,016,American Samoa,ASM,,,x,Developing +001,World,009,Oceania,061,Polynesia,,,184,Cook Islands,COK,,,x,Developing +001,World,009,Oceania,061,Polynesia,,,258,French Polynesia,PYF,,,x,Developing +001,World,009,Oceania,061,Polynesia,,,570,Niue,NIU,,,x,Developing +001,World,009,Oceania,061,Polynesia,,,612,Pitcairn,PCN,,,,Developing +001,World,009,Oceania,061,Polynesia,,,882,Samoa,WSM,,,x,Developing +001,World,009,Oceania,061,Polynesia,,,772,Tokelau,TKL,,,,Developing +001,World,009,Oceania,061,Polynesia,,,776,Tonga,TON,,,x,Developing +001,World,009,Oceania,061,Polynesia,,,798,Tuvalu,TUV,x,,x,Developing +001,World,009,Oceania,061,Polynesia,,,876,Wallis and Futuna Islands,WLF,,,,Developing diff --git a/tools/UN M49/region_galaxy.py b/tools/UN M49/region_galaxy.py new file mode 100644 index 0000000..d46c1b9 --- /dev/null +++ b/tools/UN M49/region_galaxy.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import csv +import argparse +import uuid +import json + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Region Galaxy - only create the list of values') + parser.add_argument("-c", "--csv", required=True, help="input csv") + args = parser.parse_args() + + values = [] + + with open(args.csv, newline='') as csvfile: + csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') + pass_first_line = True + for data in csvreader: + if pass_first_line: + pass_first_line = False + continue + temp = {} + value_name = data[0] + " - " + data[1] + + test = 0 + for value in values: + if value['value']==value_name: + test = 1 + break + + if test==0: + temp['value'] = value_name + temp['meta'] = {} + temp['meta']['subregion'] = [] + values.append(temp) + + '''---------------- column 2 ------------------''' + + with open(args.csv, newline='') as csvfile: + csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') + pass_first_line = True + for data in csvreader: + if pass_first_line: + pass_first_line = False + continue + temp = {} + value_name = data[2] + " - " + data[3] + parent_name = data[0] + " - " + data[1] + if value_name == " - ": + continue + + test = 0 + for value in values: + if value['value']==value_name: + test = 1 + break + + if test==0: + temp['value'] = value_name + temp['meta'] = {} + temp['meta']['subregion'] = [] + values.append(temp) + + for value in values: + if value['value']==parent_name: + test = 0 + for sub in value['meta']['subregion']: + if sub == value_name: + test = 1 + break + if test == 0: + value['meta']['subregion'].append(value_name) + + '''---------------- column 3 ------------------''' + + with open(args.csv, newline='') as csvfile: + csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') + pass_first_line = True + for data in csvreader: + if pass_first_line: + pass_first_line = False + continue + temp = {} + value_name = data[4] + " - " + data[5] + parent_name = data[2] + " - " + data[3] + if value_name == " - ": + continue + + test = 0 + for value in values: + if value['value']==value_name: + test = 1 + break + + if test==0: + temp['value'] = value_name + temp['meta'] = {} + temp['meta']['subregion'] = [] + values.append(temp) + + for value in values: + if value['value']==parent_name: + test = 0 + for sub in value['meta']['subregion']: + if sub == value_name: + test = 1 + break + if test == 0: + value['meta']['subregion'].append(value_name) + + + '''---------------- column 4 ------------------''' + + with open(args.csv, newline='') as csvfile: + csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') + pass_first_line = True + for data in csvreader: + if pass_first_line: + pass_first_line = False + continue + temp = {} + value_name = data[6] + " - " + data[7] + parent_name = data[4] + " - " + data[5] + if value_name == " - ": + continue + + test = 0 + for value in values: + if value['value']==value_name: + test = 1 + break + + if test==0: + temp['value'] = value_name + temp['meta'] = {} + temp['meta']['subregion'] = [] + values.append(temp) + + for value in values: + if value['value']==parent_name: + test = 0 + for sub in value['meta']['subregion']: + if sub == value_name: + test = 1 + break + if test == 0: + value['meta']['subregion'].append(value_name) + + '''---------------- column 5 ------------------''' + + with open(args.csv, newline='') as csvfile: + csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') + pass_first_line = True + for data in csvreader: + if pass_first_line: + pass_first_line = False + continue + temp = {} + value_name = data[8] + " - " + data[9] + x=6 + y=7 + test = 0 + while test == 0: + parent_name = data[x] + " - " + data[y] + if parent_name == " - ": + x=x-2 + y=y-2 + else: + test=1 + + for value in values: + if value['value']==parent_name: + test = 0 + for sub in value['meta']['subregion']: + if sub == value_name: + test = 1 + break + if test == 0: + value['meta']['subregion'].append(value_name) + + + print (values) + + with open('region_valuea.json', 'w') as outfile: + json.dump(values, outfile) From 5c35bd01de04e282b1f6bef6df0132ee5feef5a3 Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Thu, 26 Sep 2019 14:43:25 +0200 Subject: [PATCH 4/8] try to please CodeFactor --- tools/UN M49/region_galaxy.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/UN M49/region_galaxy.py b/tools/UN M49/region_galaxy.py index d46c1b9..0b3b71a 100644 --- a/tools/UN M49/region_galaxy.py +++ b/tools/UN M49/region_galaxy.py @@ -35,7 +35,7 @@ if __name__ == '__main__': temp['meta']['subregion'] = [] values.append(temp) - '''---------------- column 2 ------------------''' + """---------------- column 2 ------------------""" with open(args.csv, newline='') as csvfile: csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') @@ -72,7 +72,7 @@ if __name__ == '__main__': if test == 0: value['meta']['subregion'].append(value_name) - '''---------------- column 3 ------------------''' + """---------------- column 3 ------------------""" with open(args.csv, newline='') as csvfile: csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') @@ -110,7 +110,7 @@ if __name__ == '__main__': value['meta']['subregion'].append(value_name) - '''---------------- column 4 ------------------''' + """---------------- column 4 ------------------""" with open(args.csv, newline='') as csvfile: csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') @@ -147,8 +147,8 @@ if __name__ == '__main__': if test == 0: value['meta']['subregion'].append(value_name) - '''---------------- column 5 ------------------''' - + """---------------- column 5 ------------------""" + with open(args.csv, newline='') as csvfile: csvreader = csv.reader(csvfile, delimiter=',', quotechar='"') pass_first_line = True From f6c075c3dfebad18a9a4680a6014c467fe242eca Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Fri, 27 Sep 2019 16:22:01 +0200 Subject: [PATCH 5/8] WIP update target info --- clusters/target-information.json | 266 +++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) diff --git a/clusters/target-information.json b/clusters/target-information.json index 4f162a1..cda89c2 100644 --- a/clusters/target-information.json +++ b/clusters/target-information.json @@ -4875,10 +4875,30 @@ "calling-code": [ "+674" ], + "capital": [ + "Yaren" + ], + "currency": [ + "Australian dollar", + "AUD" + ], "iso-code": [ "NR", "NRU" ], + "official-languages": [ + "Nauruan", + "English" + ], + "synomyms": [ + "Naoero", + "Republic of Nauru", + "Repubrikin Naoero", + "Pleasant Island" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".nr" }, "uuid": "2d57902f-14b2-4e04-84ed-b2e24a7bba5f", @@ -4889,10 +4909,32 @@ "calling-code": [ "+977" ], + "capital": [ + "Kathmandu" + ], + "currency": [ + "Nepalese rupee", + "Rs", + "रू", + "NPR", + "रूपैयाँ" + ], "iso-code": [ "NP", "NPL" ], + "official-languages": [ + "Nepali" + ], + "synomyms": [ + "नेपाल", + "Federal Democratic Republic of Nepal", + "सङ्घीय लोकतान्त्रिक गणतन्त्र नेपाल", + "Saṅghīya Lokatāntrik Gaṇatantra Nepāl" + ], + "territory-type": [ + "" + ], "top-level-domain": ".np" }, "uuid": "9f6c918b-246f-43bc-a125-1a2639932fd2", @@ -4903,6 +4945,17 @@ "calling-code": [ "+31" ], + "capital": [ + "Amsterdam" + ], + "currency": [ + "€", + "EUR", + "EURO", + "$", + "USD", + "United States dollar" + ], "iso-code": [ "NL", "NLD" @@ -4910,6 +4963,16 @@ "member-of": [ "NATO" ], + "official-languages": [ + "Dutch" + ], + "synomyms": [ + "Nederland", + "Holland" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".nl" }, "uuid": "1c016908-33df-485c-ba9a-3e629e6f92d9", @@ -4920,9 +4983,27 @@ "calling-code": [ "+599" ], + "capital": [ + "Willemstad" + ], + "currency": [ + "Netherlands Antillean guilder" + ], "iso-code": [ "AN", "ANT" + ], + "official-languages": [ + "Dutch", + "English", + "Papiamento" + ], + "synomyms": [ + "Nederlandse Antillen", + "Antia Hulandes" + ], + "territory-type": [ + "Constituent country of the Kingdom of the Netherlands" ] }, "uuid": "9da253c5-423a-4fb7-ab98-a2eebc9da34d", @@ -4933,9 +5014,25 @@ "calling-code": [ "+687" ], + "capital": [ + "Nouméa" + ], + "currency": [ + "CFP franc", + "XPF" + ], "iso-code": [ "NC", "NCL" + ], + "official-languages": [ + "French" + ], + "synomyms": [ + "Nouvelle-Calédonie" + ], + "territory-type": [ + "Special collectivity of France" ] }, "uuid": "6128fe4d-b7f4-4e9f-be44-7377d1236d7c", @@ -4946,10 +5043,29 @@ "calling-code": [ "+64" ], + "capital": [ + "Wellington" + ], + "currency": [ + "New Zealand dollar", + "$", + "NZD" + ], "iso-code": [ "NZ", "NZL" ], + "official-languages": [ + "English", + "Māori", + "NZ Sign Language" + ], + "synomyms": [ + "Aotearoa" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".nz" }, "uuid": "665da546-a37a-4194-ad73-ff1a5e79b3f7", @@ -4960,10 +5076,27 @@ "calling-code": [ "+505" ], + "capital": [ + "Managua" + ], + "currency": [ + "Córdoba", + "NIO" + ], "iso-code": [ "NI", "NIC" ], + "official-languages": [ + "Spanish" + ], + "synomyms": [ + "Republic of Nicaragua", + "República de Nicaragua" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".ni" }, "uuid": "f0a5a2de-5567-4581-8c99-3459e44d1608", @@ -4974,10 +5107,28 @@ "calling-code": [ "+227" ], + "capital": [ + "Niamey" + ], + "currency": [ + "West African CFA franc", + "XOF" + ], "iso-code": [ "NE", "NER" ], + "official-languages": [ + "French" + ], + "synomyms": [ + "The Niger", + "Republic of the Niger", + "République du Niger" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".ne" }, "uuid": "13c9337c-9c06-42fd-ba3f-7128de97ffff", @@ -4988,10 +5139,30 @@ "calling-code": [ "+234" ], + "capital": [ + "Abuja" + ], + "currency": [ + "Naira", + "₦", + "NGN" + ], "iso-code": [ "NG", "NGA" ], + "official-languages": [ + "English" + ], + "synomyms": [ + "Federal Republic of Nigeria", + "Jamhuriyar Taraiyar Nijeriya", + "Ọ̀hàńjíkọ̀ Ọ̀hànézè Naìjíríyà", + "Orílẹ̀-èdè Olómìniira Àpapọ̀ Nàìjíríà" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".ng" }, "uuid": "bdaa0f76-6fd0-4f2d-b6fd-76a97fe06c3b", @@ -5002,10 +5173,27 @@ "calling-code": [ "+683" ], + "capital": [ + "Alofi" + ], + "currency": [ + "New Zealand dollar", + "NZD" + ], "iso-code": [ "NU", "NIU" ], + "official-languages": [ + "English", + "Niuean" + ], + "synomyms": [ + "Niuē" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".nu" }, "uuid": "ccf0effb-f81c-4308-a758-e13cde30d5f7", @@ -5016,10 +5204,35 @@ "calling-code": [ "+850" ], + "capital": [ + "Pyongyang" + ], + "currency": [ + "Korean People's won", + "₩", + "KPW" + ], "iso-code": [ "KP", "PRK" ], + "official-languages": [ + "Korean" + ], + "synomyms": [ + "조선", + "Chosŏ", + "북조선", + "Pukchosŏn", + "Democratic People's Republic of Korea", + "DPRK", + "DPR Korea", + "조선민주주의인민공화국", + "Chosŏn Minjujuŭi Inmin Konghwaguk" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".kp" }, "uuid": "cc0bc1cc-6c68-46c2-b9f4-8fdc05f24fde", @@ -5030,9 +5243,30 @@ "calling-code": [ "+1-670" ], + "capital": [ + "Saipan" + ], + "currency": [ + "$", + "USD", + "United States dollar" + ], "iso-code": [ "MP", "MNP" + ], + "official-languages": [ + "English", + "Chamorro", + "Carolinian" + ], + "synomyms": [ + "Commonwealth of the Northern Mariana Islands", + "Sankattan Siha Na Islas Mariånas", + "Commonwealth Téél Falúw kka Efáng llól Marianas" + ], + "territory-type": [ + "commonwealth of the United States" ] }, "uuid": "c6b20a69-9ec7-407e-a9f0-f7e7ee1ba123", @@ -5043,6 +5277,13 @@ "calling-code": [ "+47" ], + "capital": [ + "Oslo" + ], + "currency": [ + "Norwegian krone", + "NOK" + ], "iso-code": [ "NO", "NOR" @@ -5050,6 +5291,31 @@ "member-of": [ "NATO" ], + "official-languages": [ + "Norwegian", + "Norwegian (Bokmål)", + "Norwegian (Nynorsk)", + "Sámi", + "Northern Sámi", + "Lule Sámi", + "Southern Sámi" + ], + "synomyms": [ + "Norge", + "Noreg", + "Norga", + "Nöörje", + "Vuodna),", + "Kingdom of Norway", + "Kongeriket Norge", + "Kongeriket Noreg", + "Norgga gonagasriika", + "Nøørjen gånkarijhke", + "Vuona gånågisrijkka" + ], + "territory-type": [ + "Country" + ], "top-level-domain": ".no" }, "uuid": "a39f40d3-8fa5-4024-8c92-58c6a7362af8", From fca032ea73ac90ee49127684d765f718ed737fb4 Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Mon, 30 Sep 2019 10:45:53 +0200 Subject: [PATCH 6/8] add TVSPY tool --- clusters/tool.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/clusters/tool.json b/clusters/tool.json index 685b8ef..e738307 100644 --- a/clusters/tool.json +++ b/clusters/tool.json @@ -7808,7 +7808,19 @@ }, "uuid": "c72f8f57-fc2f-4ca2-afbe-ca5bfa5a1747", "value": "Amavaldo" + }, + { + "value": "TVSPY", + "description": "hacker going by the handle Mr. Burns. He also created something similar called RMS, which behaves very much like the TVSPY builder.\n“RMS/TVSPY continues to be developed, with a new version being posted by the developer/reseller on a regular basis,” Damballa researchers noted. “In fact, the legitimate RMS version developed by TektonIT and the version posted in criminal forums appear to be identical. TVSPY seems to be merely a modification of RMS to utilize TeamViewer infrastructure and a command-and-control interface manageable through the Web.", + "meta": { + "refs": [ + "https://mobile.twitter.com/SaudiDFIR/status/1177740045186457600" + ], + "synonyms": [ + "TVRAT", "SpY-Agent","teamspy" + ] + } } ], - "version": 123 + "version": 124 } From b7c9d3e03413f87a2a4894bc6469a93fb67ab260 Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Mon, 30 Sep 2019 11:56:28 +0200 Subject: [PATCH 7/8] jq --- clusters/tool.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clusters/tool.json b/clusters/tool.json index e738307..31e2380 100644 --- a/clusters/tool.json +++ b/clusters/tool.json @@ -7810,16 +7810,19 @@ "value": "Amavaldo" }, { - "value": "TVSPY", "description": "hacker going by the handle Mr. Burns. He also created something similar called RMS, which behaves very much like the TVSPY builder.\n“RMS/TVSPY continues to be developed, with a new version being posted by the developer/reseller on a regular basis,” Damballa researchers noted. “In fact, the legitimate RMS version developed by TektonIT and the version posted in criminal forums appear to be identical. TVSPY seems to be merely a modification of RMS to utilize TeamViewer infrastructure and a command-and-control interface manageable through the Web.", "meta": { "refs": [ "https://mobile.twitter.com/SaudiDFIR/status/1177740045186457600" ], "synonyms": [ - "TVRAT", "SpY-Agent","teamspy" + "TVRAT", + "SpY-Agent", + "teamspy" ] - } + }, + "uuid": "ae82a19e-2334-4e72-b55c-79b4ba4f137f", + "value": "TVSPY" } ], "version": 124 From 82824be7001f53514bfd58517656256421690dec Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Mon, 30 Sep 2019 12:55:31 +0200 Subject: [PATCH 8/8] fix empty string --- clusters/target-information.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clusters/target-information.json b/clusters/target-information.json index cda89c2..3daa081 100644 --- a/clusters/target-information.json +++ b/clusters/target-information.json @@ -4933,7 +4933,7 @@ "Saṅghīya Lokatāntrik Gaṇatantra Nepāl" ], "territory-type": [ - "" + "Country" ], "top-level-domain": ".np" },