Guides

Python makes it easy to retrieve and analyze economic data. These tutorials show how to access data from major sources—IMF, BLS, and Census—using open-source libraries. Additional guides covering other economic data APIs are available in the econ_data/APIs section of my GitHub.

I recommend the miniconda distribution of Python, which includes Python, Conda (package manager), and pip. You can then install packages like NumPy, Pandas, and Jupyter with conda install.

Tutorials

IMF API tutorial

IMF API

Access international economic data from the International Monetary Fund (IMF). Covers GDP, trade, prices, and more for 190+ countries.

BEA API tutorial

BEA API

Retrieve national accounts data from the Bureau of Economic Analysis including GDP, consumer spending, and industry statistics.

BLS API tutorial

BLS API

Retrieve US labor statistics—employment, wages, prices—directly from the Bureau of Labor Statistics (BLS) API.

CPS microdata tutorial

CPS data

Read and analyze Current Population Survey microdata with Python. Build custom labor market statistics from household-level data.

Census API tutorial

Census API

Retrieve US economic indicators from the Census Bureau, including retail sales, international trade, construction, and manufacturing.

Treasury API tutorial

Treasury API

Access federal finance data including revenue, spending, and debt from the US Treasury Fiscal Data API.