datacommons-client

Query Data Commons observations and resolve DCIDs via Python client.

6|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/pur3v4d3r/pur3-pkb-codebase --skill datacommons-client-pur3v4d3r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: datacommons-client
Source: https://github.com/pur3v4d3r/pur3-pkb-codebase/tree/main/.claude/skills/__scientific-skills/datacommons-client
Command: npx skills add https://github.com/pur3v4d3r/pur3-pkb-codebase --skill datacommons-client-pur3v4d3r

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Data scientists and developers often need a reliable, programmatic way to access public statistics and the Data Commons knowledge graph. This skill provides a Python client to resolve DCIDs, query observations, and explore the knowledge graph, enabling faster, reproducible analyses across demographic, economic, health, and environmental data.

Core Features & Use Cases

  • Resolve DCIDs from human-readable names, Wikidata IDs, or coordinates.
  • Query observations and time-series data for multiple variables and entities.
  • Explore entity relationships and metadata using the Node API for graph navigation.
  • Integrate with Pandas to convert results into DataFrames for analysis.

Quick Start

Install the datacommons-client package, initialize DataCommonsClient, and perform a simple resolve followed by an observation query.

Frequently Asked Questions about datacommons-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Data Commons observations using Python?

You can query Data Commons observations using Python by initializing the DataCommonsClient to access the knowledge graph, resolving entity DCIDs, and retrieving time-series data for your target variables. The client integrates with Pandas to convert observation results into DataFrames for analysis.

Can I resolve entity DCIDs from names or coordinates in a knowledge graph?

Yes, entity resolution in the knowledge graph supports resolving DCIDs from human-readable names, Wikidata IDs, or geographic coordinates. This allows you to map ambiguous inputs to precise Data Commons identifiers before querying demographic, economic, health, or environmental observations.

What's the best way to explore relationships in the Data Commons knowledge graph?

Exploring relationships in the Data Commons knowledge graph is best achieved using the Node API for graph navigation. This approach lets you traverse entity metadata and discover connections between demographic, economic, health, and environmental datasets programmatically.

Does the Data Commons client work with Pandas for data analysis?

Yes, the Data Commons client works with Pandas by converting queried observations and time-series data directly into DataFrames. This integration enables reproducible analyses and visualization across public statistics without manual data structuring.

What demographic and economic data can I access through Data Commons?

Through Data Commons, you can access demographic, economic, health, and environmental datasets. The knowledge graph provides programmatic access to public statistics, allowing you to query observations and perform time-series analysis across multiple variables and entities.

How do I get time-series data for multiple variables in Data Commons?

To get time-series data for multiple variables in Data Commons, initialize the Python client and query observations across your resolved entity DCIDs. The workflow handles multiple variables and entities simultaneously, returning structured time-series data ready for Pandas integration.