Skip to main content

Global Macro Database by Karsten Mueller, Chenzi Xu, Mohamed Lehbib and Ziliang Chen (2025)

Project description

The Global Macro Database (Python Package)

Website Badge

License: MIT

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 vintages
  • get_current_version() -- get the latest version string
  • list_variables() -- print the variable table
  • list_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}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

global_macro_data-2.0.0.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

global_macro_data-2.0.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file global_macro_data-2.0.0.tar.gz.

File metadata

  • Download URL: global_macro_data-2.0.0.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for global_macro_data-2.0.0.tar.gz
Algorithm Hash digest
SHA256 89b099538d5437eeb6d382814a17bfc536ba3a93ef39c06489c38b7e36833054
MD5 380a00a12c020629b7c4cbf2639c5f8f
BLAKE2b-256 20c55e93cd00ca18bd078a07a40253867f2e700f818a85faa4f8c536b12ebbc1

See more details on using hashes here.

File details

Details for the file global_macro_data-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for global_macro_data-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23592c8e3b0d0760a7fdc48ebc550439e70dbcf8a4746cfaf87715a5d0f57fed
MD5 8e1bc327dbbabeb0090251ea10a4cb0a
BLAKE2b-256 c0486e53b14b39ca6212fe867dd3e44f0dbfee057c7143dbeaa89b91b1fc6508

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page