Quellcode durchsuchen

bugfix in CRF reading

Johannes Gütschow vor 2 Jahren
Ursprung
Commit
9b8f13ed95

+ 1 - 1
code/UNFCCC_CRF_reader/UNFCCC_CRF_reader_core.py

@@ -252,7 +252,7 @@ def read_crf_table(
     unknown_rows = []
     last_row_info = []
     for file in input_files:
-        file_info = get_info_from_crf_filename(file)
+        file_info = get_info_from_crf_filename(file.name)
         try:
             int(file_info["data_year"])
             df_this_file, unknown_rows_this_file, last_row_info_this_file = \

+ 43 - 1
extracted_data/UNFCCC/folder_mapping.json

@@ -1,7 +1,49 @@
 {
+    "EUA": "European Union",
+    "EUC": "European Union",
+    "FRK": "France",
+    "DKE": "Denmark",
+    "DNM": "Denmark",
+    "GBK": "United Kingdom of Great Britain and Northern Ireland",
     "PRK": "Republic_of_Korea",
+    "BLR": "Belarus",
+    "DNK": "Denmark",
+    "FRA": "France",
+    "LIE": "Liechtenstein",
+    "MLT": "Malta",
+    "SVN": "Slovenia",
+    "BGR": "Bulgaria",
+    "CZE": "Czechia",
+    "NZL": "New_Zealand",
+    "CHE": "Switzerland",
+    "ISL": "Iceland",
+    "GRC": "Greece",
+    "LTU": "Lithuania",
+    "GBR": "United_Kingdom",
     "USA": "United_States",
+    "TUR": "Turkey",
+    "AUT": "Austria",
+    "UKR": "Ukraine",
+    "FIN": "Finland",
+    "BEL": "Belgium",
+    "MCO": "Monaco",
+    "KAZ": "Kazakhstan",
+    "JPN": "Japan",
+    "CYP": "Cyprus",
+    "ESP": "Spain",
+    "NLD": "Netherlands",
+    "LVA": "Latvia",
+    "CAN": "Canada",
     "DEU": "Germany",
+    "SWE": "Sweden",
     "CHL": "Chile",
-    "RUS": "Russian_Federation"
+    "AUS": "Australia",
+    "POL": "Poland",
+    "SVK": "Slovakia",
+    "ITA": "Italy",
+    "PRT": "Portugal",
+    "HRV": "Croatia",
+    "RUS": "Russian_Federation",
+    "LUX": "Luxembourg",
+    "IRL": "Ireland"
 }