datacommons-client

Query Data Commons v2 API for observations and entity resolution.

52|6|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/ovachiever/droid-tings --skill datacommons-client-ovachiever
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: datacommons-client
Source: https://github.com/ovachiever/droid-tings/tree/main/skills/datacommons-client
Command: npx skills add https://github.com/ovachiever/droid-tings --skill datacommons-client-ovachiever

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enables programmatic access to Data Commons' knowledge graph and observations for demographic, economic, health, and environmental data, reducing data wrangling time.

Core Features & Use Cases

  • Comprehensive Python API for Data Commons v2 (Observations, Node, Resolve)
  • Time-series queries, entity resolution, and knowledge graph exploration
  • Pandas integration for analysis and pivoting

Quick Start

Install the datacommons-client package and follow the Getting Started guide to resolve a place to a DCID, fetch observations, and convert results to a DataFrame for analysis.

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 to retrieve statistical observations for a specific place or time period?

Query Data Commons using the Observations endpoint to retrieve statistical data by specifying variables, entities, and date modes. The datacommons-client Python API handles API calls and returns results that you can convert to a Pandas DataFrame for analysis of demographic, economic, health, or environmental observations.

Can I resolve place names and coordinates to Data Commons identifiers (DCIDs) programmatically?

Yes, the Resolve endpoint converts place names, coordinates, and Wikidata identifiers into Data Commons entity identifiers (DCIDs). Once resolved, you can use these identifiers to query observations and explore the knowledge graph across geographic hierarchies and related entities.

What's the best way to perform time-series analysis on demographic or economic data from a public knowledge graph?

Use the datacommons-client to query observations across multiple time periods with the Observations endpoint, then pivot results into a Pandas DataFrame. This workflow supports time-series analysis and comparative queries across demographic, economic, health, and environmental datasets without manual data wrangling.

Does Data Commons integration work with Pandas for data analysis and transformation?

Yes, the datacommons-client supports native Pandas integration, allowing you to convert API responses directly into DataFrames. This enables seamless data pivoting, filtering, and analysis workflows within the Pandas ecosystem.

How do I explore relationships between entities in the Data Commons knowledge graph?

Use the Node endpoint with relation expressions to navigate the knowledge graph and retrieve connected entities and their properties. This supports exploration of place hierarchies, demographic associations, and cross-domain relationships across the knowledge graph.

What filtering options are available when querying Data Commons observations?

The datacommons-client supports facet filtering to narrow observations by specific dimensions and date modes—including latest observations or all historical data. Filter results before conversion to Pandas to optimize analysis scope and performance.