pydeflate.get_data.oecd_data

Classes

OECD

An object to download and return the latest OECD DAC deflators data.

Functions

_compute_deflators_and_exchange(→ pandas.DataFrame)

_clean_dac1(→ pandas.DataFrame)

Clean DAC1 to keep only relevant information for deflators and exchange.

update_dac1(→ None)

Update dac1 data from OECD site and save as feather

_identify_base_year(→ int)

_calculate_price_deflator(→ pandas.DataFrame)

Module Contents

pydeflate.get_data.oecd_data._compute_deflators_and_exchange(data: pandas.DataFrame) pandas.DataFrame
pydeflate.get_data.oecd_data._clean_dac1(df: pandas.DataFrame) pandas.DataFrame

Clean DAC1 to keep only relevant information for deflators and exchange.

Parameters:

df – the dataframe to clean

Returns:

A cleaned dataframe

pydeflate.get_data.oecd_data.update_dac1() None

Update dac1 data from OECD site and save as feather

pydeflate.get_data.oecd_data._identify_base_year(df: pandas.DataFrame) int
pydeflate.get_data.oecd_data._calculate_price_deflator(deflators_df: pandas.DataFrame) pandas.DataFrame
class pydeflate.get_data.oecd_data.OECD

Bases: pydeflate.get_data.deflate_data.Data

An object to download and return the latest OECD DAC deflators data.

__post_init__()
update(**kwargs) None

Update underlying data

load_data(**kwargs) None

Load the OECD DAC price deflators data.

If the data is not found, it will be downloaded. DAC deflators are transformed into price deflators by using the implied exchange rate information from the OECD DAC data.

The deflators that are loaded is therefore not the DAC deflator, but the price deflator used to produce the DAC deflators.