|
| 1 | +Metadata-Version: 2.4 |
| 2 | +Name: global-macro-data |
| 3 | +Version: 0.3.1 |
| 4 | +Summary: Global Macro Database by Karsten Müller, Chenzi Xu, Mohamed Lehbib and Ziliang Chen (2025) |
| 5 | +Home-page: https://github.com/KMueller-Lab/Global-Macro-Database-Python |
| 6 | +Author: Yangbo Wang |
| 7 | +Author-email: wangyangbo@ruc.edu.cn |
| 8 | +Classifier: Programming Language :: Python :: 3 |
| 9 | +Classifier: License :: OSI Approved :: MIT License |
| 10 | +Classifier: Operating System :: OS Independent |
| 11 | +Requires-Python: >=3.6 |
| 12 | +Description-Content-Type: text/markdown |
| 13 | +Requires-Dist: requests |
| 14 | +Requires-Dist: pandas |
| 15 | +Dynamic: author |
| 16 | +Dynamic: author-email |
| 17 | +Dynamic: classifier |
| 18 | +Dynamic: description |
| 19 | +Dynamic: description-content-type |
| 20 | +Dynamic: home-page |
| 21 | +Dynamic: requires-dist |
| 22 | +Dynamic: requires-python |
| 23 | +Dynamic: summary |
| 24 | + |
| 25 | +# The Global Macro Database (Python Package) |
| 26 | +<a href="https://www.globalmacrodata.com" target="_blank" rel="noopener noreferrer"> |
| 27 | + <img src="https://img.shields.io/badge/Website-Visit-blue?style=flat&logo=google-chrome" alt="Website Badge"> |
| 28 | +</a> |
| 29 | + |
| 30 | +[](LICENSE) |
| 31 | + |
| 32 | +[Link to paper 📄](https://www.globalmacrodata.com/research-paper.html) |
| 33 | + |
| 34 | +This repository complements paper, **Müller, Xu, Lehbib, and Chen (2025)**, which introduces a panel dataset of **46 macroeconomic variables across 243 countries** from historical records beginning in the year **1086** until **2024**, including projections through the year **2030**. |
| 35 | + |
| 36 | +## Features |
| 37 | + |
| 38 | +- **Unparalleled Coverage**: Combines data from **32 contemporary sources** (e.g., IMF, World Bank, OECD) with **78 historical datasets**. |
| 39 | +- **Extensive Variables**: GDP, inflation, government finance, trade, employment, interest rates, and more. |
| 40 | +- **Harmonized Data**: Resolves inconsistencies and splices all available data together. |
| 41 | +- **Scheduled Updates**: Regular releases ensure data reliability. |
| 42 | +- **Full Transparency**: All code is open source and available in this repository. |
| 43 | +- **Accessible Formats**: Provided in `.dta`, `.csv` and as **<a href="https://github.com/KMueller-Lab/Global-Macro-Database" target="_blank" rel="noopener noreferrer">Stata</a> |
| 44 | +/<a href="https://github.com/KMueller-Lab/Global-Macro-Database-Python" target="_blank" rel="noopener noreferrer">Python</a>/<a href="https://github.com/KMueller-Lab/Global-Macro-Database-R" target="_blank" rel="noopener noreferrer">R</a> package**. |
| 45 | + |
| 46 | +## Data access |
| 47 | + |
| 48 | +<a href="https://www.globalmacrodata.com/data.html" target="_blank" rel="noopener noreferrer">Download via website</a> |
| 49 | + |
| 50 | +**Python package:** |
| 51 | +``` |
| 52 | +pip install global_macro_data |
| 53 | +``` |
| 54 | + |
| 55 | +**How to use (examples)** |
| 56 | +```python |
| 57 | +from global_macro_data import gmd |
| 58 | + |
| 59 | +# Get data from latest available version |
| 60 | +df = gmd() |
| 61 | + |
| 62 | +# Get data from a specific version |
| 63 | +df = gmd(version="2025_01") |
| 64 | + |
| 65 | +# Get data for a specific country |
| 66 | +df = gmd(country="USA") |
| 67 | + |
| 68 | +# Get data for multiple countries |
| 69 | +df = gmd(country=["USA", "CHN", "DEU"]) |
| 70 | + |
| 71 | +# Get specific variables |
| 72 | +df = gmd(variables=["rGDP", "infl", "unemp"]) |
| 73 | + |
| 74 | +# Get raw data for a single variable |
| 75 | +df = gmd(variables="rGDP", raw=True) |
| 76 | + |
| 77 | +# List available variables and their descriptions |
| 78 | +gmd(vars=True) |
| 79 | + |
| 80 | +# List available countries and their ISO codes |
| 81 | +gmd(iso=True) |
| 82 | + |
| 83 | +# Combine parameters |
| 84 | +df = gmd( |
| 85 | + version="2025_01", |
| 86 | + country=["USA", "CHN"], |
| 87 | + variables=["rGDP", "unemp", "CPI"] |
| 88 | +) |
| 89 | +``` |
| 90 | + |
| 91 | +## Parameters |
| 92 | +- **variables (str or list)**: Variable code(s) to include (e.g., "rGDP" or ["rGDP", "unemp"]) |
| 93 | +- **country (str or list)**: ISO3 country code(s) (e.g., "SGP" or ["MRT", "SGP"]) |
| 94 | +- **version (str)**: Dataset version in format 'YYYY_MM' (e.g., '2025_01'). If None or "current", uses the latest version |
| 95 | +- **raw (bool)**: If True, download raw data for a single variable |
| 96 | +- **iso (bool)**: If True, display list of available countries |
| 97 | +- **vars (bool)**: If True, display list of available variables |
| 98 | + |
| 99 | +## Release schedule |
| 100 | +| Release Date | Details | |
| 101 | +|--------------|-----------------| |
| 102 | +| 2025-01-30 | Initial release: 2025_01 | |
| 103 | +| 2025-04-01 | 2025_03 | |
| 104 | +| 2025-07-01 | 2025_06 | |
| 105 | +| 2025-10-01 | 2025_09 | |
| 106 | +| 2026-01-01 | 2025_12 | |
| 107 | + |
| 108 | +## Citation |
| 109 | + |
| 110 | +To cite this dataset, please use the following reference: |
| 111 | + |
| 112 | +```bibtex |
| 113 | +@techreport{mueller2025global, |
| 114 | + title = {The Global Macro Database: A New International Macroeconomic Dataset}, |
| 115 | + author = {Müller, Karsten and Xu, Chenzi and Lehbib, Mohamed and Chen, Ziliang}, |
| 116 | + year = {2025}, |
| 117 | + type = {Working Paper} |
| 118 | +} |
| 119 | +``` |
| 120 | + |
| 121 | +## Acknowledgments |
| 122 | + |
| 123 | +The development of the Global Macro Database would not have been possible without the generous funding provided by the Singapore Ministry of Education (MOE) through the PYP grants (WBS A-0003319-01-00 and A-0003319-02-00), a Tier 1 grant (A-8001749- 00-00), and the NUS Risk Management Institute (A-8002360-00-00). This financial support laid the foundation for the successful completion of this extensive project. |
0 commit comments