The Global Macro Database (Python Package)
This package provides Python access to the Global Macro Database (GMD).
Installation
Install the latest published release from PyPI:
pip install global-macro-data
Install the latest code directly from GitHub:
pip install git+https://github.com/KMueller-Lab/Global-Macro-Database-Python.git
Install a specific Git ref from GitHub:
pip install git+https://github.com/KMueller-Lab/Global-Macro-Database-Python.git@<tag-or-commit>
Updating
Upgrade an existing PyPI install:
pip install --upgrade global-macro-data
Upgrade an existing GitHub install:
pip install --upgrade --force-reinstall git+https://github.com/KMueller-Lab/Global-Macro-Database-Python.git
Quick Start
from global_macro_data import gmd
# Latest dataset
full_df = gmd()
# Specific vintage
df = gmd(version="2025_12")
# Filter countries and variables
subset = gmd(
version="2025_12",
country=["USA", "CHN"],
variables=["rGDP", "infl", "unemp"],
)
# Raw source-level data for one variable
raw_rgdp = gmd(variables="rGDP", raw=True, version="2025_12")
# Load helper tables
varlist_df = gmd(vars="load")
country_df = gmd(country="load")
source_df = gmd(sources="load")
bib_df = gmd(cite="load")
# Print citations
gmd(cite="GMD")
gmd(print_option="GMD")
API Reference
The gmd() function supports the following options:
| Parameter | Values | Description |
|---|---|---|
version |
"YYYY_MM", "current", "list" |
Select data vintage |
country |
ISO3 code(s), "load", "list" |
Filter by country |
variables |
Variable code(s) | Select specific variables |
raw |
True / False |
Load raw source-level data |
vars |
"load", "list" |
Load or display variable definitions |
sources |
Source name, "load", "list" |
Query specific data sources |
cite |
Source key, "load" |
Retrieve BibTeX citations |
print_option |
"GMD", "Stata" |
Print APA-style citations |
fast |
"yes" or True |
Cache data locally for faster reloading |
network |
"yes" |
Override network detection |
Helper functions are also available:
get_available_versions()-- list all data vintagesget_current_version()-- get the latest version stringlist_variables()-- print the variable tablelist_countries()-- print the country table
Citation
When using the Global Macro Database, please cite:
@techreport{mueller2025global,
title = {The Global Macro Database: A New International Macroeconomic Dataset},
author = {M{\"u}ller, Karsten and Xu, Chenzi and Lehbib, Mohamed and Chen, Ziliang},
year = {2025},
institution = {National Bureau of Economic Research},
type = {Working Paper},
number = {33714}
}
Release files for global-macro-data 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| global_macro_data-2.0.0.tar.gz | 43.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| global_macro_data-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.6 kB
Release files / global_macro_data-2.0.0.tar.gz
| Download URL | global_macro_data-2.0.0.tar.gz |
|---|---|
| Size | 43.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89b099538d5437eeb6d382814a17bfc536ba3a93ef39c06489c38b7e36833054
|
|
BLAKE2b-256 checksum How to use checksums |
20c55e93cd00ca18bd078a07a40253867f2e700f818a85faa4f8c536b12ebbc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|
Release files / global_macro_data-2.0.0-py3-none-any.whl
| Download URL | global_macro_data-2.0.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23592c8e3b0d0760a7fdc48ebc550439e70dbcf8a4746cfaf87715a5d0f57fed
|
|
BLAKE2b-256 checksum How to use checksums |
c0486e53b14b39ca6212fe867dd3e44f0dbfee057c7143dbeaa89b91b1fc6508
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|