alterlab-datacommons

alterlab-datacommons is a skill for Claude Code from AlterLab-IEU/AlterLab-Academic-Skills. It costs 81 tokens per session (2,159 once invoked), scanned A, a copy of datacommons-client, MIT.

A programming interface to Google Data Commons, a collection of public statistics from sources such as census and health agencies. It connects places and other entities to time-series data such as population, economic, health, and environmental measures.

In plain words
What is it for?
Use it to query and analyse public statistics for countries, regions, cities, and other entities. It supports demographic, economic, health, and environmental research.
Why use it?
It removes the need to collect comparable statistics from many separate sources and formats. It also helps identify the correct geographic entity and retrieve historical values.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the alterlab-databases plugin — 39 skills shipped together

Good fit Use it to query and analyse public statistics for countries, regions, cities, and other entities. It supports demographic, economic, health, and environmental research.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alterlab-ieu/alterlab-academic-skills/alterlab-datacommons
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AlterLab-IEU/AlterLab-Academic-Skills --skill alterlab-datacommons
Clone the repo
git clone --depth 1 https://github.com/AlterLab-IEU/AlterLab-Academic-Skills

Made for: Claude Code.

Or install alterlab-databases, the plugin that ships this one along with the rest of its 39 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for alterlab-datacommons

README.md
[![agentmods](https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-datacommons/github.svg)](https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-datacommons)
Your own site
<a href="https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-datacommons"><img src="https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-datacommons/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for alterlab-datacommons

Your own site · 80×15
<a href="https://agentmods.dev/skills/alterlab-ieu/alterlab-academic-skills/alterlab-datacommons"><img src="https://agentmods.dev/badge/skills/alterlab-ieu/alterlab-academic-skills/alterlab-datacommons.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,159 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 84% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.02159
Opus 5 $0.00041 $0.01079
Sonnet 5 $0.00016 $0.00432
Haiku 4.5 $0.00008 $0.00216

Measured 7d ago against content hash 188f2f69a046, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

alterlab-datacommons scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/query_datacommons.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

allowed-tools: Read WebFetch Bash(curl:*) Bash(python:*)
Origin

This is a copy

84% identical to datacommons-client — 69 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/databases/alterlab-datacommons/SKILL.md · 290 lines

How it starts

The opening of the file, as written. The whole thing — 290 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Data Commons Client

Overview

Provides comprehensive access to the Data Commons Python API v2 for querying statistical observations, exploring the knowledge graph, and resolving entity identifiers. Data Commons aggregates data from census bureaus, health organizations, environmental agencies, and other authoritative sources into a unified knowledge graph.

Verified against datacommons-client 2.x (the current major). This is the V2 client (package datacommons_client), not the legacy datacommons (V1) package — the two have different APIs; do not mix them.

Installation

Install the Data Commons V2 client with Pandas support (extra is lowercase pandas):

uv pip install "datacommons-client[pandas]"

For basic usage without Pandas:

uv pip install datacommons-client

Core Capabilities

The Data Commons API consists of three main endpoints, each detailed in dedicated reference files:

1. Observation Endpoint - Statistical Data Queries

Query time-series statistical data for entities. See references/observation.md for comprehensive documentation.

Primary use cases:

  • Retrieve population, economic, health, or environmental statistics
  • Access historical time-series data for trend analysis
  • Query data for hierarchies (all counties in a state, all countries in a region)
  • Compare statistics across multiple entities
  • Filter by data source for consistency

Common patterns:

from datacommons_client import DataCommonsClient

client = DataCommonsClient()

# Get latest population data
response = client.observation.fetch(
    variable_dcids=["Count_Person"],
    entity_dcids=["geoId/06"],  # California
    date="latest"
)

# Get time series
response = client.observation.fetch(
    variable_dcids=["UnemploymentRate_Person"],
    entity_dcids=["country/USA"],
    date="all"
)

# Query by hierarchy
response = client.observation.fetch(
    variable_dcids=["Median_Income_Household"],
    entity_expression="geoId/06<-containedInPlace+{typeOf:County}",
    date="2020"
)

Read the full file on GitHub · 290 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 290 lines · 81 tokens per session scan A 188f2f69a046

Subscribe to this mod's changes

alterlab-datacommons is a skill published in the GitHub repository AlterLab-IEU/AlterLab-Academic-Skills (66 stars, last pushed 6d ago), licensed MIT. It adds 81 tokens to every session and 2,159 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 84% identical to datacommons-client, differing in 69 lines, and is treated as a copy.

Related

Other skills, from other repositories

academic-slides

Create Beamer-inspired academic HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build slides for a conference talk, lecture, seminar, or thesis defense. Supports theorem environments, KaTeX equations, algorithm pseudocode, and citations. Helps academics discover their…

Nero1688/claude-academic-skills · 74 tokens

r-spss-syntax-architect

A guide for turning research hypotheses into repeatable R or SPSS code for statistical analysis. It covers panel data, where the same companies or other units are observed over time, as well as interaction effects, curves, and mediation.

Nero1688/claude-academic-skills · 406 tokens

ob-hrm-scale-adaptor

A guide for adapting organisational behaviour and human-resources survey scales across languages and cultures. It covers permission checks, translation and back-translation, expert review, participant interviews, and tests of whether groups interpret the scale comparably.

Nero1688/claude-academic-skills · 318 tokens

q1-journal-reviewer

A simulated anonymous review by a demanding business-research journal referee. It examines a complete paper for contribution, causal reasoning, robustness checks, mechanisms, and the difference between statistical and real-world importance.

Nero1688/claude-academic-skills · 353 tokens

tej-data-scout

A research-planning guide that checks whether a proposed study can use data from a database such as TEJ, Taiwan’s financial and economic data service. It breaks the topic into variables, finds likely data sections, checks coverage and frequency, and notes gaps that still need confirmation.

Nero1688/claude-academic-skills · 233 tokens

tej-data-wrangler

A data-cleaning workflow for raw TEJ files. TEJ, the Taiwan Economic Journal, provides financial and company data; this workflow turns its Excel or CSV downloads into analysis-ready panel data, where observations are tracked across companies and time.

Nero1688/claude-academic-skills · 293 tokens