pydeflate 1.4.0__tar.gz → 1.4.1__tar.gz
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.
- {pydeflate-1.4.0 → pydeflate-1.4.1}/PKG-INFO +1 -1
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/__init__.py +1 -1
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/get_data/exchange_data.py +19 -12
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pyproject.toml +1 -1
- {pydeflate-1.4.0 → pydeflate-1.4.1}/LICENSE +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/README.md +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/.pydeflate_data/README.md +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/deflate/__init__.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/deflate/deflate.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/deflate/deflator.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/get_data/__init__.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/get_data/deflate_data.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/get_data/imf_data.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/get_data/oecd_data.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/get_data/wb_data.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/pydeflate_config.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/settings/emu.json +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/settings/oecd_codes.json +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/tools/__init__.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/tools/exchange.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/tools/update_data.py +0 -0
- {pydeflate-1.4.0 → pydeflate-1.4.1}/pydeflate/utils.py +0 -0
|
@@ -175,18 +175,25 @@ class ExchangeOECD(Exchange):
|
|
|
175
175
|
oecd_data.update_dac1()
|
|
176
176
|
|
|
177
177
|
def load_data(self, **kwargs) -> None:
|
|
178
|
-
"""Load the
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
178
|
+
"""Load the OECD DAC price deflators data.
|
|
179
|
+
|
|
180
|
+
If the data is not found, it will be downloaded.
|
|
181
|
+
DAC deflators are transformed into price deflators by using the
|
|
182
|
+
implied exchange rate information from the OECD DAC data.
|
|
183
|
+
|
|
184
|
+
The deflators that are loaded is therefore *not* the DAC deflator,
|
|
185
|
+
but the price deflator used to produce the DAC deflators.
|
|
186
|
+
|
|
187
|
+
"""
|
|
188
|
+
try:
|
|
189
|
+
self._data = pd.read_feather(
|
|
190
|
+
PYDEFLATE_PATHS.data / "pydeflate_dac1.feather"
|
|
191
|
+
)
|
|
192
|
+
except FileNotFoundError:
|
|
193
|
+
logger.info("Data not found, downloading...")
|
|
194
|
+
self.update()
|
|
195
|
+
self.load_data()
|
|
196
|
+
return
|
|
190
197
|
|
|
191
198
|
def usd_exchange_rate(self, direction: str = "lcu_usd") -> pd.DataFrame:
|
|
192
199
|
"""Get the exchange rate of a currency to USD (or vice versa)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|