API Access
Access dataset files directly from scripts, code, or AI agents.
Browse dataset files
API Access
Access dataset files directly from scripts, code, or AI agents.
Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.
Start with these files — they give you everything you need to understand and access the dataset.
- 1. Fetch datapackage.json to inspect schema and resources
- 2. Download data resources listed in datapackage.json
- 3. Read README.md for full context
Data Files
Explore with AIdata
| Field | Type | Description |
|---|---|---|
| LOCATION | string | Country code |
| TIME | year | Year of observation in the form YYYY |
| PC_HEALTHXP | number | % of Health spending |
| PC_GDP | number | % of GDP |
| USD_CAP | number | in USD per capita (using economy-wide PPPs) |
| TOTAL_SPEND | number | Total spending in millions of USD, calculated as USD_CAP multiplied by country population divided by 1,000,000 |
Download
Download CSVAbout
- Annual pharmaceutical drug spending per country, combining OECD expenditure data with UN population figures. Each row represents one country-year combination. TOTAL_SPEND is derived by multiplying USD_CAP by the country's population and dividing by 1,000,000.
- Last updated
- 9 February 2026
- Total rows
- ...
- Format
- CSV
- File size
- 51.2 kB
About this dataset
Pharmaceutical drug spending by country from 1971 to 2021, with indicators such as share of total health spending, spending in USD per capita (using economy-wide PPPs), and share of GDP. Also includes total spending in millions of USD per country per year.
Data
Data comes from Organisation for Economic Cooperation and Development on https://data.oecd.org/healthres/pharmaceutical-spending.htm
It consists of useful information about percent of health spending, percent of GDP and US dollars per capita for specific countries. Also, we added total spending by countries using their population data.
Population data comes from DataHub's http://datahub.io/core/population since it is regularly updated and includes all country codes.
Preparation
There are several steps have been done to get final data.
- We extracted separately each resource by "percent of health spending", "percent of GDP" and "US dollars per capita"
- We merged them into one resource and added new column "TOTAL_SPEND"
"TOTAL_SPEND" is calculated using "US dollars per capita" and "population" data (USD_CAP × population ÷ 1,000,000, rounded to 2 decimal places). Source for original pharmacy drug spending: https://stats.oecd.org/sdmx-json/data/DP_LIVE/.PHARMAEXP…/OECD?contentType=csv&detail=code&separator=comma&csv-lang=en.
Process is recorded and automated in python script:
# to get population.csv
python scripts/population.py
# to get final data.csv
python scripts/process.py
License
This dataset is licensed under the Open Data Commons Public Domain Dedication and Licence (PDDL) v1.0 (ODC-PDDL-1.0).