Update data & use embedded json instead of go code
This commit is contained in:
parent
73ee4a9138
commit
a3516cabf6
15 changed files with 38351 additions and 37173 deletions
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
DISCLAIMER: The files under "/data" are not covered by this license as they
|
DISCLAIMER: The files under "data/raw_data" are not covered by this license as they
|
||||||
were not created by the author of this software.
|
were not created by the author of this software.
|
||||||
|
|
||||||
MIT License
|
MIT License
|
||||||
|
|
|
@ -26,6 +26,4 @@ insee_number_translator 269059913116714 168127982980507 299122A00498723 29912974
|
||||||
|
|
||||||
## Data sources
|
## Data sources
|
||||||
|
|
||||||
* cities : https://public.opendatasoft.com/explore/dataset/correspondance-code-insee-code-postal/export/
|
* https://www.insee.fr/fr/information/2560452, Millésime 2021 : Téléchargement des fichiers, CSV
|
||||||
* countries : https://www.insee.fr/fr/information/2028273
|
|
||||||
* departments : https://www.data.gouv.fr/fr/datasets/regions-departements-villes-et-villages-de-france-et-doutre-mer/
|
|
||||||
|
|
36760
data/cities.go
36760
data/cities.go
File diff suppressed because it is too large
Load diff
|
@ -1,267 +0,0 @@
|
||||||
package data
|
|
||||||
|
|
||||||
var countries = map[string][]string{
|
|
||||||
"99125": {"ALBANIE"},
|
|
||||||
"99109": {"ALLEMAGNE"},
|
|
||||||
"99130": {"ANDORRE"},
|
|
||||||
"99110": {"AUTRICHE"},
|
|
||||||
"99131": {"BELGIQUE"},
|
|
||||||
"99148": {"BIELORUSSIE"},
|
|
||||||
"99118": {"BOSNIE-HERZEGOVINE"},
|
|
||||||
"99111": {"BULGARIE"},
|
|
||||||
"99119": {"CROATIE"},
|
|
||||||
"99101": {"DANEMARK", "FEROE (ILES)"},
|
|
||||||
"99134": {"ESPAGNE"},
|
|
||||||
"99106": {"ESTONIE"},
|
|
||||||
"99156": {"EX-REPUBLIQUE YOUGOSLAVE DE MACEDOINE"},
|
|
||||||
"99105": {"FINLANDE"},
|
|
||||||
"99133": {"GIBRALTAR"},
|
|
||||||
"99126": {"GRECE"},
|
|
||||||
"99132": {"ROYAUME-UNI", "GUERNESEY", "JERSEY", "MAN (ILE)"},
|
|
||||||
"99112": {"HONGRIE"},
|
|
||||||
"99136": {"IRLANDE, ou EIRE"},
|
|
||||||
"99102": {"ISLANDE"},
|
|
||||||
"99127": {"ITALIE"},
|
|
||||||
"99157": {"KOSOVO"},
|
|
||||||
"99107": {"LETTONIE"},
|
|
||||||
"99113": {"LIECHTENSTEIN"},
|
|
||||||
"99108": {"LITUANIE"},
|
|
||||||
"99137": {"LUXEMBOURG"},
|
|
||||||
"99144": {"MALTE"},
|
|
||||||
"99151": {"MOLDAVIE"},
|
|
||||||
"99138": {"MONACO"},
|
|
||||||
"99120": {"MONTENEGRO"},
|
|
||||||
"99103": {"NORVEGE", "BOUVET (ILE)", "SVALBARD et ILE JAN MAYEN"},
|
|
||||||
"99135": {"PAYS-BAS", "ARUBA"},
|
|
||||||
"99122": {"POLOGNE"},
|
|
||||||
"99139": {"PORTUGAL"},
|
|
||||||
"99141": {"REPUBLIQUE DEMOCRATIQUE ALLEMANDE"},
|
|
||||||
"99142": {"REPUBLIQUE FEDERALE D'ALLEMAGNE"},
|
|
||||||
"99114": {"ROUMANIE"},
|
|
||||||
"99123": {"RUSSIE"},
|
|
||||||
"99128": {"SAINT-MARIN"},
|
|
||||||
"99121": {"SERBIE"},
|
|
||||||
"99117": {"SLOVAQUIE"},
|
|
||||||
"99145": {"SLOVENIE"},
|
|
||||||
"99104": {"SUEDE"},
|
|
||||||
"99140": {"SUISSE"},
|
|
||||||
"99115": {"TCHECOSLOVAQUIE"},
|
|
||||||
"99116": {"TCHEQUE (REPUBLIQUE)"},
|
|
||||||
"99124": {"TURQUIE D'EUROPE"},
|
|
||||||
"99155": {"UKRAINE"},
|
|
||||||
"99129": {"VATICAN, ou SAINT-SIEGE"},
|
|
||||||
"99212": {"AFGHANISTAN"},
|
|
||||||
"99201": {"ARABIE SAOUDITE"},
|
|
||||||
"99252": {"ARMENIE"},
|
|
||||||
"99253": {"AZERBAIDJAN"},
|
|
||||||
"99249": {"BAHREIN"},
|
|
||||||
"99246": {"BANGLADESH"},
|
|
||||||
"99214": {"BHOUTAN"},
|
|
||||||
"99224": {"BIRMANIE"},
|
|
||||||
"99225": {"BRUNEI"},
|
|
||||||
"99234": {"CAMBODGE"},
|
|
||||||
"99216": {"CHINE"},
|
|
||||||
"99254": {"CHYPRE"},
|
|
||||||
"99237": {"COREE"},
|
|
||||||
"99239": {"COREE (REPUBLIQUE DE)"},
|
|
||||||
"99238": {"COREE (REPUBLIQUE POPULAIRE DEMOCRATIQUE DE)"},
|
|
||||||
"99247": {"EMIRATS ARABES UNIS"},
|
|
||||||
"99228": {"ETATS MALAIS NON FEDERES"},
|
|
||||||
"99255": {"GEORGIE"},
|
|
||||||
"99230": {"HONG-KONG"},
|
|
||||||
"99223": {"INDE", "GOA"},
|
|
||||||
"99231": {"INDONESIE"},
|
|
||||||
"99204": {"IRAN"},
|
|
||||||
"99203": {"IRAQ"},
|
|
||||||
"99207": {"ISRAEL"},
|
|
||||||
"99217": {"JAPON"},
|
|
||||||
"99222": {"JORDANIE"},
|
|
||||||
"99211": {"KAMTCHATKA"},
|
|
||||||
"99256": {"KAZAKHSTAN"},
|
|
||||||
"99257": {"KIRGHIZISTAN"},
|
|
||||||
"99240": {"KOWEIT"},
|
|
||||||
"99241": {"LAOS"},
|
|
||||||
"99205": {"LIBAN"},
|
|
||||||
"99232": {"MACAO"},
|
|
||||||
"99227": {"MALAISIE"},
|
|
||||||
"99229": {"MALDIVES"},
|
|
||||||
"99218": {"MANDCHOURIE"},
|
|
||||||
"99242": {"MONGOLIE"},
|
|
||||||
"99215": {"NEPAL"},
|
|
||||||
"99250": {"OMAN"},
|
|
||||||
"99258": {"OUZBEKISTAN"},
|
|
||||||
"99213": {"PAKISTAN"},
|
|
||||||
"99261": {"PALESTINE (Etat de)"},
|
|
||||||
"99220": {"PHILIPPINES"},
|
|
||||||
"99221": {"POSSESSIONS BRITANNIQUES AU PROCHE-ORIENT"},
|
|
||||||
"99248": {"QATAR"},
|
|
||||||
"99209": {"SIBERIE"},
|
|
||||||
"99226": {"SINGAPOUR"},
|
|
||||||
"99235": {"SRI LANKA"},
|
|
||||||
"99206": {"SYRIE"},
|
|
||||||
"99259": {"TADJIKISTAN"},
|
|
||||||
"99236": {"TAIWAN"},
|
|
||||||
"99219": {"THAILANDE"},
|
|
||||||
"99262": {"TIMOR ORIENTAL"},
|
|
||||||
"99210": {"TURKESTAN RUSSE"},
|
|
||||||
"99260": {"TURKMENISTAN"},
|
|
||||||
"99208": {"TURQUIE"},
|
|
||||||
"99243": {"VIET NAM"},
|
|
||||||
"99244": {"VIET NAM DU NORD"},
|
|
||||||
"99245": {"VIET NAM DU SUD"},
|
|
||||||
"99251": {"YEMEN"},
|
|
||||||
"99233": {"YEMEN DEMOCRATIQUE"},
|
|
||||||
"99202": {"YEMEN (REPUBLIQUE ARABE DU)"},
|
|
||||||
"99319": {"ACORES, MADERE"},
|
|
||||||
"99303": {"AFRIQUE DU SUD"},
|
|
||||||
"99352": {"ALGERIE"},
|
|
||||||
"99395": {"ANGOLA"},
|
|
||||||
"99327": {"BENIN"},
|
|
||||||
"99347": {"BOTSWANA"},
|
|
||||||
"99331": {"BURKINA"},
|
|
||||||
"99321": {"BURUNDI"},
|
|
||||||
"99322": {"CAMEROUN"},
|
|
||||||
"99305": {"CAMEROUN ET TOGO"},
|
|
||||||
"99396": {"CAP-VERT"},
|
|
||||||
"99323": {"CENTRAFRICAINE (REPUBLIQUE)"},
|
|
||||||
"99397": {"COMORES"},
|
|
||||||
"99324": {"CONGO"},
|
|
||||||
"99312": {"CONGO (REPUBLIQUE DEMOCRATIQUE)"},
|
|
||||||
"99326": {"COTE D'IVOIRE"},
|
|
||||||
"99399": {"DJIBOUTI"},
|
|
||||||
"99301": {"EGYPTE"},
|
|
||||||
"99317": {"ERYTHREE"},
|
|
||||||
"99391": {"ESWATINI"},
|
|
||||||
"99315": {"ETHIOPIE"},
|
|
||||||
"99328": {"GABON"},
|
|
||||||
"99304": {"GAMBIE"},
|
|
||||||
"99329": {"GHANA"},
|
|
||||||
"99330": {"GUINEE"},
|
|
||||||
"99314": {"GUINEE EQUATORIALE"},
|
|
||||||
"99392": {"GUINEE-BISSAU"},
|
|
||||||
"99320": {"ILES PORTUGAISES DE L'OCEAN INDIEN"},
|
|
||||||
"99332": {"KENYA"},
|
|
||||||
"99348": {"LESOTHO"},
|
|
||||||
"99302": {"LIBERIA"},
|
|
||||||
"99316": {"LIBYE"},
|
|
||||||
"99333": {"MADAGASCAR"},
|
|
||||||
"99334": {"MALAWI"},
|
|
||||||
"99335": {"MALI"},
|
|
||||||
"99350": {"MAROC"},
|
|
||||||
"99390": {"MAURICE"},
|
|
||||||
"99336": {"MAURITANIE"},
|
|
||||||
"99393": {"MOZAMBIQUE"},
|
|
||||||
"99311": {"NAMIBIE"},
|
|
||||||
"99337": {"NIGER"},
|
|
||||||
"99338": {"NIGERIA"},
|
|
||||||
"99339": {"OUGANDA"},
|
|
||||||
"99313": {"PROVINCES ESPAGNOLES D'AFRIQUE", "PRESIDES", "CANARIES (ILES)"},
|
|
||||||
"99340": {"RWANDA"},
|
|
||||||
"99389": {"SAHARA OCCIDENTAL"},
|
|
||||||
"99306": {"SAINTE HELENE, ASCENSION ET TRISTAN DA CUNHA"},
|
|
||||||
"99394": {"SAO TOME-ET-PRINCIPE"},
|
|
||||||
"99341": {"SENEGAL"},
|
|
||||||
"99398": {"SEYCHELLES"},
|
|
||||||
"99342": {"SIERRA LEONE"},
|
|
||||||
"99318": {"SOMALIE"},
|
|
||||||
"99343": {"SOUDAN"},
|
|
||||||
"99307": {"SOUDAN ANGLO-EGYPTIEN, KENYA, OUGANDA"},
|
|
||||||
"99349": {"SOUDAN DU SUD"},
|
|
||||||
"99325": {"TANGER"},
|
|
||||||
"99309": {"TANZANIE"},
|
|
||||||
"99344": {"TCHAD"},
|
|
||||||
"99345": {"TOGO"},
|
|
||||||
"99351": {"TUNISIE"},
|
|
||||||
"99346": {"ZAMBIE"},
|
|
||||||
"99308": {"ZANZIBAR", "OCEAN INDIEN (TERRITOIRE BRITANNIQUE DE L')"},
|
|
||||||
"99310": {"ZIMBABWE"},
|
|
||||||
"99441": {"ANTIGUA-ET-BARBUDA"},
|
|
||||||
"99431": {"ANTILLES NEERLANDAISES"},
|
|
||||||
"99415": {"ARGENTINE"},
|
|
||||||
"99436": {"BAHAMAS"},
|
|
||||||
"99434": {"BARBADE"},
|
|
||||||
"99429": {"BELIZE"},
|
|
||||||
"99425": {
|
|
||||||
"BERMUDES",
|
|
||||||
"ANGUILLA",
|
|
||||||
"CAIMANES (ILES)",
|
|
||||||
"MONTSERRAT",
|
|
||||||
"TURKS ET CAIQUES (ILES)",
|
|
||||||
"VIERGES BRITANNIQUES (ILES)",
|
|
||||||
"TERRITOIRES DU ROYAUME-UNI AUX ANTILLES",
|
|
||||||
},
|
|
||||||
"99418": {"BOLIVIE"},
|
|
||||||
"99443": {"BONAIRE, SAINT EUSTACHE ET SABA"},
|
|
||||||
"99416": {"BRESIL"},
|
|
||||||
"99401": {"CANADA"},
|
|
||||||
"99417": {"CHILI"},
|
|
||||||
"99419": {"COLOMBIE"},
|
|
||||||
"99406": {"COSTA RICA"},
|
|
||||||
"99407": {"CUBA"},
|
|
||||||
"99444": {"CURAÇAO"},
|
|
||||||
"99408": {"DOMINICAINE (REPUBLIQUE)"},
|
|
||||||
"99438": {"DOMINIQUE"},
|
|
||||||
"99414": {"EL SALVADOR"},
|
|
||||||
"99420": {"EQUATEUR"},
|
|
||||||
"99404": {"ETATS-UNIS", "ALASKA"},
|
|
||||||
"99435": {"GRENADE"},
|
|
||||||
"99430": {"GROENLAND"},
|
|
||||||
"99409": {"GUATEMALA"},
|
|
||||||
"99428": {"GUYANA"},
|
|
||||||
"99410": {"HAITI"},
|
|
||||||
"99411": {"HONDURAS"},
|
|
||||||
"99426": {"JAMAIQUE"},
|
|
||||||
"99403": {"LABRADOR"},
|
|
||||||
"99427": {
|
|
||||||
"MALOUINES, OU FALKLAND (ILES)",
|
|
||||||
"GEORGIE DU SUD ET LES ILES SANDWICH DU SUD",
|
|
||||||
"TERR. DU ROYAUME-UNI DANS L'ATLANTIQUE SUD",
|
|
||||||
},
|
|
||||||
"99405": {"MEXIQUE"},
|
|
||||||
"99412": {"NICARAGUA"},
|
|
||||||
"99413": {"PANAMA"},
|
|
||||||
"99421": {"PARAGUAY"},
|
|
||||||
"99422": {"PEROU"},
|
|
||||||
"99432": {
|
|
||||||
"PORTO RICO",
|
|
||||||
"VIERGES DES ETATS-UNIS (ILES)",
|
|
||||||
"TERR. DES ETATS-UNIS D'AMERIQUE EN AMERIQUE",
|
|
||||||
},
|
|
||||||
"99442": {"SAINT-CHRISTOPHE-ET-NIEVES"},
|
|
||||||
"99439": {"SAINTE-LUCIE"},
|
|
||||||
"99445": {"SAINT-MARTIN (PARTIE NEERLANDAISE)"},
|
|
||||||
"99440": {"SAINT-VINCENT-ET-LES GRENADINES"},
|
|
||||||
"99437": {"SURINAME"},
|
|
||||||
"99402": {"TERRE-NEUVE"},
|
|
||||||
"99433": {"TRINITE-ET-TOBAGO"},
|
|
||||||
"99423": {"URUGUAY"},
|
|
||||||
"99424": {"VENEZUELA"},
|
|
||||||
"99501": {
|
|
||||||
"AUSTRALIE",
|
|
||||||
"CHRISTMAS (ILE)",
|
|
||||||
"COCOS ou KEELING (ILES)",
|
|
||||||
"HEARD ET MACDONALD (ILES)",
|
|
||||||
"NORFOLK (ILE)",
|
|
||||||
},
|
|
||||||
"99508": {"FIDJI"},
|
|
||||||
"99504": {"HAWAII (ILES)"},
|
|
||||||
"99513": {"KIRIBATI"},
|
|
||||||
"99515": {"MARSHALL (ILES)"},
|
|
||||||
"99516": {"MICRONESIE (ETATS FEDERES DE)"},
|
|
||||||
"99507": {"NAURU"},
|
|
||||||
"99502": {"NOUVELLE-ZELANDE", "COOK (ILES)", "NIUE", "TOKELAU"},
|
|
||||||
"99517": {"PALAOS (ILES)"},
|
|
||||||
"99510": {"PAPOUASIE-NOUVELLE-GUINEE"},
|
|
||||||
"99503": {"PITCAIRN (ILE)"},
|
|
||||||
"99512": {"SALOMON (ILES)"},
|
|
||||||
"99506": {"SAMOA OCCIDENTALES"},
|
|
||||||
"99505": {
|
|
||||||
"GUAM",
|
|
||||||
"SAMOA AMERICAINES",
|
|
||||||
"MARIANNES DU NORD (ILES)",
|
|
||||||
"TERR. DES ETATS-UNIS D'AMERIQUE EN OCEANIE",
|
|
||||||
},
|
|
||||||
"99509": {"TONGA"},
|
|
||||||
"99511": {"TUVALU"},
|
|
||||||
"99514": {"VANUATU"},
|
|
||||||
}
|
|
1
data/curated_data/cities.json
Normal file
1
data/curated_data/cities.json
Normal file
File diff suppressed because one or more lines are too long
1
data/curated_data/countries.json
Normal file
1
data/curated_data/countries.json
Normal file
File diff suppressed because one or more lines are too long
1
data/curated_data/departments.json
Normal file
1
data/curated_data/departments.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"01":"Ain","02":"Aisne","03":"Allier","04":"Alpes-de-Haute-Provence","05":"Hautes-Alpes","06":"Alpes-Maritimes","07":"Ardèche","08":"Ardennes","09":"Ariège","10":"Aube","11":"Aude","12":"Aveyron","13":"Bouches-du-Rhône","14":"Calvados","15":"Cantal","16":"Charente","17":"Charente-Maritime","18":"Cher","19":"Corrèze","21":"Côte-d'Or","22":"Côtes-d'Armor","23":"Creuse","24":"Dordogne","25":"Doubs","26":"Drôme","27":"Eure","28":"Eure-et-Loir","29":"Finistère","2A":"Corse-du-Sud","2B":"Haute-Corse","30":"Gard","31":"Haute-Garonne","32":"Gers","33":"Gironde","34":"Hérault","35":"Ille-et-Vilaine","36":"Indre","37":"Indre-et-Loire","38":"Isère","39":"Jura","40":"Landes","41":"Loir-et-Cher","42":"Loire","43":"Haute-Loire","44":"Loire-Atlantique","45":"Loiret","46":"Lot","47":"Lot-et-Garonne","48":"Lozère","49":"Maine-et-Loire","50":"Manche","51":"Marne","52":"Haute-Marne","53":"Mayenne","54":"Meurthe-et-Moselle","55":"Meuse","56":"Morbihan","57":"Moselle","58":"Nièvre","59":"Nord","60":"Oise","61":"Orne","62":"Pas-de-Calais","63":"Puy-de-Dôme","64":"Pyrénées-Atlantiques","65":"Hautes-Pyrénées","66":"Pyrénées-Orientales","67":"Bas-Rhin","68":"Haut-Rhin","69":"Rhône","70":"Haute-Saône","71":"Saône-et-Loire","72":"Sarthe","73":"Savoie","74":"Haute-Savoie","75":"Paris","76":"Seine-Maritime","77":"Seine-et-Marne","78":"Yvelines","79":"Deux-Sèvres","80":"Somme","81":"Tarn","82":"Tarn-et-Garonne","83":"Var","84":"Vaucluse","85":"Vendée","86":"Vienne","87":"Haute-Vienne","88":"Vosges","89":"Yonne","90":"Territoire de Belfort","91":"Essonne","92":"Hauts-de-Seine","93":"Seine-Saint-Denis","94":"Val-de-Marne","95":"Val-d'Oise","971":"Guadeloupe","972":"Martinique","973":"Guyane","974":"La Réunion","976":"Mayotte"}
|
|
@ -1,113 +0,0 @@
|
||||||
package data
|
|
||||||
|
|
||||||
var departments = map[string]string{
|
|
||||||
"01": "Ain",
|
|
||||||
"02": "Aisne",
|
|
||||||
"03": "Allier",
|
|
||||||
"04": "Alpes-de-Haute-Provence",
|
|
||||||
"05": "Hautes-Alpes",
|
|
||||||
"06": "Alpes-Maritimes",
|
|
||||||
"07": "Ardèche",
|
|
||||||
"08": "Ardennes",
|
|
||||||
"09": "Ariège",
|
|
||||||
"10": "Aube",
|
|
||||||
"11": "Aude",
|
|
||||||
"12": "Aveyron",
|
|
||||||
"13": "Bouches-du-Rhône",
|
|
||||||
"14": "Calvados",
|
|
||||||
"15": "Cantal",
|
|
||||||
"16": "Charente",
|
|
||||||
"17": "Charente-Maritime",
|
|
||||||
"18": "Cher",
|
|
||||||
"19": "Corrèze",
|
|
||||||
"2A": "Corse-du-Sud",
|
|
||||||
"2B": "Haute-Corse",
|
|
||||||
"21": "Côte-d'Or",
|
|
||||||
"22": "Côtes-d'Armor",
|
|
||||||
"23": "Creuse",
|
|
||||||
"24": "Dordogne",
|
|
||||||
"25": "Doubs",
|
|
||||||
"26": "Drôme",
|
|
||||||
"27": "Eure",
|
|
||||||
"28": "Eure-et-Loir",
|
|
||||||
"29": "Finistère",
|
|
||||||
"30": "Gard",
|
|
||||||
"31": "Haute-Garonne",
|
|
||||||
"32": "Gers",
|
|
||||||
"33": "Gironde",
|
|
||||||
"34": "Hérault",
|
|
||||||
"35": "Ille-et-Vilaine",
|
|
||||||
"36": "Indre",
|
|
||||||
"37": "Indre-et-Loire",
|
|
||||||
"38": "Isère",
|
|
||||||
"39": "Jura",
|
|
||||||
"40": "Landes",
|
|
||||||
"41": "Loir-et-Cher",
|
|
||||||
"42": "Loire",
|
|
||||||
"43": "Haute-Loire",
|
|
||||||
"44": "Loire-Atlantique",
|
|
||||||
"45": "Loiret",
|
|
||||||
"46": "Lot",
|
|
||||||
"47": "Lot-et-Garonne",
|
|
||||||
"48": "Lozère",
|
|
||||||
"49": "Maine-et-Loire",
|
|
||||||
"50": "Manche",
|
|
||||||
"51": "Marne",
|
|
||||||
"52": "Haute-Marne",
|
|
||||||
"53": "Mayenne",
|
|
||||||
"54": "Meurthe-et-Moselle",
|
|
||||||
"55": "Meuse",
|
|
||||||
"56": "Morbihan",
|
|
||||||
"57": "Moselle",
|
|
||||||
"58": "Nièvre",
|
|
||||||
"59": "Nord",
|
|
||||||
"60": "Oise",
|
|
||||||
"61": "Orne",
|
|
||||||
"62": "Pas-de-Calais",
|
|
||||||
"63": "Puy-de-Dôme",
|
|
||||||
"64": "Pyrénées-Atlantiques",
|
|
||||||
"65": "Hautes-Pyrénées",
|
|
||||||
"66": "Pyrénées-Orientales",
|
|
||||||
"67": "Bas-Rhin",
|
|
||||||
"68": "Haut-Rhin",
|
|
||||||
"69": "Rhône",
|
|
||||||
"70": "Haute-Saône",
|
|
||||||
"71": "Saône-et-Loire",
|
|
||||||
"72": "Sarthe",
|
|
||||||
"73": "Savoie",
|
|
||||||
"74": "Haute-Savoie",
|
|
||||||
"75": "Paris",
|
|
||||||
"76": "Seine-Maritime",
|
|
||||||
"77": "Seine-et-Marne",
|
|
||||||
"78": "Yvelines",
|
|
||||||
"79": "Deux-Sèvres",
|
|
||||||
"80": "Somme",
|
|
||||||
"81": "Tarn",
|
|
||||||
"82": "Tarn-et-Garonne",
|
|
||||||
"83": "Var",
|
|
||||||
"84": "Vaucluse",
|
|
||||||
"85": "Vendée",
|
|
||||||
"86": "Vienne",
|
|
||||||
"87": "Haute-Vienne",
|
|
||||||
"88": "Vosges",
|
|
||||||
"89": "Yonne",
|
|
||||||
"90": "Territoire de Belfort",
|
|
||||||
"91": "Essonne",
|
|
||||||
"92": "Hauts-de-Seine",
|
|
||||||
"93": "Seine-Saint-Denis",
|
|
||||||
"94": "Val-de-Marne",
|
|
||||||
"95": "Val-d'Oise",
|
|
||||||
"971": "Guadeloupe",
|
|
||||||
"972": "Martinique",
|
|
||||||
"973": "Guyane",
|
|
||||||
"974": "La Réunion",
|
|
||||||
"975": "Saint-Pierre-et-Miquelon",
|
|
||||||
"976": "Mayotte",
|
|
||||||
"977": "Saint-Barthélemy",
|
|
||||||
"978": "Saint-Martin",
|
|
||||||
"984": "Terres australes et antarctiques françaises",
|
|
||||||
"986": "Wallis et Futuna",
|
|
||||||
"987": "Polynésie française",
|
|
||||||
"988": "Nouvelle-Calédonie",
|
|
||||||
"989": "Île de Clipperton",
|
|
||||||
}
|
|
|
@ -1,6 +1,7 @@
|
||||||
package data
|
package data
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
_ "embed"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -12,13 +13,22 @@ var Male = "homme"
|
||||||
var Female = "femme"
|
var Female = "femme"
|
||||||
var Unknown = "inconnu(e)"
|
var Unknown = "inconnu(e)"
|
||||||
|
|
||||||
|
//go:embed curated_data/countries.json
|
||||||
|
var rawCountries []byte
|
||||||
|
|
||||||
|
//go:embed curated_data/departments.json
|
||||||
|
var rawDepartments []byte
|
||||||
|
|
||||||
|
//go:embed curated_data/cities.json
|
||||||
|
var rawCities []byte
|
||||||
|
|
||||||
type InseeData struct {
|
type InseeData struct {
|
||||||
InseeNumber string `json:"insee_number"`
|
InseeNumber string `json:"insee_number"`
|
||||||
Gender string `json:"gender"`
|
Gender string `json:"gender"`
|
||||||
Year int `json:"year"`
|
Year int `json:"year"`
|
||||||
Month time.Month `json:"month"`
|
Month time.Month `json:"month"`
|
||||||
Department string `json:"department"`
|
Department string `json:"department"`
|
||||||
City *City `json:"city"`
|
City string `json:"city"`
|
||||||
CityCode string `json:"city_code"`
|
CityCode string `json:"city_code"`
|
||||||
Foreign bool `json:"foreign"`
|
Foreign bool `json:"foreign"`
|
||||||
Countries []string `json:"countries"`
|
Countries []string `json:"countries"`
|
||||||
|
@ -43,7 +53,7 @@ func NewInseeData(inseeNumber string) (*InseeData, error) {
|
||||||
if err != nil && departmentCode != "2A" && departmentCode != "2B" {
|
if err != nil && departmentCode != "2A" && departmentCode != "2B" {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var city *City
|
var city string
|
||||||
var department string
|
var department string
|
||||||
countries_ := []string{"FRANCE"}
|
countries_ := []string{"FRANCE"}
|
||||||
countryCode := ""
|
countryCode := ""
|
||||||
|
@ -53,19 +63,12 @@ func NewInseeData(inseeNumber string) (*InseeData, error) {
|
||||||
foreign = true
|
foreign = true
|
||||||
countryCode = cityCode
|
countryCode = cityCode
|
||||||
cityCode = ""
|
cityCode = ""
|
||||||
countries_ = countries["99"+countryCode]
|
countries_ = getCountry("99" + countryCode)
|
||||||
continent = continents[countryCode[0:1]]
|
continent = continents[countryCode[0:1]]
|
||||||
department = Unknown
|
department = Unknown
|
||||||
} else {
|
} else {
|
||||||
c, present := cities[departmentCode+cityCode]
|
city = getCity(departmentCode + cityCode)
|
||||||
if present {
|
department = getDepartment(departmentCode)
|
||||||
city = &c
|
|
||||||
}
|
|
||||||
var depPresent bool
|
|
||||||
department, depPresent = departments[departmentCode]
|
|
||||||
if !depPresent {
|
|
||||||
department = Unknown
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
order, err := strconv.Atoi(num[10:13])
|
order, err := strconv.Atoi(num[10:13])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -86,7 +89,7 @@ func NewInseeData(inseeNumber string) (*InseeData, error) {
|
||||||
}
|
}
|
||||||
year += 2000
|
year += 2000
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
birthday := time.Date(year, month, 1, 0, 0, 0, 0, time.UTC)
|
birthday := time.Date(year, month, 1, 0, 0, 0, 0, now.Location())
|
||||||
if birthday.After(now) {
|
if birthday.After(now) {
|
||||||
year -= 100
|
year -= 100
|
||||||
}
|
}
|
||||||
|
@ -163,8 +166,8 @@ func (insee InseeData) String() string {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
zoneType = "cette ville"
|
zoneType = "cette ville"
|
||||||
if insee.City != (*City)(nil) {
|
if insee.City != Unknown {
|
||||||
line = fmt.Sprintf("Vous êtes %s à %s (%s %s, France)", born, insee.City.Name, insee.City.ZipCode, insee.Department)
|
line = fmt.Sprintf("Vous êtes %s à %s (%s, France)", born, insee.City, insee.Department)
|
||||||
} else {
|
} else {
|
||||||
line = fmt.Sprintf("Vous êtes %s dans une ville inconnue portant l'identifiant %s dans le département \"%s\"", born, insee.CityCode, insee.Department)
|
line = fmt.Sprintf("Vous êtes %s dans une ville inconnue portant l'identifiant %s dans le département \"%s\"", born, insee.CityCode, insee.Department)
|
||||||
}
|
}
|
||||||
|
@ -181,3 +184,39 @@ func (insee InseeData) String() string {
|
||||||
result = append(result, line)
|
result = append(result, line)
|
||||||
return strings.Join(result, "\n")
|
return strings.Join(result, "\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getCity(cityCode string) string {
|
||||||
|
return getString(cityCode, rawCities)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getDepartment(departmentCode string) string {
|
||||||
|
return getString(departmentCode, rawDepartments)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getString(code string, rawData []byte) string {
|
||||||
|
cities := map[string]string{}
|
||||||
|
err := json.Unmarshal(rawData, &cities)
|
||||||
|
if err != nil {
|
||||||
|
return Unknown
|
||||||
|
}
|
||||||
|
item, present := cities[code]
|
||||||
|
if present {
|
||||||
|
return item
|
||||||
|
} else {
|
||||||
|
return Unknown
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getCountry(code string) []string {
|
||||||
|
cities := map[string][]string{}
|
||||||
|
err := json.Unmarshal(rawCountries, &cities)
|
||||||
|
if err != nil {
|
||||||
|
return []string{}
|
||||||
|
}
|
||||||
|
city, present := cities[code]
|
||||||
|
if present {
|
||||||
|
return city
|
||||||
|
} else {
|
||||||
|
return []string{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ func TestNewInseeData_ValidForeign(t *testing.T) {
|
||||||
assert.Equal(1969, insee.Year)
|
assert.Equal(1969, insee.Year)
|
||||||
assert.Equal(time.Month(5), insee.Month)
|
assert.Equal(time.Month(5), insee.Month)
|
||||||
assert.Equal(Unknown, insee.Department)
|
assert.Equal(Unknown, insee.Department)
|
||||||
assert.Nil(insee.City)
|
assert.Equal("", insee.City)
|
||||||
assert.True(insee.Foreign)
|
assert.True(insee.Foreign)
|
||||||
assert.Equal([]string{"BELGIQUE"}, insee.Countries)
|
assert.Equal([]string{"BELGIQUE"}, insee.Countries)
|
||||||
assert.Equal(167, insee.OrderOfBirth)
|
assert.Equal(167, insee.OrderOfBirth)
|
||||||
|
@ -52,7 +52,7 @@ func TestNewInseeData_InvalidFrench(t *testing.T) {
|
||||||
assert.Equal(1968, insee.Year)
|
assert.Equal(1968, insee.Year)
|
||||||
assert.Equal(time.Month(12), insee.Month)
|
assert.Equal(time.Month(12), insee.Month)
|
||||||
assert.Equal("Deux-Sèvres", insee.Department)
|
assert.Equal("Deux-Sèvres", insee.Department)
|
||||||
assert.Nil(insee.City)
|
assert.Equal(Unknown, insee.City)
|
||||||
assert.False(insee.Foreign)
|
assert.False(insee.Foreign)
|
||||||
assert.Equal([]string{"FRANCE"}, insee.Countries)
|
assert.Equal([]string{"FRANCE"}, insee.Countries)
|
||||||
assert.Equal(805, insee.OrderOfBirth)
|
assert.Equal(805, insee.OrderOfBirth)
|
||||||
|
@ -81,8 +81,7 @@ func TestNewInseeData_ValidFrench(t *testing.T) {
|
||||||
assert.Equal(time.Month(12), insee.Month)
|
assert.Equal(time.Month(12), insee.Month)
|
||||||
assert.Equal("Ain", insee.Department)
|
assert.Equal("Ain", insee.Department)
|
||||||
assert.NotNil(insee.City)
|
assert.NotNil(insee.City)
|
||||||
assert.Equal("AMBERIEUX-EN-DOMBES", insee.City.Name)
|
assert.Equal("Ambérieux-en-Dombes", insee.City)
|
||||||
assert.Equal("01330", insee.City.ZipCode)
|
|
||||||
assert.False(insee.Foreign)
|
assert.False(insee.Foreign)
|
||||||
assert.Equal([]string{"FRANCE"}, insee.Countries)
|
assert.Equal([]string{"FRANCE"}, insee.Countries)
|
||||||
assert.Equal(123, insee.OrderOfBirth)
|
assert.Equal(123, insee.OrderOfBirth)
|
||||||
|
@ -110,13 +109,9 @@ func TestNewInseeData_ValidMultiCountry(t *testing.T) {
|
||||||
assert.Equal(1944, insee.Year)
|
assert.Equal(1944, insee.Year)
|
||||||
assert.Equal(time.Month(8), insee.Month)
|
assert.Equal(time.Month(8), insee.Month)
|
||||||
assert.Equal(Unknown, insee.Department)
|
assert.Equal(Unknown, insee.Department)
|
||||||
assert.Nil(insee.City)
|
assert.Equal("", insee.City)
|
||||||
assert.True(insee.Foreign)
|
assert.True(insee.Foreign)
|
||||||
expectedCountry := []string{
|
expectedCountry := []string{"PORTO RICO", "TERR. DES ETATS-UNIS D'AMERIQUE EN AMERIQUE", "VIERGES DES ETATS-UNIS (ILES)"}
|
||||||
"PORTO RICO",
|
|
||||||
"VIERGES DES ETATS-UNIS (ILES)",
|
|
||||||
"TERR. DES ETATS-UNIS D'AMERIQUE EN AMERIQUE",
|
|
||||||
}
|
|
||||||
assert.Equal(expectedCountry, insee.Countries)
|
assert.Equal(expectedCountry, insee.Countries)
|
||||||
assert.Equal("Amérique", insee.Continent)
|
assert.Equal("Amérique", insee.Continent)
|
||||||
assert.Equal(873, insee.OrderOfBirth)
|
assert.Equal(873, insee.OrderOfBirth)
|
||||||
|
@ -144,8 +139,7 @@ func TestNewInseeData_ValidFrenchDROM(t *testing.T) {
|
||||||
assert.Equal(time.Month(12), insee.Month)
|
assert.Equal(time.Month(12), insee.Month)
|
||||||
assert.Equal("La Réunion", insee.Department)
|
assert.Equal("La Réunion", insee.Department)
|
||||||
assert.NotNil(insee.City)
|
assert.NotNil(insee.City)
|
||||||
assert.Equal("LES TROIS-BASSINS", insee.City.Name)
|
assert.Equal("Trois-Bassins", insee.City)
|
||||||
assert.Equal("97426", insee.City.ZipCode)
|
|
||||||
assert.False(insee.Foreign)
|
assert.False(insee.Foreign)
|
||||||
assert.Equal([]string{"FRANCE"}, insee.Countries)
|
assert.Equal([]string{"FRANCE"}, insee.Countries)
|
||||||
assert.Equal(987, insee.OrderOfBirth)
|
assert.Equal(987, insee.OrderOfBirth)
|
||||||
|
@ -171,8 +165,7 @@ func TestNewInseeData_ValidFrenchCorsica(t *testing.T) {
|
||||||
assert.Equal(number, insee.InseeNumber)
|
assert.Equal(number, insee.InseeNumber)
|
||||||
assert.Equal("Corse-du-Sud", insee.Department)
|
assert.Equal("Corse-du-Sud", insee.Department)
|
||||||
assert.NotNil(insee.City)
|
assert.NotNil(insee.City)
|
||||||
assert.Equal("AJACCIO", insee.City.Name)
|
assert.Equal("Ajaccio", insee.City)
|
||||||
assert.Equal("20000", insee.City.ZipCode)
|
|
||||||
assert.False(insee.Foreign)
|
assert.False(insee.Foreign)
|
||||||
assert.Equal([]string{"FRANCE"}, insee.Countries)
|
assert.Equal([]string{"FRANCE"}, insee.Countries)
|
||||||
assert.Equal(23, insee.ControlKey)
|
assert.Equal(23, insee.ControlKey)
|
||||||
|
|
149
data/preprocess.go
Normal file
149
data/preprocess.go
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
package data
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/csv"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func PreProcessRawData(sourceFolder, targetFolder string) {
|
||||||
|
err := os.MkdirAll(targetFolder, 0755)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Error, couldn't create target folder %s: %s", targetFolder, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = preProcessCities(sourceFolder+"/commune2021.csv", targetFolder+"/cities.json")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("Error during cities pre processing")
|
||||||
|
fmt.Println(err.Error())
|
||||||
|
}
|
||||||
|
err = preProcessDepartments(sourceFolder+"/departement2021.csv", targetFolder+"/departments.json")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("Error during departments pre processing")
|
||||||
|
fmt.Println(err.Error())
|
||||||
|
}
|
||||||
|
err = preProcessCountries(sourceFolder+"/pays2021.csv", targetFolder+"/countries.json")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("Error during countries pre processing")
|
||||||
|
fmt.Println(err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func preProcessCities(sourceFileName, targetFileName string) error {
|
||||||
|
return preProcessSimpleFile(sourceFileName, targetFileName, "COM")
|
||||||
|
}
|
||||||
|
|
||||||
|
func preProcessDepartments(sourceFileName, targetFileName string) error {
|
||||||
|
return preProcessSimpleFile(sourceFileName, targetFileName, "DEP")
|
||||||
|
}
|
||||||
|
|
||||||
|
func preProcessSimpleFile(sourceFileName, targetFileName, codeColumn string) error {
|
||||||
|
sourceFile, err := os.Open(sourceFileName)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer sourceFile.Close()
|
||||||
|
reader := csv.NewReader(sourceFile)
|
||||||
|
line, err := reader.Read()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
columnsToIndex := map[string]int{codeColumn: -1, "NCCENR": -1}
|
||||||
|
|
||||||
|
for index, header := range line {
|
||||||
|
_, present := columnsToIndex[header]
|
||||||
|
if present {
|
||||||
|
columnsToIndex[header] = index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for column, index := range columnsToIndex {
|
||||||
|
if index == -1 {
|
||||||
|
return fmt.Errorf("column %s is missing in file. Found columns: %s", column, line)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceItems := make(map[string]string)
|
||||||
|
|
||||||
|
lines, err := reader.ReadAll()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
codeIndex := columnsToIndex[codeColumn]
|
||||||
|
nameIndex := columnsToIndex["NCCENR"]
|
||||||
|
for _, line = range lines {
|
||||||
|
code := line[codeIndex]
|
||||||
|
name := line[nameIndex]
|
||||||
|
sourceItems[code] = name
|
||||||
|
}
|
||||||
|
|
||||||
|
itemsJson, err := json.Marshal(sourceItems)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = ioutil.WriteFile(targetFileName, itemsJson, 0644)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func preProcessCountries(sourceFileName, targetFileName string) error {
|
||||||
|
sourceFile, err := os.Open(sourceFileName)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer sourceFile.Close()
|
||||||
|
reader := csv.NewReader(sourceFile)
|
||||||
|
line, err := reader.Read()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
columnsToIndex := map[string]int{"COG": -1, "LIBCOG": -1}
|
||||||
|
|
||||||
|
for index, header := range line {
|
||||||
|
_, present := columnsToIndex[header]
|
||||||
|
if present {
|
||||||
|
columnsToIndex[header] = index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for column, index := range columnsToIndex {
|
||||||
|
if index == -1 {
|
||||||
|
return fmt.Errorf("column %s is missing in file. Found columns: %s", column, line)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceCountries := make(map[string][]string)
|
||||||
|
|
||||||
|
lines, err := reader.ReadAll()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
codeIndex := columnsToIndex["COG"]
|
||||||
|
nameIndex := columnsToIndex["LIBCOG"]
|
||||||
|
for _, line = range lines {
|
||||||
|
code := line[codeIndex]
|
||||||
|
name := line[nameIndex]
|
||||||
|
current, present := sourceCountries[code]
|
||||||
|
if !present {
|
||||||
|
current = []string{}
|
||||||
|
}
|
||||||
|
current = append(current, name)
|
||||||
|
sourceCountries[code] = current
|
||||||
|
}
|
||||||
|
|
||||||
|
citiesJson, err := json.Marshal(sourceCountries)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = ioutil.WriteFile(targetFileName, citiesJson, 0644)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
37743
data/raw_data/commune2021.csv
Normal file
37743
data/raw_data/commune2021.csv
Normal file
File diff suppressed because it is too large
Load diff
102
data/raw_data/departement2021.csv
Normal file
102
data/raw_data/departement2021.csv
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
DEP,REG,CHEFLIEU,TNCC,NCC,NCCENR,LIBELLE
|
||||||
|
01,84,01053,5,AIN,Ain,Ain
|
||||||
|
02,32,02408,5,AISNE,Aisne,Aisne
|
||||||
|
03,84,03190,5,ALLIER,Allier,Allier
|
||||||
|
04,93,04070,4,ALPES DE HAUTE PROVENCE,Alpes-de-Haute-Provence,Alpes-de-Haute-Provence
|
||||||
|
05,93,05061,4,HAUTES ALPES,Hautes-Alpes,Hautes-Alpes
|
||||||
|
06,93,06088,4,ALPES MARITIMES,Alpes-Maritimes,Alpes-Maritimes
|
||||||
|
07,84,07186,5,ARDECHE,Ardèche,Ardèche
|
||||||
|
08,44,08105,4,ARDENNES,Ardennes,Ardennes
|
||||||
|
09,76,09122,5,ARIEGE,Ariège,Ariège
|
||||||
|
10,44,10387,5,AUBE,Aube,Aube
|
||||||
|
11,76,11069,5,AUDE,Aude,Aude
|
||||||
|
12,76,12202,5,AVEYRON,Aveyron,Aveyron
|
||||||
|
13,93,13055,4,BOUCHES DU RHONE,Bouches-du-Rhône,Bouches-du-Rhône
|
||||||
|
14,28,14118,2,CALVADOS,Calvados,Calvados
|
||||||
|
15,84,15014,2,CANTAL,Cantal,Cantal
|
||||||
|
16,75,16015,3,CHARENTE,Charente,Charente
|
||||||
|
17,75,17300,3,CHARENTE MARITIME,Charente-Maritime,Charente-Maritime
|
||||||
|
18,24,18033,2,CHER,Cher,Cher
|
||||||
|
19,75,19272,3,CORREZE,Corrèze,Corrèze
|
||||||
|
21,27,21231,3,COTE D OR,Côte-d'Or,Côte-d'Or
|
||||||
|
22,53,22278,4,COTES D ARMOR,Côtes-d'Armor,Côtes-d'Armor
|
||||||
|
23,75,23096,3,CREUSE,Creuse,Creuse
|
||||||
|
24,75,24322,3,DORDOGNE,Dordogne,Dordogne
|
||||||
|
25,27,25056,2,DOUBS,Doubs,Doubs
|
||||||
|
26,84,26362,3,DROME,Drôme,Drôme
|
||||||
|
27,28,27229,5,EURE,Eure,Eure
|
||||||
|
28,24,28085,1,EURE ET LOIR,Eure-et-Loir,Eure-et-Loir
|
||||||
|
29,53,29232,2,FINISTERE,Finistère,Finistère
|
||||||
|
2A,94,2A004,3,CORSE DU SUD,Corse-du-Sud,Corse-du-Sud
|
||||||
|
2B,94,2B033,3,HAUTE CORSE,Haute-Corse,Haute-Corse
|
||||||
|
30,76,30189,2,GARD,Gard,Gard
|
||||||
|
31,76,31555,3,HAUTE GARONNE,Haute-Garonne,Haute-Garonne
|
||||||
|
32,76,32013,2,GERS,Gers,Gers
|
||||||
|
33,75,33063,3,GIRONDE,Gironde,Gironde
|
||||||
|
34,76,34172,5,HERAULT,Hérault,Hérault
|
||||||
|
35,53,35238,1,ILLE ET VILAINE,Ille-et-Vilaine,Ille-et-Vilaine
|
||||||
|
36,24,36044,5,INDRE,Indre,Indre
|
||||||
|
37,24,37261,1,INDRE ET LOIRE,Indre-et-Loire,Indre-et-Loire
|
||||||
|
38,84,38185,5,ISERE,Isère,Isère
|
||||||
|
39,27,39300,2,JURA,Jura,Jura
|
||||||
|
40,75,40192,4,LANDES,Landes,Landes
|
||||||
|
41,24,41018,2,LOIR ET CHER,Loir-et-Cher,Loir-et-Cher
|
||||||
|
42,84,42218,3,LOIRE,Loire,Loire
|
||||||
|
43,84,43157,3,HAUTE LOIRE,Haute-Loire,Haute-Loire
|
||||||
|
44,52,44109,3,LOIRE ATLANTIQUE,Loire-Atlantique,Loire-Atlantique
|
||||||
|
45,24,45234,2,LOIRET,Loiret,Loiret
|
||||||
|
46,76,46042,2,LOT,Lot,Lot
|
||||||
|
47,75,47001,2,LOT ET GARONNE,Lot-et-Garonne,Lot-et-Garonne
|
||||||
|
48,76,48095,3,LOZERE,Lozère,Lozère
|
||||||
|
49,52,49007,0,MAINE ET LOIRE,Maine-et-Loire,Maine-et-Loire
|
||||||
|
50,28,50502,3,MANCHE,Manche,Manche
|
||||||
|
51,44,51108,3,MARNE,Marne,Marne
|
||||||
|
52,44,52121,3,HAUTE MARNE,Haute-Marne,Haute-Marne
|
||||||
|
53,52,53130,3,MAYENNE,Mayenne,Mayenne
|
||||||
|
54,44,54395,0,MEURTHE ET MOSELLE,Meurthe-et-Moselle,Meurthe-et-Moselle
|
||||||
|
55,44,55029,3,MEUSE,Meuse,Meuse
|
||||||
|
56,53,56260,2,MORBIHAN,Morbihan,Morbihan
|
||||||
|
57,44,57463,3,MOSELLE,Moselle,Moselle
|
||||||
|
58,27,58194,3,NIEVRE,Nièvre,Nièvre
|
||||||
|
59,32,59350,2,NORD,Nord,Nord
|
||||||
|
60,32,60057,5,OISE,Oise,Oise
|
||||||
|
61,28,61001,5,ORNE,Orne,Orne
|
||||||
|
62,32,62041,2,PAS DE CALAIS,Pas-de-Calais,Pas-de-Calais
|
||||||
|
63,84,63113,2,PUY DE DOME,Puy-de-Dôme,Puy-de-Dôme
|
||||||
|
64,75,64445,4,PYRENEES ATLANTIQUES,Pyrénées-Atlantiques,Pyrénées-Atlantiques
|
||||||
|
65,76,65440,4,HAUTES PYRENEES,Hautes-Pyrénées,Hautes-Pyrénées
|
||||||
|
66,76,66136,4,PYRENEES ORIENTALES,Pyrénées-Orientales,Pyrénées-Orientales
|
||||||
|
67,44,67482,2,BAS RHIN,Bas-Rhin,Bas-Rhin
|
||||||
|
68,44,68066,2,HAUT RHIN,Haut-Rhin,Haut-Rhin
|
||||||
|
69,84,69123,2,RHONE,Rhône,Rhône
|
||||||
|
70,27,70550,3,HAUTE SAONE,Haute-Saône,Haute-Saône
|
||||||
|
71,27,71270,0,SAONE ET LOIRE,Saône-et-Loire,Saône-et-Loire
|
||||||
|
72,52,72181,3,SARTHE,Sarthe,Sarthe
|
||||||
|
73,84,73065,3,SAVOIE,Savoie,Savoie
|
||||||
|
74,84,74010,3,HAUTE SAVOIE,Haute-Savoie,Haute-Savoie
|
||||||
|
75,11,75056,0,PARIS,Paris,Paris
|
||||||
|
76,28,76540,3,SEINE MARITIME,Seine-Maritime,Seine-Maritime
|
||||||
|
77,11,77288,0,SEINE ET MARNE,Seine-et-Marne,Seine-et-Marne
|
||||||
|
78,11,78646,4,YVELINES,Yvelines,Yvelines
|
||||||
|
79,75,79191,4,DEUX SEVRES,Deux-Sèvres,Deux-Sèvres
|
||||||
|
80,32,80021,3,SOMME,Somme,Somme
|
||||||
|
81,76,81004,2,TARN,Tarn,Tarn
|
||||||
|
82,76,82121,2,TARN ET GARONNE,Tarn-et-Garonne,Tarn-et-Garonne
|
||||||
|
83,93,83137,2,VAR,Var,Var
|
||||||
|
84,93,84007,2,VAUCLUSE,Vaucluse,Vaucluse
|
||||||
|
85,52,85191,3,VENDEE,Vendée,Vendée
|
||||||
|
86,75,86194,3,VIENNE,Vienne,Vienne
|
||||||
|
87,75,87085,3,HAUTE VIENNE,Haute-Vienne,Haute-Vienne
|
||||||
|
88,44,88160,4,VOSGES,Vosges,Vosges
|
||||||
|
89,27,89024,5,YONNE,Yonne,Yonne
|
||||||
|
90,27,90010,2,TERRITOIRE DE BELFORT,Territoire de Belfort,Territoire de Belfort
|
||||||
|
91,11,91228,5,ESSONNE,Essonne,Essonne
|
||||||
|
92,11,92050,4,HAUTS DE SEINE,Hauts-de-Seine,Hauts-de-Seine
|
||||||
|
93,11,93008,3,SEINE SAINT DENIS,Seine-Saint-Denis,Seine-Saint-Denis
|
||||||
|
94,11,94028,2,VAL DE MARNE,Val-de-Marne,Val-de-Marne
|
||||||
|
95,11,95500,2,VAL D OISE,Val-d'Oise,Val-d'Oise
|
||||||
|
971,01,97105,3,GUADELOUPE,Guadeloupe,Guadeloupe
|
||||||
|
972,02,97209,3,MARTINIQUE,Martinique,Martinique
|
||||||
|
973,03,97302,3,GUYANE,Guyane,Guyane
|
||||||
|
974,04,97411,0,LA REUNION,La Réunion,La Réunion
|
||||||
|
976,06,97608,0,MAYOTTE,Mayotte,Mayotte
|
|
283
data/raw_data/pays2021.csv
Normal file
283
data/raw_data/pays2021.csv
Normal file
|
@ -0,0 +1,283 @@
|
||||||
|
COG,ACTUAL,CAPAY,CRPAY,ANI,LIBCOG,LIBENR,ANCNOM,CODEISO2,CODEISO3,CODENUM3
|
||||||
|
99101,1,,,,DANEMARK,ROYAUME DU DANEMARK,,DK,DNK,208
|
||||||
|
99101,3,99102,,,FEROE (ILES),FÉROÉ (ÎLES),,FO,FRO,234
|
||||||
|
99102,1,,,1944,ISLANDE,RÉPUBLIQUE D'ISLANDE,,IS,ISL,352
|
||||||
|
99103,1,,,,NORVEGE,ROYAUME DE NORVÈGE,,NO,NOR,578
|
||||||
|
99103,3,,,,BOUVET (ILE),BOUVET (ÎLE),,BV,BVT,074
|
||||||
|
99103,3,,,,SVALBARD et ILE JAN MAYEN,SVALBARD ET ÎLE JAN MAYEN,,SJ,SJM,744
|
||||||
|
99104,1,,,,SUEDE,ROYAUME DE SUÈDE,,SE,SWE,752
|
||||||
|
99105,1,,,,FINLANDE,RÉPUBLIQUE DE FINLANDE,,FI,FIN,246
|
||||||
|
99106,1,99123,,1991,ESTONIE,RÉPUBLIQUE D'ESTONIE,,EE,EST,233
|
||||||
|
99107,1,99123,,1991,LETTONIE,RÉPUBLIQUE DE LETTONIE,,LV,LVA,428
|
||||||
|
99108,1,99123,,1991,LITUANIE,RÉPUBLIQUE DE LITUANIE,,LT,LTU,440
|
||||||
|
99109,1,,,1990,ALLEMAGNE,RÉPUBLIQUE FÉDÉRALE D'ALLEMAGNE,,DE,DEU,276
|
||||||
|
99110,1,,,,AUTRICHE,RÉPUBLIQUE D'AUTRICHE,,AT,AUT,040
|
||||||
|
99111,1,,,,BULGARIE,RÉPUBLIQUE DE BULGARIE,,BG,BGR,100
|
||||||
|
99112,1,,,,HONGRIE,RÉPUBLIQUE DE HONGRIE,,HU,HUN,348
|
||||||
|
99113,1,,,,LIECHTENSTEIN,PRINCIPAUTÉ DE LIECHTENSTEIN,,LI,LIE,438
|
||||||
|
99114,1,,,,ROUMANIE,ROUMANIE,,RO,ROU,642
|
||||||
|
99115,2,,,,TCHECOSLOVAQUIE,TCHÉCOSLOVAQUIE,,,,
|
||||||
|
99116,1,99115,,1992,TCHEQUIE,RÉPUBLIQUE TCHÈQUE,,CZ,CZE,203
|
||||||
|
99117,1,99115,,1992,SLOVAQUIE,RÉPUBLIQUE SLOVAQUE,,SK,SVK,703
|
||||||
|
99118,1,99121,,1992,BOSNIE-HERZEGOVINE,RÉPUBLIQUE DE BOSNIE-HERZÉGOVINE,,BA,BIH,070
|
||||||
|
99119,1,99121,,1991,CROATIE,RÉPUBLIQUE DE CROATIE,,HR,HRV,191
|
||||||
|
99120,1,99121,,2006,MONTENEGRO,RÉPUBLIQUE DU MONTÉNÉGRO,SERBIE-ET-MONTENEGRO,ME,MNE,499
|
||||||
|
99121,1,,,2006,SERBIE,RÉPUBLIQUE DE SERBIE,SERBIE-ET-MONTENEGRO,RS,SRB,688
|
||||||
|
99122,1,,,,POLOGNE,RÉPUBLIQUE DE POLOGNE,,PL,POL,616
|
||||||
|
99123,1,,,1991,RUSSIE,FÉDÉRATION DE RUSSIE,U.R.S.S.,RU,RUS,643
|
||||||
|
99124,2,,99208,,TURQUIE D'EUROPE,TURQUIE D'EUROPE,,,,
|
||||||
|
99125,1,,,,ALBANIE,RÉPUBLIQUE D'ALBANIE,,AL,ALB,008
|
||||||
|
99126,1,,,,GRECE,RÉPUBLIQUE HELLÉNIQUE,,GR,GRC,300
|
||||||
|
99127,1,,,,ITALIE,RÉPUBLIQUE ITALIENNE,,IT,ITA,380
|
||||||
|
99128,1,,,,SAINT-MARIN,RÉPUBLIQUE DE SAINT-MARIN,,SM,SMR,674
|
||||||
|
99129,1,,,,"VATICAN, ou SAINT-SIEGE",ÉTAT DE LA CITÉ DU VATICAN,,VA,VAT,336
|
||||||
|
99130,1,,,,ANDORRE,PRINCIPAUTÉ D'ANDORRE,,AD,AND,020
|
||||||
|
99131,1,,,,BELGIQUE,ROYAUME DE BELGIQUE,,BE,BEL,056
|
||||||
|
99132,1,,,,ROYAUME-UNI,ROYAUME-UNI DE GRANDE-BRETAGNE ET D'IRLANDE DU NORD,,GB,GBR,826
|
||||||
|
99132,3,,,,GUERNESEY,GUERNESEY,,GG,GGY,831
|
||||||
|
99132,3,,,,MAN (ILE),MAN (ÎLE),,IM,IMN,833
|
||||||
|
99132,3,,,,JERSEY,JERSEY,,JE,JEY,832
|
||||||
|
99133,4,,99132,,GIBRALTAR,GIBRALTAR,,GI,GIB,292
|
||||||
|
99134,1,,,,ESPAGNE,ROYAUME D'ESPAGNE,,ES,ESP,724
|
||||||
|
99135,1,,,,PAYS-BAS,ROYAUME DES PAYS-BAS,HOLLANDE,NL,NLD,528
|
||||||
|
99135,3,,,,ARUBA,ARUBA,,AW,ABW,533
|
||||||
|
99136,1,,,,"IRLANDE, ou EIRE",IRLANDE,,IE,IRL,372
|
||||||
|
99137,1,,,,LUXEMBOURG,GRAND-DUCHÉ DE LUXEMBOURG,,LU,LUX,442
|
||||||
|
99138,1,,,,MONACO,PRINCIPAUTÉ DE MONACO,,MC,MCO,492
|
||||||
|
99139,1,,,,PORTUGAL,RÉPUBLIQUE PORTUGAISE,,PT,PRT,620
|
||||||
|
99140,1,,,,SUISSE,CONFÉDÉRATION SUISSE,,CH,CHE,756
|
||||||
|
99141,2,,99109,,REPUBLIQUE DEMOCRATIQUE ALLEMANDE,RÉPUBLIQUE DÉMOCRATIQUE ALLEMANDE,,,,
|
||||||
|
99142,2,,99109,,REPUBLIQUE FEDERALE D'ALLEMAGNE,RÉPUBLIQUE FÉDÉRALE D'ALLEMAGNE,,,,
|
||||||
|
99144,1,99133,,1964,MALTE,RÉPUBLIQUE DE MALTE,,MT,MLT,470
|
||||||
|
99145,1,99121,,1991,SLOVENIE,RÉPUBLIQUE DE SLOVÉNIE,,SI,SVN,705
|
||||||
|
99148,1,99123,,1991,BIELORUSSIE,RÉPUBLIQUE DE BIÉLORUSSIE,,BY,BLR,112
|
||||||
|
99151,1,99123,,1991,MOLDAVIE,RÉPUBLIQUE DE MOLDAVIE,,MD,MDA,498
|
||||||
|
99155,1,99123,,1991,UKRAINE,UKRAINE,,UA,UKR,804
|
||||||
|
99156,1,99121,,1993,MACEDOINE DU NORD,RÉPUBLIQUE DE MACÉDOINE DU NORD,EX-REPUBLIQUE YOUGOSLAVE DE MACEDOINE,MK,MKD,807
|
||||||
|
99157,1,99121,,2008,KOSOVO,RÉPUBLIQUE DU KOSOVO,SERBIE,XK,,
|
||||||
|
99201,1,,,,ARABIE SAOUDITE,ROYAUME D'ARABIE SAOUDITE,,SA,SAU,682
|
||||||
|
99202,2,,99251,,YEMEN (REPUBLIQUE ARABE DU),YÉMEN (RÉPUBLIQUE ARABE DU),,,,
|
||||||
|
99203,1,,,,IRAQ,RÉPUBLIQUE D'IRAQ,,IQ,IRQ,368
|
||||||
|
99204,1,,,,IRAN,RÉPUBLIQUE ISLAMIQUE D'IRAN,PERSE,IR,IRN,364
|
||||||
|
99205,1,,,1943,LIBAN,RÉPUBLIQUE LIBANAISE,,LB,LBN,422
|
||||||
|
99206,1,,,1944,SYRIE,RÉPUBLIQUE ARABE SYRIENNE,,SY,SYR,760
|
||||||
|
99207,1,,,1948,ISRAEL,ÉTAT D'ISRAËL,,IL,ISR,376
|
||||||
|
99208,1,,,,TURQUIE,RÉPUBLIQUE TURQUE,,TR,TUR,792
|
||||||
|
99209,2,,99123,,SIBERIE,SIBÉRIE,,,,
|
||||||
|
99210,2,,99123,,TURKESTAN RUSSE,TURKESTAN RUSSE,,,,
|
||||||
|
99211,2,,99123,,KAMTCHATKA,KAMTCHATKA,,,,
|
||||||
|
99212,1,,,,AFGHANISTAN,ÉTAT ISLAMIQUE D'AFGHANISTAN,,AF,AFG,004
|
||||||
|
99213,1,,,1947,PAKISTAN,RÉPUBLIQUE ISLAMIQUE DU PAKISTAN,,PK,PAK,586
|
||||||
|
99214,1,,,,BHOUTAN,ROYAUME DU BHOUTAN,,BT,BTN,064
|
||||||
|
99215,1,,,,NEPAL,NÉPAL,,NP,NPL,524
|
||||||
|
99216,1,,,,CHINE,RÉPUBLIQUE POPULAIRE DE CHINE,,CN,CHN,156
|
||||||
|
99217,1,,,,JAPON,JAPON,,JP,JPN,392
|
||||||
|
99218,2,,99216,,MANDCHOURIE,MANDCHOURIE,MANDCHOUKOUO,,,
|
||||||
|
99219,1,,,,THAILANDE,ROYAUME DE THAÏLANDE,SIAM,TH,THA,764
|
||||||
|
99220,1,,,1946,PHILIPPINES,RÉPUBLIQUE DES PHILIPPINES,,PH,PHL,608
|
||||||
|
99221,2,,,,POSSESSIONS BRITANNIQUES AU PROCHE-ORIENT,POSSESSIONS BRITANNIQUES AU PROCHE-ORIENT,,,,
|
||||||
|
99222,1,,,1946,JORDANIE,ROYAUME HACHÉMITE DE JORDANIE,TRANSJORDANIE,JO,JOR,400
|
||||||
|
99223,1,,,1947,INDE,RÉPUBLIQUE DE L'INDE,,IN,IND,356
|
||||||
|
99223,3,99232,,,GOA,GOA,,,,
|
||||||
|
99224,1,,,1948,BIRMANIE,UNION DE BIRMANIE,,MM,MMR,104
|
||||||
|
99225,1,,,1984,BRUNEI,NEGARA BRUNEI DARUSSALAM,BORNEO BRITANNIQUE,BN,BRN,096
|
||||||
|
99226,1,,,1965,SINGAPOUR,RÉPUBLIQUE DE SINGAPOUR,ETABLS. DES DETROITS,SG,SGP,702
|
||||||
|
99227,1,,,1957,MALAISIE,MALAISIE,,MY,MYS,458
|
||||||
|
99228,2,,99227,,ETATS MALAIS NON FEDERES,ÉTATS MALAIS NON FÉDÉRÉS,,,,
|
||||||
|
99229,1,,,1965,MALDIVES,RÉPUBLIQUE DES MALDIVES,ILES MALDIVES,MV,MDV,462
|
||||||
|
99230,2,99132,99216,,HONG-KONG,HONG-KONG,,HK,,
|
||||||
|
99231,1,,,1945,INDONESIE,RÉPUBLIQUE D'INDONÉSIE,INDES NEER. ET PORT.,ID,IDN,360
|
||||||
|
99232,2,99139,99216,,MACAO,MACAO,,MO,,
|
||||||
|
99233,2,,99251,,YEMEN DEMOCRATIQUE,YÉMEN DÉMOCRATIQUE,,,,
|
||||||
|
99234,1,98503,,1953,CAMBODGE,ROYAUME DU CAMBODGE,KAMPUCHEA DEM.,KH,KHM,116
|
||||||
|
99235,1,99223,,1948,SRI LANKA,RÉPUBLIQUE DÉMOCRATIQUE SOCIALISTE DU SRI LANKA,CEYLAN,LK,LKA,144
|
||||||
|
99236,4,99217,,1945,TAIWAN,TAÏWAN,FORMOSE,TW,TWN,158
|
||||||
|
99237,2,99217,,,COREE,CORÉE,,,,
|
||||||
|
99238,1,99237,,1953,COREE (REPUBLIQUE POPULAIRE DEMOCRATIQUE DE),RÉPUBLIQUE POPULAIRE DÉMOCRATIQUE DE CORÉE,,KP,PRK,408
|
||||||
|
99239,1,99237,,1945,COREE (REPUBLIQUE DE),RÉPUBLIQUE DE CORÉE,,KR,KOR,410
|
||||||
|
99240,1,99221,,1961,KOWEIT,ÉTAT DU KOWEÏT,,KW,KWT,414
|
||||||
|
99241,1,98505,,1949,LAOS,RÉPUBLIQUE DÉMOCRATIQUE POPULAIRE LAO,,LA,LAO,418
|
||||||
|
99242,1,99216,,1945,MONGOLIE,MONGOLIE,MONGOLIE EXTERIEURE,MN,MNG,496
|
||||||
|
99243,1,,,1976,VIET NAM,RÉPUBLIQUE SOCIALISTE DU VIÊT NAM,,VN,VNM,704
|
||||||
|
99244,2,98506,99243,1954,VIET NAM DU NORD,VIÊT NAM DU NORD,"TONKIN, ANNAM N.",,,
|
||||||
|
99245,2,XXXXX,99243,1954,VIET NAM DU SUD,VIÊT NAM DU SUD,"ANNAM S.,COCHINCHINE",,,
|
||||||
|
99246,1,99213,,1972,BANGLADESH,RÉPUBLIQUE POPULAIRE DU BANGLADESH,PAKISTAN ORIENTAL,BD,BGD,050
|
||||||
|
99247,1,99221,,1971,EMIRATS ARABES UNIS,ÉMIRATS ARABES UNIS,,AE,ARE,784
|
||||||
|
99248,1,99221,,1971,QATAR,ÉTAT DU QATAR,,QA,QAT,634
|
||||||
|
99249,1,99221,,1971,BAHREIN,ÉTAT DE BAHREÏN,,BH,BHR,048
|
||||||
|
99250,1,99221,,1971,OMAN,SULTANAT D'OMAN,MASCATE-ET-OMAN,OM,OMN,512
|
||||||
|
99251,1,,,1990,YEMEN,RÉPUBLIQUE DU YÉMEN,,YE,YEM,887
|
||||||
|
99252,1,99123,,1991,ARMENIE,RÉPUBLIQUE D'ARMÉNIE,,AM,ARM,051
|
||||||
|
99253,1,99123,,1991,AZERBAIDJAN,RÉPUBLIQUE AZERBAÏDJANAISE,,AZ,AZE,031
|
||||||
|
99254,1,99143,,1960,CHYPRE,RÉPUBLIQUE DE CHYPRE,,CY,CYP,196
|
||||||
|
99255,1,99123,,1991,GEORGIE,RÉPUBLIQUE DE GÉORGIE,,GE,GEO,268
|
||||||
|
99256,1,99123,,1991,KAZAKHSTAN,RÉPUBLIQUE DU KAZAKHSTAN,,KZ,KAZ,398
|
||||||
|
99257,1,99123,,1991,KIRGHIZISTAN,RÉPUBLIQUE KIRGHIZE,,KG,KGZ,417
|
||||||
|
99258,1,99123,,1991,OUZBEKISTAN,RÉPUBLIQUE D'OUZBÉKISTAN,,UZ,UZB,860
|
||||||
|
99259,1,99123,,1991,TADJIKISTAN,RÉPUBLIQUE DU TADJIKISTAN,,TJ,TJK,762
|
||||||
|
99260,1,99123,,1991,TURKMENISTAN,TURKMÉNISTAN,,TM,TKM,795
|
||||||
|
99261,1,99207,,,PALESTINE (Etat de),ÉTAT DE PALESTINE,PALESTINE (Territoire de),PS,PSE,275
|
||||||
|
99262,1,99231,,2002,TIMOR ORIENTAL,RÉPUBLIQUE DÉMOCRATIQUE DU TIMOR ORIENTAL,,TL,TLS,626
|
||||||
|
99301,1,,,,EGYPTE,RÉPUBLIQUE ARABE D'ÉGYPTE,,EG,EGY,818
|
||||||
|
99302,1,,,,LIBERIA,RÉPUBLIQUE DU LIBERIA,,LR,LBR,430
|
||||||
|
99303,1,,,,AFRIQUE DU SUD,RÉPUBLIQUE D'AFRIQUE DU SUD,UNION SUD-AFRICAINE,ZA,ZAF,710
|
||||||
|
99304,1,,,1965,GAMBIE,RÉPUBLIQUE DE GAMBIE,,GM,GMB,270
|
||||||
|
99305,2,,,,CAMEROUN ET TOGO,CAMEROUN ET TOGO,,,,
|
||||||
|
99306,4,,99132,,"SAINTE HELENE, ASCENSION ET TRISTAN DA CUNHA","SAINTE-HÉLÈNE, ASCENSION ET TRISTAN DA CUNHA",SAINTE HELENE,SH,SHN,654
|
||||||
|
99307,2,,,,"SOUDAN ANGLO-EGYPTIEN, KENYA, OUGANDA","SOUDAN ANGLO-ÉGYPTIEN, KENYA, OUGANDA",,,,
|
||||||
|
99308,2,,99309,,ZANZIBAR,ZANZIBAR,,,,
|
||||||
|
99308,4,,99132,,OCEAN INDIEN (TERRITOIRE BRITANNIQUE DE L'),OCÉAN INDIEN (TERRITOIRE BRITANNIQUE DE L'),,IO,IOT,086
|
||||||
|
99309,1,,,1961,TANZANIE,RÉPUBLIQUE UNIE DE TANZANIE,"TANGANYIKA, ZANZIBAR",TZ,TZA,834
|
||||||
|
99310,1,,,1980,ZIMBABWE,RÉPUBLIQUE DU ZIMBABWE,RHODESIE DU SUD,ZW,ZWE,716
|
||||||
|
99311,1,,,1990,NAMIBIE,RÉPUBLIQUE DE NAMIBIE,SUD-OUEST AFRICAIN,NA,NAM,516
|
||||||
|
99312,1,,,1960,CONGO (REPUBLIQUE DEMOCRATIQUE),RÉPUBLIQUE DÉMOCRATIQUE DU CONGO,ZAIRE,CD,COD,180
|
||||||
|
99313,4,99314,99134,,CANARIES (ILES),CANARIES (ÎLES),,,,
|
||||||
|
99313,4,,99134,,PROVINCES ESPAGNOLES D'AFRIQUE,PROVINCES ESPAGNOLES D'AFRIQUE,,,,
|
||||||
|
99313,4,,99134,,PRESIDES,PRÉSIDES,,,,
|
||||||
|
99314,1,,,1968,GUINEE EQUATORIALE,RÉPUBLIQUE DE GUINÉE ÉQUATORIALE,GUINEE ESPAGNOLE,GQ,GNQ,226
|
||||||
|
99315,1,,,,ETHIOPIE,RÉPUBLIQUE DÉMOCRATIQUE FÉDÉRALE D'ÉTHIOPIE,ABYSSINIE,ET,ETH,231
|
||||||
|
99316,1,,,1951,LIBYE,JAMAHIRIYA ARABE LIBYENNE POPULAIRE ET SOCIALISTE,CYRENAIQUE,LY,LBY,434
|
||||||
|
99317,1,99315,,1993,ERYTHREE,ÉTAT D'ÉRYTHRÉE,,ER,ERI,232
|
||||||
|
99318,1,99308,,1951,SOMALIE,SOMALIE,,SO,SOM,706
|
||||||
|
99319,4,,99139,,"ACORES, MADERE","AÇORES, MADÈRE",,,,
|
||||||
|
99320,2,,,,ILES PORTUGAISES DE L'OCEAN INDIEN,ÎLES PORTUGAISES DE L'OCÉAN INDIEN,,,,
|
||||||
|
99321,1,99312,,1962,BURUNDI,RÉPUBLIQUE DU BURUNDI,URUNDI,BI,BDI,108
|
||||||
|
99322,1,99305,,1961,CAMEROUN,RÉPUBLIQUE DU CAMEROUN,,CM,CMR,120
|
||||||
|
99323,1,98303,,1960,CENTRAFRICAINE (REPUBLIQUE),RÉPUBLIQUE CENTRAFRICAINE,OUBANGUI-CHARI,CF,CAF,140
|
||||||
|
99324,1,98302,,1960,CONGO,RÉPUBLIQUE DU CONGO,CONGO-BRAZZAVILLE,CG,COG,178
|
||||||
|
99325,2,,99350,,TANGER,TANGER,,,,
|
||||||
|
99326,1,98204,,1960,COTE D'IVOIRE,RÉPUBLIQUE DE CÔTE D'IVOIRE,,CI,CIV,384
|
||||||
|
99327,1,98205,,1960,BENIN,RÉPUBLIQUE DU BÉNIN,DAHOMEY,BJ,BEN,204
|
||||||
|
99328,1,98301,,1960,GABON,RÉPUBLIQUE GABONAISE,,GA,GAB,266
|
||||||
|
99329,1,99304,,1957,GHANA,RÉPUBLIQUE DU GHANA,COTE-DE-L'OR,GH,GHA,288
|
||||||
|
99330,1,XXXXX,,1958,GUINEE,RÉPUBLIQUE DE GUINÉE,GUINEE FRANCAISE,GN,GIN,324
|
||||||
|
99331,1,98209,,1960,BURKINA,BURKINA FASO,HAUTE-VOLTA,BF,BFA,854
|
||||||
|
99332,1,99307,,1963,KENYA,RÉPUBLIQUE DU KENYA,,KE,KEN,404
|
||||||
|
99333,1,98401,,1960,MADAGASCAR,RÉPUBLIQUE DE MADAGASCAR,,MG,MDG,450
|
||||||
|
99334,1,99310,,1964,MALAWI,RÉPUBLIQUE DU MALAWI,NYASSALAND,MW,MWI,454
|
||||||
|
99335,1,98206,,1960,MALI,RÉPUBLIQUE DU MALI,SOUDAN FRANCAIS,ML,MLI,466
|
||||||
|
99336,1,98201,,1960,MAURITANIE,RÉPUBLIQUE ISLAMIQUE DE MAURITANIE,,MR,MRT,478
|
||||||
|
99337,1,98207,,1960,NIGER,RÉPUBLIQUE DU NIGER,,NE,NER,562
|
||||||
|
99338,1,99304,,1960,NIGERIA,RÉPUBLIQUE FÉDÉRALE DU NIGÉRIA,,NG,NGA,566
|
||||||
|
99339,1,99307,,1962,OUGANDA,RÉPUBLIQUE DE L'OUGANDA,,UG,UGA,800
|
||||||
|
99340,1,99312,,1962,RWANDA,RÉPUBLIQUE RWANDAISE,RUANDA,RW,RWA,646
|
||||||
|
99341,1,98202,,1960,SENEGAL,RÉPUBLIQUE DU SÉNÉGAL,,SN,SEN,686
|
||||||
|
99342,1,99304,,1961,SIERRA LEONE,RÉPUBLIQUE DE SIERRA LEONE,,SL,SLE,694
|
||||||
|
99343,1,99307,,1956,SOUDAN,RÉPUBLIQUE DU SOUDAN,ANGLO-EGYPTIEN,SD,SDN,729
|
||||||
|
99344,1,98304,,1960,TCHAD,RÉPUBLIQUE DU TCHAD,,TD,TCD,148
|
||||||
|
99345,1,99305,,1960,TOGO,RÉPUBLIQUE TOGOLAISE,,TG,TGO,768
|
||||||
|
99346,1,99310,,1964,ZAMBIE,RÉPUBLIQUE DE ZAMBIE,RHODESIE DU NORD,ZM,ZMB,894
|
||||||
|
99347,1,99310,,1966,BOTSWANA,RÉPUBLIQUE DU BOTSWANA,BECHUANALAND,BW,BWA,072
|
||||||
|
99348,1,99310,,1966,LESOTHO,ROYAUME DU LESOTHO,BASUTOLAND,LS,LSO,426
|
||||||
|
99349,1,99343,,2011,SOUDAN DU SUD,RÉPUBLIQUE DU SOUDAN DU SUD,,SS,SSD,728
|
||||||
|
99350,1,XXXXX,,1956,MAROC,ROYAUME DU MAROC,,MA,MAR,504
|
||||||
|
99351,1,XXXXX,,1956,TUNISIE,RÉPUBLIQUE TUNISIENNE,,TN,TUN,788
|
||||||
|
99352,1,XXXXX,,1962,ALGERIE,RÉPUBLIQUE ALGÉRIENNE DÉMOCRATIQUE ET POPULAIRE,,DZ,DZA,012
|
||||||
|
99389,4,,,,SAHARA OCCIDENTAL,SAHARA OCCIDENTAL,,EH,ESH,732
|
||||||
|
99390,1,99308,,1968,MAURICE,RÉPUBLIQUE DE MAURICE,,MU,MUS,480
|
||||||
|
99391,1,99310,,1968,ESWATINI,ROYAUME D'ESWATINI,SWAZILAND,SZ,SWZ,748
|
||||||
|
99392,1,99319,,1974,GUINEE-BISSAU,RÉPUBLIQUE DE GUINÉE-BISSAU,GUINEE PORTUGAISE,GW,GNB,624
|
||||||
|
99393,1,99320,,1975,MOZAMBIQUE,RÉPUBLIQUE DU MOZAMBIQUE,,MZ,MOZ,508
|
||||||
|
99394,1,99319,,1975,SAO TOME-ET-PRINCIPE,RÉPUBLIQUE DÉMOCRATIQUE DE SAO TOMÉ-ET-PRINCIPE,,ST,STP,678
|
||||||
|
99395,1,99319,,1975,ANGOLA,RÉPUBLIQUE D'ANGOLA,,AO,AGO,024
|
||||||
|
99396,1,99319,,1975,CAP-VERT,RÉPUBLIQUE DU CAP-VERT,,CV,CPV,132
|
||||||
|
99397,1,98402,,1975,COMORES,RÉPUBLIQUE FÉDÉRALE ISLAMIQUE DES COMORES,,KM,COM,174
|
||||||
|
99398,1,99308,,1976,SEYCHELLES,RÉPUBLIQUE DES SEYCHELLES,,SC,SYC,690
|
||||||
|
99399,1,98406,,1977,DJIBOUTI,RÉPUBLIQUE DE DJIBOUTI,T.F. AFARS ET ISSAS,DJ,DJI,262
|
||||||
|
99401,1,,,,CANADA,CANADA,,CA,CAN,124
|
||||||
|
99402,2,,99401,,TERRE-NEUVE,TERRE-NEUVE,,,,
|
||||||
|
99403,2,,99401,,LABRADOR,LABRADOR,,,,
|
||||||
|
99404,1,,,,ETATS-UNIS,ÉTATS-UNIS D'AMÉRIQUE,,US,USA,840
|
||||||
|
99404,3,99432,,,ALASKA,ALASKA,,,,
|
||||||
|
99405,1,,,,MEXIQUE,ÉTATS-UNIS DU MEXIQUE,,MX,MEX,484
|
||||||
|
99406,1,,,,COSTA RICA,RÉPUBLIQUE DU COSTA RICA,,CR,CRI,188
|
||||||
|
99407,1,,,,CUBA,RÉPUBLIQUE DE CUBA,,CU,CUB,192
|
||||||
|
99408,1,,,,DOMINICAINE (REPUBLIQUE),RÉPUBLIQUE DOMINICAINE,SAINT-DOMINGUE,DO,DOM,214
|
||||||
|
99409,1,,,,GUATEMALA,RÉPUBLIQUE DU GUATEMALA,,GT,GTM,320
|
||||||
|
99410,1,,,,HAITI,RÉPUBLIQUE D'HAÏTI,,HT,HTI,332
|
||||||
|
99411,1,,,,HONDURAS,RÉPUBLIQUE DU HONDURAS,,HN,HND,340
|
||||||
|
99412,1,,,,NICARAGUA,RÉPUBLIQUE DU NICARAGUA,,NI,NIC,558
|
||||||
|
99413,1,,,,PANAMA,RÉPUBLIQUE DU PANAMA,,PA,PAN,591
|
||||||
|
99414,1,,,,EL SALVADOR,RÉPUBLIQUE DU SALVADOR,,SV,SLV,222
|
||||||
|
99415,1,,,,ARGENTINE,RÉPUBLIQUE ARGENTINE,,AR,ARG,032
|
||||||
|
99416,1,,,,BRESIL,RÉPUBLIQUE FÉDÉRATIVE DU BRÉSIL,,BR,BRA,076
|
||||||
|
99417,1,,,,CHILI,RÉPUBLIQUE DU CHILI,,CL,CHL,152
|
||||||
|
99418,1,,,,BOLIVIE,ÉTAT PLURINATIONAL DE BOLIVIE,REPUBLIQUE DE BOLIVIE,BO,BOL,068
|
||||||
|
99419,1,,,,COLOMBIE,RÉPUBLIQUE DE COLOMBIE,,CO,COL,170
|
||||||
|
99420,1,,,,EQUATEUR,RÉPUBLIQUE DE L'ÉQUATEUR,,EC,ECU,218
|
||||||
|
99421,1,,,,PARAGUAY,RÉPUBLIQUE DU PARAGUAY,,PY,PRY,600
|
||||||
|
99422,1,,,,PEROU,RÉPUBLIQUE DU PÉROU,,PE,PER,604
|
||||||
|
99423,1,,,,URUGUAY,RÉPUBLIQUE ORIENTALE DE L'URUGUAY,,UY,URY,858
|
||||||
|
99424,1,,,,VENEZUELA,RÉPUBLIQUE BOLIVARIENNE DU VENEZUELA,REPUBLIQUE DU VENEZUELA,VE,VEN,862
|
||||||
|
99425,4,99426,99132,,BERMUDES,BERMUDES,,BM,BMU,060
|
||||||
|
99425,4,99426,99132,,CAIMANES (ILES),CAÏMANES (ÎLES),,KY,CYM,136
|
||||||
|
99425,4,,99132,,MONTSERRAT,MONTSERRAT,,MS,MSR,500
|
||||||
|
99425,4,,99132,,TERRITOIRES DU ROYAUME-UNI AUX ANTILLES,TERRITOIRES DU ROYAUME-UNI AUX ANTILLES,,,,
|
||||||
|
99425,4,,99132,,TURKS ET CAIQUES (ILES),TURKS ET CAÏQUES (ÎLES),,TC,TCA,796
|
||||||
|
99425,4,,99132,,VIERGES BRITANNIQUES (ILES),VIERGES BRITANNIQUES (ÎLES),,VG,VGB,092
|
||||||
|
99425,4,,99132,,ANGUILLA,ANGUILLA,,AI,AIA,660
|
||||||
|
99426,1,,,1962,JAMAIQUE,JAMAÏQUE,,JM,JAM,388
|
||||||
|
99427,4,,99132,,TERR. DU ROYAUME-UNI DANS L'ATLANTIQUE SUD,TERR. DU ROYAUME-UNI DANS L'ATLANTIQUE_SUD,,,,
|
||||||
|
99427,4,,99132,,GEORGIE DU SUD ET LES ILES SANDWICH DU SUD,GÉORGIE DU SUD ET LES ÎLES SANDWICH DU SUD,,GS,SGS,239
|
||||||
|
99427,4,,99132,,"MALOUINES, OU FALKLAND (ILES)","MALOUINES, OU FALKLAND (ÎLES)",,FK,FLK,238
|
||||||
|
99428,1,,,1966,GUYANA,RÉPUBLIQUE COOPÉRATIVE DE GUYANA,GUYANE BRITANNIQUE,GY,GUY,328
|
||||||
|
99429,1,,,1981,BELIZE,BELIZE,HONDURAS BRITANNIQUE,BZ,BLZ,084
|
||||||
|
99430,4,,99101,,GROENLAND,GROENLAND,,GL,GRL,304
|
||||||
|
99431,2,,99135,,ANTILLES NEERLANDAISES,ANTILLES NÉERLANDAISES,,AN,,
|
||||||
|
99432,4,,99404,,PORTO RICO,PORTO RICO,,PR,PRI,630
|
||||||
|
99432,4,,99404,,TERR. DES ETATS-UNIS D'AMERIQUE EN AMERIQUE,TERR. DES ÉTATS-UNIS D'AMÉRIQUE EN AMÉRIQUE,,,,
|
||||||
|
99432,4,,99404,,VIERGES DES ETATS-UNIS (ILES),VIERGES DES ÉTATS-UNIS (ÎLES),,VI,VIR,850
|
||||||
|
99433,1,99426,,1962,TRINITE-ET-TOBAGO,RÉPUBLIQUE DE TRINITÉ-ET-TOBAGO,,TT,TTO,780
|
||||||
|
99434,1,99425,,1966,BARBADE,BARBADE,,BB,BRB,052
|
||||||
|
99435,1,99425,,1974,GRENADE,GRENADE,,GD,GRD,308
|
||||||
|
99436,1,99425,,1973,BAHAMAS,COMMONWEALTH DES BAHAMAS,ILES LUCAYES,BS,BHS,044
|
||||||
|
99437,1,99431,,1975,SURINAME,RÉPUBLIQUE DU SURINAME,GUYANE NEERLANDAISE,SR,SUR,740
|
||||||
|
99438,1,99425,,1978,DOMINIQUE,COMMONWEALTH DE DOMINIQUE,,DM,DMA,212
|
||||||
|
99439,1,99425,,1979,SAINTE-LUCIE,SAINTE-LUCIE,,LC,LCA,662
|
||||||
|
99440,1,99425,,1979,SAINT-VINCENT-ET-LES GRENADINES,SAINT-VINCENT-ET-LES GRENADINES,,VC,VCT,670
|
||||||
|
99441,1,99425,,1981,ANTIGUA-ET-BARBUDA,ANTIGUA-ET-BARBUDA,,AG,ATG,028
|
||||||
|
99442,1,99425,,1983,SAINT-CHRISTOPHE-ET-NIEVES,FÉDÉRATION DE SAINT-CHRISTOPHE-ET-NIÉVÈS,,KN,KNA,659
|
||||||
|
99443,1,99431,,2010,"BONAIRE, SAINT EUSTACHE ET SABA","BONAIRE, SAINT EUSTACHE ET SABA",,BQ,BES,535
|
||||||
|
99444,1,99431,,2010,CURAÇAO,CURAÇAO,,CW,CUW,531
|
||||||
|
99445,1,99431,,2010,SAINT-MARTIN (PARTIE NEERLANDAISE),SAINT-MARTIN (PARTIE NÉERLANDAISE),,SX,SXM,534
|
||||||
|
99501,1,,,,AUSTRALIE,AUSTRALIE,,AU,AUS,036
|
||||||
|
99501,3,,,,HEARD ET MACDONALD (ILES),HEARD ET MACDONALD (ÎLES),,HM,HMD,334
|
||||||
|
99501,3,99229,,,CHRISTMAS (ILE),CHRISTMAS (ÎLE),,CX,CXR,162
|
||||||
|
99501,3,99229,,,COCOS ou KEELING (ILES),COCOS OU KEELING (ÎLES),,CC,CCK,166
|
||||||
|
99501,3,99503,,,NORFOLK (ILE),NORFOLK (ÎLE),,NF,NFK,574
|
||||||
|
99502,1,,,,NOUVELLE-ZELANDE,NOUVELLE-ZÉLANDE,,NZ,NZL,554
|
||||||
|
99502,3,,,,NIUE,NIUE,,NU,NIU,570
|
||||||
|
99502,3,,,,TOKELAU,TOKELAU,,TK,TKL,772
|
||||||
|
99502,3,99503,,,COOK (ILES),COOK (ÎLES),,CK,COK,184
|
||||||
|
99503,4,,99132,,PITCAIRN (ILE),PITCAIRN (ÎLE),,PN,PCN,612
|
||||||
|
99504,2,,99404,,HAWAII (ILES),HAWAII (ÎLES),,,,
|
||||||
|
99505,4,,99404,,TERR. DES ETATS-UNIS D'AMERIQUE EN OCEANIE,TERR. DES ÉTATS-UNIS D'AMÉRIQUE EN OCÉANIE,,,,
|
||||||
|
99505,4,,99404,,MARIANNES DU NORD (ILES),MARIANNES DU NORD (ÎLES),,MP,MNP,580
|
||||||
|
99505,4,,99404,,SAMOA AMERICAINES,SAMOA AMÉRICAINES,,AS,ASM,016
|
||||||
|
99505,4,99220,99404,,GUAM,GUAM,,GU,GUM,316
|
||||||
|
99506,1,99505,,1962,SAMOA OCCIDENTALES,ÉTAT INDÉPENDANT DES SAMOA OCCIDENTALES,,WS,WSM,882
|
||||||
|
99507,1,99501,,1968,NAURU,RÉPUBLIQUE DE NAURU,,NR,NRU,520
|
||||||
|
99508,1,99503,,1970,FIDJI,RÉPUBLIQUE DES FIDJI,,FJ,FJI,242
|
||||||
|
99509,1,99503,,1970,TONGA,ROYAUME DES TONGA,,TO,TON,776
|
||||||
|
99510,1,99501,,1975,PAPOUASIE-NOUVELLE-GUINEE,PAPOUASIE-NOUVELLE-GUINÉE,,PG,PNG,598
|
||||||
|
99511,1,99503,,1978,TUVALU,TUVALU,ILES ELLICE,TV,TUV,798
|
||||||
|
99512,1,99503,,1978,SALOMON (ILES),ÎLES SALOMON,ILES SALOMON DU SUD,SB,SLB,090
|
||||||
|
99513,1,,,1979,KIRIBATI,RÉPUBLIQUE DE KIRIBATI,ILES GILBERT,KI,KIR,296
|
||||||
|
99514,1,99503,,1980,VANUATU,RÉPUBLIQUE DE VANUATU,NOUVELLES-HEBRIDES,VU,VUT,548
|
||||||
|
99515,1,99505,,1991,MARSHALL (ILES),RÉPUBLIQUE DES ÎLES MARSHALL,,MH,MHL,584
|
||||||
|
99516,1,99505,,1991,MICRONESIE (ETATS FEDERES DE),ÉTATS FÉDÉRÉS DE MICRONÉSIE,,FM,FSM,583
|
||||||
|
99517,1,99404,,1994,PALAOS (ILES),RÉPUBLIQUE DES ÎLES PALAOS,BELAU,PW,PLW,585
|
||||||
|
XXXXX,1,,,,FRANCE,RÉPUBLIQUE FRANÇAISE,,FR,FRA,250
|
||||||
|
XXXXX,3,,,,LA REUNION,DÉPARTEMENT DE LA RÉUNION,,RE,REU,638
|
||||||
|
XXXXX,3,,,,POLYNESIE FRANCAISE,POLYNÉSIE FRANÇAISE,,PF,PYF,258
|
||||||
|
XXXXX,3,,,,GUADELOUPE,DÉPARTEMENT DE LA GUADELOUPE,,GP,GLP,312
|
||||||
|
XXXXX,3,,,,SAINT-PIERRE-ET-MIQUELON,COLLECTIVITÉ TERRITORIALE DE SAINT-PIERRE-ET-MIQUELON,,PM,SPM,666
|
||||||
|
XXXXX,3,,,,TERRES AUSTRALES FRANCAISES,TERRES AUSTRALES FRANÇAISES,,TF,ATF,260
|
||||||
|
XXXXX,3,,,,WALLIS-ET-FUTUNA,WALLIS-ET-FUTUNA,,WF,WLF,876
|
||||||
|
XXXXX,3,,,,MAYOTTE,DÉPARTEMENT DE MAYOTTE,,YT,MYT,175
|
||||||
|
XXXXX,3,,,,CLIPPERTON (ILE),CLIPPERTON (ÎLE),,,,
|
||||||
|
XXXXX,3,,,,NOUVELLE-CALEDONIE,NOUVELLE-CALÉDONIE,,NC,NCL,540
|
||||||
|
XXXXX,3,,,,MARTINIQUE,DÉPARTEMENT DE LA MARTINIQUE,,MQ,MTQ,474
|
||||||
|
XXXXX,3,,,,GUYANE,DÉPARTEMENT DE LA GUYANE,,GF,GUF,254
|
||||||
|
XXXXX,3,,,,SAINT-BARTHELEMY,COLLECTIVITÉ D'OUTRE-MER DE SAINT-BARTHÉLEMY,,BL,BLM,652
|
||||||
|
XXXXX,3,,,,SAINT-MARTIN,COLLECTIVITÉ D'OUTRE-MER DE SAINT-MARTIN,,MF,MAF,663
|
|
8
main.go
8
main.go
|
@ -7,7 +7,15 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
var preProcess bool
|
||||||
|
flag.BoolVar(&preProcess, "pre-process", false, "Pre-process data files.")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
if preProcess {
|
||||||
|
data.PreProcessRawData("data/raw_data", "data/curated_data")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
numbers := flag.Args()
|
numbers := flag.Args()
|
||||||
for _, number := range numbers {
|
for _, number := range numbers {
|
||||||
insee, err := data.NewInseeData(number)
|
insee, err := data.NewInseeData(number)
|
||||||
|
|
Loading…
Reference in a new issue