Updated

DataPressr — AI Agent Instructions

Distribution of wealth globally, drawn from the Credit Suisse Global Wealth Databook (2010–2022) and the UBS Global Wealth Report 2024 (2023 data). Covers the global wealth pyramid — how adults are distributed across four wealth bands (<$10k, $10k–$100k, $100k–$1M, >$1M) — and country-level statistics including mean wealth, median wealth, and total household wealth for 20 major economies.

API Access

Access dataset files directly from scripts, code, or AI agents.

Browse dataset files
Dataset Files

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.

/economic-history/global-wealth-distribution/
https://datahub.io/economic-history/global-wealth-distribution/_r/-/AGENTS.md
https://datahub.io/economic-history/global-wealth-distribution/_r/-/README.md
https://datahub.io/economic-history/global-wealth-distribution/_r/-/data/wealth-by-country.csv
https://datahub.io/economic-history/global-wealth-distribution/_r/-/data/wealth-distribution-global.csv
https://datahub.io/economic-history/global-wealth-distribution/_r/-/datapackage.json
https://datahub.io/economic-history/global-wealth-distribution/_r/-/process.py
Key Files

Start with these files — they give you everything you need to understand and access the dataset.

datapackage.jsonmetadata & schema
https://datahub.io/economic-history/global-wealth-distribution/_r/-/datapackage.json
README.mddocumentation
https://datahub.io/economic-history/global-wealth-distribution/_r/-/README.md
Typical Usage
  1. 1. Fetch datapackage.json to inspect schema and resources
  2. 2. Download data resources listed in datapackage.json
  3. 3. Read README.md for full context

Data Views

Data Previews

wealth-distribution-global

Loading data...

Schema

nametypedescription
yearintegerYear of observation
wealth_bandstringWealth band label (e.g. under $10k, $10k-$100k, $100k-$1M, over $1M)
lower_bound_usdnumberLower bound of the wealth band in USD (0 for the lowest band)
upper_bound_usdnumberUpper bound of the wealth band in USD (empty for the top band)
adults_millionsnumberNumber of adults in this wealth band (millions)
adults_share_pctnumberShare of global adult population in this wealth band (%)
wealth_usd_billionsnumberTotal wealth held by adults in this band (USD billions)
wealth_share_pctnumberShare of global private wealth held by this band (%)

wealth-by-country

Loading data...

Schema

nametypedescription
yearintegerYear of observation
countrystringCountry name
country_codestringISO 3166-1 alpha-3 country code
adults_millionsnumberAdult population (millions)
mean_wealth_usdnumberMean wealth per adult (USD)
median_wealth_usdnumberMedian wealth per adult (USD)
total_wealth_usd_billionsnumberTotal household wealth (USD billions)
gininumberWealth Gini coefficient (0–100 scale; higher = more unequal)

Data Files

FileDescriptionSizeLast modifiedDownload
wealth-distribution-global
Global wealth pyramid by wealth band, 2010–2023. Each row represents one wealth band for one year, showing the number of adults in that band, their share of the global adult population, the total wealth held, and its share of global private wealth.2.2 kBabout 1 month ago
wealth-distribution-global
wealth-by-country
Country-level wealth statistics for 20 major economies, 2023. Includes mean and median wealth per adult, total household wealth, adult population, and the wealth Gini coefficient.1.08 kBabout 1 month ago
wealth-by-country
FilesSizeFormatCreatedUpdatedLicenseSource
23.28 kBcsvabout 1 month agoOpen Data Commons Public Domain Dedication and LicenseCredit Suisse Research Institute — Global Wealth Databook 2016

DataPressr — AI Agent Instructions

You are helping wrangle raw data finds into clean, publishable datasets on DataHub.

Concepts

Data hierarchy

  • Catalog — a collection of datasets. Maps to one GitHub repo + one DataHub publication. Example: "World Bank Open Data", "Our World in Data".
  • Dataset — a coherent data concept with defined schema and coverage. One directory, one datapackage.json. Example: "World GDP 1960–2024".
  • Data file — a concrete file artifact (csv, json, parquet…). Listed as a resource in datapackage.json.

Catalog-as-repo rule: if the source is a portal or collection containing many datasets, give it its own repo and DataHub publication — not a subfolder inside another dataset.

Dataset lifecycle

A dataset doesn't need to be complete to be published. Lifecycle stages:

StageDescription
captureJust a URL or note — intent to explore
stubTitle, description, source link. No files yet. Publishable.
archivedRaw files downloaded locally
structuredCleaned, normalised, schema documented
enrichedAnalysis, visualisations, derived data added
monitoredLiving source, versioned and updated over time

Set "status": "<stage>" in datapackage.json to track this.


Dataset structure

Every dataset is a directory:

<name>/
  datapackage.json   # metadata and resource list (required)
  data/              # data files go here
  .datahubignore     # gitignore-style exclusions for dh push
  AGENTS.md          # this file (copy into new datasets)

datapackage.json

Minimal valid example:

{
  "name": "world-gdp",
  "title": "World GDP",
  "description": "GDP by country from World Bank, 1960–2024",
  "status": "structured",
  "resources": [
    {
      "path": "data/gdp.csv",
      "name": "gdp",
      "title": "GDP by Country",
      "mediatype": "text/csv"
    }
  ]
}

Rules:

  • name must be URL-safe: lowercase, hyphens only
  • Every file in data/ that should be published must be in resources
  • status should reflect the lifecycle stage above
  • Use .datahubignore to exclude scratch files, large intermediaries, raw downloads

Adding charts (views)

Add a views array to datapackage.json to render charts on the dataset page:

{
  "views": [
    {
      "name": "gdp-over-time",
      "title": "GDP Over Time",
      "specType": "simple",
      "resources": ["gdp"],
      "spec": {
        "type": "line",
        "group": "year",
        "series": ["gdp_usd"]
      }
    }
  ]
}

Supported chart types: line, bar, lines-and-points. Only CSV and GeoJSON resources can be visualised. group is the x-axis field, series is the list of y-axis fields.


Workflow

Start a new dataset

Create the directory structure:

mkdir -p <name>/data
cd <name>

Create datapackage.json with at minimum name, title, description. Add "status": "stub" if no data files yet.

Copy this AGENTS.md into the new directory so future AI sessions have context.

Push to DataHub

dh push .

Requires env vars:

export DATAHUB_API_URL=https://datahub.io
export DATAHUB_API_TOKEN=<your-token>
export DATAHUB_PUBLICATION=<your-publication-slug>

dh is the DataHub CLI — install from datopian/datahub-next.

Delete a dataset

dh delete <name>

Claude Code skills

If using Claude Code, the following slash commands are available in this repo:

CommandWhat it does
/init <name>Scaffold a new dataset directory
/pushPush current directory to DataHub
/validateCheck datapackage.json for common issues