pydeflate 2.3.2__py3-none-any.whl → 2.3.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,14 +107,19 @@ def add_pydeflate_iso3(
107
107
  additional_mapping={
108
108
  "World": "WLD",
109
109
  "European Union": "EUR",
110
+ "European Union (EU)": "EUR",
110
111
  "Euro area": "EUR",
112
+ "Euro Area (EA)": "EUR",
111
113
  "EU Institutions": "EUI",
112
114
  "DAC countries": "DAC",
113
115
  "DAC Countries, Total": "DAC",
114
116
  "Total DAC": "DAC",
115
117
  "Kosovo": "XXK",
118
+ "Kosovo, Republic of": "XXK",
116
119
  "G7": "G7C",
117
120
  "Sub-Sahara Africa": "SSA",
121
+ "Hong Kong Special Administrative Region, People's Republic of China": "HKG",
122
+ "Macao Special Administrative Region, People's Republic of China": "MAC",
118
123
  },
119
124
  )
120
125
  return df
pydeflate/sources/imf.py CHANGED
@@ -168,10 +168,10 @@ def _create_eur_series(df: pd.DataFrame) -> pd.DataFrame:
168
168
  .set_index("year")["EXCHANGE"]
169
169
  )
170
170
 
171
- # Apply France's exchange rates to rows with entity_code == 998 and matching year
172
- df.loc[df.entity_code == 998, "EXCHANGE"] = df.loc[
173
- df.entity_code == 998, "year"
174
- ].map(eur)
171
+ # Apply France's exchange rates to Euro Area rows (entity_code G163) with matching year
172
+ # Note: IMF WEO uses "G163" as the entity code for "Euro Area (EA)"
173
+ euro_area_mask = df.entity_code == "G163"
174
+ df.loc[euro_area_mask, "EXCHANGE"] = df.loc[euro_area_mask, "year"].map(eur)
175
175
  return df
176
176
 
177
177
 
@@ -204,6 +204,7 @@ _IMF_CACHE_ENTRY = CacheEntry(
204
204
  filename="imf_weo.parquet",
205
205
  fetcher=_download_weo,
206
206
  ttl_days=60,
207
+ version="2", # Bump version to invalidate cache when EUR mapping fix is applied
207
208
  )
208
209
 
209
210
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydeflate
3
- Version: 2.3.2
3
+ Version: 2.3.4
4
4
  Summary: Package to convert current prices figures to constant prices and vice versa
5
5
  Author: Jorge Rivera
6
6
  Author-email: Jorge Rivera <Jorge.Rivera@one.org>
@@ -23,12 +23,12 @@ pydeflate/schemas.py,sha256=XBfBVIQjie6IK5rsEn6MSBqv5IxRkKxa7xnc7UaH9kU,7779
23
23
  pydeflate/settings/emu.json,sha256=BIvbiMUeHUtCESR3sMcBNrS028yp2YraCJdhDJGvAAo,133
24
24
  pydeflate/settings/oecd_codes.json,sha256=jAKI1EgQP4rttjoG3Z-44r1tUJrIEzPCZF5V2aboQhE,911
25
25
  pydeflate/sources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- pydeflate/sources/common.py,sha256=i5srpNBVgC7cZdWsfF7z3VQy3P5AuL9vI_rP-gqw6Xc,8616
26
+ pydeflate/sources/common.py,sha256=WkmckbiUT2Qmu5fGUp3XRzcvZtZhG7lIdDNDwbmnFqM,8913
27
27
  pydeflate/sources/dac.py,sha256=RkO_nFZcp8AeSJNFzdBrGqaL2kLVUeXBHTPO6PkUFy0,3824
28
- pydeflate/sources/imf.py,sha256=Nu8Gm4wT-FdBpTuaYUrzOC2V3BNP9srNOIuQJ9E16_0,6712
28
+ pydeflate/sources/imf.py,sha256=qMNnJHSjaRygcU2X3WCo9kQVwKDK3Us9TqIBN-sZuRw,6893
29
29
  pydeflate/sources/world_bank.py,sha256=1DzDlr0Xe0DA0OUsycjwiq-4yMasnP0TneXEK0VmcRw,7281
30
30
  pydeflate/utils.py,sha256=HRVMUuWKS1IpU8lmkvQN1jIMA5-LEFzyEd0ReZSx65k,4252
31
- pydeflate-2.3.2.dist-info/licenses/LICENSE,sha256=8ymAThz7Z4JhjqL6vDwTaoq29tFytQRDkoW3rnTGstI,1075
32
- pydeflate-2.3.2.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
33
- pydeflate-2.3.2.dist-info/METADATA,sha256=TKIeiiz1MRztOeTQhDD6jRdm73qL-ItvyuIwbiUjVf8,20555
34
- pydeflate-2.3.2.dist-info/RECORD,,
31
+ pydeflate-2.3.4.dist-info/licenses/LICENSE,sha256=8ymAThz7Z4JhjqL6vDwTaoq29tFytQRDkoW3rnTGstI,1075
32
+ pydeflate-2.3.4.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
33
+ pydeflate-2.3.4.dist-info/METADATA,sha256=uewgsxSJ6P6TZEk26DRWD5lC4-cy6s3kAjNP_kTbTH4,20555
34
+ pydeflate-2.3.4.dist-info/RECORD,,