imfdatapy_demo
from imfdatapy.imf import *
ifs = IFS(search_terms=["gross domestic product, real"], countries=["US"], period='Q', start_date="2000",
end_date="2022")
df = ifs.download_data()
df
2022-11-25 02:01:42,761 - root - INFO - countries_str = 'US', self.start_date = '2000', self.end_date = '2022'
2022-11-25 02:01:43,334 - root - INFO - Output all IMF series table to ../out/series_imf.csv
2022-11-25 02:01:43,365 - root - INFO - Output series containing 'IFS' table to ../out/series_ifs.csv
2022-11-25 02:02:07,999 - root - WARNING - Failed to download CL_FREQ.
2022-11-25 02:02:08,736 - root - INFO - Output dimension CL_AREA_IFS table to ../out/dim_cl_area_ifs.csv
2022-11-25 02:02:08,750 - root - INFO - Output dimension CL_INDICATOR_IFS table to ../out/dim_cl_indicator_ifs.csv
2022-11-25 02:02:09,235 - root - INFO - Output meta data of IFS table to ../out/meta_ifs.csv
2022-11-25 02:02:09,249 - root - INFO - self.meta_df.shape = (3, 3)
2022-11-25 02:02:09,250 - root - INFO - Output meta data of IFS containing 'gross domestic product, real' table to ../out/meta_gross domestic product, real_US_Q_2000_2022.csv
2022-11-25 02:03:00,718 - root - INFO - self.data_df.shape = (174, 5)
2022-11-25 02:03:00,722 - root - INFO - Output data of IFS containing 'gross domestic product, real' table to ../out/data_gross domestic product, real_US_Q_2000_2022.csv
| Description | Country | Period | Value | ID | |
|---|---|---|---|---|---|
| 0 | Gross Domestic Product, Real, Unadjusted, Dome... | US | 2002-01-01 | 3263869 | NGDP_R_NSA_XDC |
| 1 | Gross Domestic Product, Real, Unadjusted, Dome... | US | 2002-04-01 | 3362508 | NGDP_R_NSA_XDC |
| 2 | Gross Domestic Product, Real, Unadjusted, Dome... | US | 2002-07-01 | 3401820 | NGDP_R_NSA_XDC |
| 3 | Gross Domestic Product, Real, Unadjusted, Dome... | US | 2002-10-01 | 3460159 | NGDP_R_NSA_XDC |
| 4 | Gross Domestic Product, Real, Unadjusted, Dome... | US | 2003-01-01 | 3340163 | NGDP_R_NSA_XDC |
| ... | ... | ... | ... | ... | ... |
| 169 | Gross Domestic Product, Real, Seasonally Adjus... | US | 2021-07-01 | 4918148.5 | NGDP_R_SA_XDC |
| 170 | Gross Domestic Product, Real, Seasonally Adjus... | US | 2021-10-01 | 5001545.3 | NGDP_R_SA_XDC |
| 171 | Gross Domestic Product, Real, Seasonally Adjus... | US | 2022-01-01 | 4981022 | NGDP_R_SA_XDC |
| 172 | Gross Domestic Product, Real, Seasonally Adjus... | US | 2022-04-01 | 4973817.8 | NGDP_R_SA_XDC |
| 173 | Gross Domestic Product, Real, Seasonally Adjus... | US | 2022-07-01 | 5005430.3 | NGDP_R_SA_XDC |
174 rows × 5 columns
ifs.describe_data()
ifs = IFS(search_terms=["gross Domestic Product, Real"], countries=["CA", "RU"],
period='Q', start_date="1970", end_date="2022")
df = ifs.download_data()
df
2022-11-25 02:03:15,465 - root - INFO - countries_str = 'CA, RU', self.start_date = '1970', self.end_date = '2022'
2022-11-25 02:03:16,065 - root - INFO - Output all IMF series table to ../out/series_imf.csv
2022-11-25 02:03:16,097 - root - INFO - Output series containing 'IFS' table to ../out/series_ifs.csv
2022-11-25 02:03:32,074 - root - WARNING - Failed to download CL_FREQ.
2022-11-25 02:03:32,756 - root - INFO - Output dimension CL_AREA_IFS table to ../out/dim_cl_area_ifs.csv
2022-11-25 02:03:32,769 - root - INFO - Output dimension CL_INDICATOR_IFS table to ../out/dim_cl_indicator_ifs.csv
2022-11-25 02:03:33,126 - root - INFO - Output meta data of IFS table to ../out/meta_ifs.csv
2022-11-25 02:03:33,141 - root - INFO - self.meta_df.shape = (3, 3)
2022-11-25 02:03:33,143 - root - INFO - Output meta data of IFS containing 'gross Domestic Product, Real' table to ../out/meta_gross Domestic Product, Real_CA_RU_Q_1970_2022.csv
2022-11-25 02:04:33,893 - root - INFO - self.data_df.shape = (361, 5)
2022-11-25 02:04:33,904 - root - INFO - Output data of IFS containing 'gross Domestic Product, Real' table to ../out/data_gross Domestic Product, Real_CA_RU_Q_1970_2022.csv
| Description | Country | Period | Value | ID | |
|---|---|---|---|---|---|
| 286 | Gross Domestic Product, Real, Unadjusted, Dome... | RU | 2003-01-01 | 12950180.3 | NGDP_R_NSA_XDC |
| 287 | Gross Domestic Product, Real, Unadjusted, Dome... | RU | 2003-04-01 | 13906392.6 | NGDP_R_NSA_XDC |
| 288 | Gross Domestic Product, Real, Unadjusted, Dome... | RU | 2003-07-01 | 15267819.4 | NGDP_R_NSA_XDC |
| 289 | Gross Domestic Product, Real, Unadjusted, Dome... | RU | 2003-10-01 | 15661990.5 | NGDP_R_NSA_XDC |
| 290 | Gross Domestic Product, Real, Unadjusted, Dome... | RU | 2004-01-01 | 13887920.9 | NGDP_R_NSA_XDC |
| ... | ... | ... | ... | ... | ... |
| 281 | Gross Domestic Product, Real, Seasonally Adjus... | RU | 2020-07-01 | 22253279.9 | NGDP_R_SA_XDC |
| 282 | Gross Domestic Product, Real, Seasonally Adjus... | RU | 2020-10-01 | 22417897 | NGDP_R_SA_XDC |
| 283 | Gross Domestic Product, Real, Seasonally Adjus... | RU | 2021-01-01 | 22570515.7 | NGDP_R_SA_XDC |
| 284 | Gross Domestic Product, Real, Seasonally Adjus... | RU | 2021-04-01 | 23290725.9 | NGDP_R_SA_XDC |
| 285 | Gross Domestic Product, Real, Seasonally Adjus... | RU | 2021-07-01 | 23105679.7 | NGDP_R_SA_XDC |
361 rows × 5 columns
bop = BOP(search_terms=["current account, total, credit"], countries=["US"], period='Q',
start_date="2000", end_date="2022")
df = bop.download_data()
2022-11-25 02:07:43,545 - root - INFO - countries_str = 'US', self.start_date = '2000', self.end_date = '2022'
2022-11-25 02:07:44,079 - root - INFO - Output all IMF series table to ../out/series_imf.csv
2022-11-25 02:07:44,108 - root - INFO - Output series containing 'BOP' table to ../out/series_bop.csv
2022-11-25 02:08:10,200 - root - WARNING - Failed to download CL_FREQ.
2022-11-25 02:08:12,137 - root - INFO - Output dimension CL_AREA_BOP table to ../out/dim_cl_area_bop.csv
2022-11-25 02:08:12,169 - root - INFO - Output dimension CL_INDICATOR_BOP table to ../out/dim_cl_indicator_bop.csv
2022-11-25 02:08:13,664 - root - INFO - Output meta data of BOP table to ../out/meta_bop.csv
2022-11-25 02:08:13,680 - root - INFO - self.meta_df.shape = (6, 3)
2022-11-25 02:08:13,682 - root - INFO - Output meta data of BOP containing 'current account, total, credit' table to ../out/meta_current account, total, credit_US_Q_2000_2022.csv
2022-11-25 02:08:43,021 - root - INFO - self.data_df.shape = (90, 5)
2022-11-25 02:08:43,026 - root - INFO - Output data of BOP containing 'current account, total, credit' table to ../out/data_current account, total, credit_US_Q_2000_2022.csv
df
| Description | Country | Period | Value | ID | |
|---|---|---|---|---|---|
| 0 | Current Account, Total, Credit, US Dollars | US | 2000-01-01 | 353383 | BXCA_BP6_USD |
| 1 | Current Account, Total, Credit, US Dollars | US | 2000-04-01 | 374019 | BXCA_BP6_USD |
| 2 | Current Account, Total, Credit, US Dollars | US | 2000-07-01 | 375897 | BXCA_BP6_USD |
| 3 | Current Account, Total, Credit, US Dollars | US | 2000-10-01 | 382816 | BXCA_BP6_USD |
| 4 | Current Account, Total, Credit, US Dollars | US | 2001-01-01 | 362875 | BXCA_BP6_USD |
| ... | ... | ... | ... | ... | ... |
| 85 | Current Account, Total, Credit, US Dollars | US | 2021-04-01 | 930309 | BXCA_BP6_USD |
| 86 | Current Account, Total, Credit, US Dollars | US | 2021-07-01 | 946612 | BXCA_BP6_USD |
| 87 | Current Account, Total, Credit, US Dollars | US | 2021-10-01 | 1021657 | BXCA_BP6_USD |
| 88 | Current Account, Total, Credit, US Dollars | US | 2022-01-01 | 1005348 | BXCA_BP6_USD |
| 89 | Current Account, Total, Credit, US Dollars | US | 2022-04-01 | 1106396 | BXCA_BP6_USD |
90 rows × 5 columns
ifs = IFS(series="DOT", search_terms=["trade"], countries=["US"], period='Q', start_date="2000",
end_date="2022")
df = ifs.download_data()
df
ifs = IFS(series="BOP", search_terms=["current account, total, credit"], countries=["US"], period='Q',
start_date="2000", end_date="2022")
df = ifs.download_data()
df
ifs = IFS(series="GFSR", search_terms=["central government"], countries=["US"], period='A', start_date="2000", end_date="2022")
df = ifs.download_data()
df
ifs = IFS(series="FSI", search_terms=["Value of large exposures"], countries=["US"], period='A', start_date="2000", end_date="2022")
df = ifs.download_data()
df