Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The general research playbook

Normal statistical research for one or more specified places: discover candidate indicators, assess metadata and provenance, then retrieve observations. Start here.

This is the data-commons-researcher skill exactly as the server serves it to AI clients — the operating rules a client is expected to follow when it uses the tools.

Foundational Knowledge: Data Commons Graph Structure

Data Commons organizes data into two main structural hierarchies. Understanding these is key to choosing your place names and variables:

  1. Topics (Variable Hierarchy): A taxonomy of categories (e.g., Health -> Clinical Data -> Medical Conditions). Topics contain sub-topics and individual variables.

  2. Places (Geographic Hierarchy): A taxonomy of spatial containment (e.g., World -> Continent -> Country -> State -> County).

Data Availability & Efficiency Tips:


1. The Three-Step Tool Pipeline

When researching statistics for specific places, always separate your work into three distinct phases to avoid context bloat:

  1. Discovery (search_indicators): Use this to find candidate variables matching the user’s concept.

  2. Assessment (get_variable_metadata): Pass candidate variables and target locations to retrieve structural metadata, ensuring the dataset matches the required temporal range, granularity, and source trust.

  3. Retrieval (get_observations): Fetch the actual timeseries arrays once the variables and facets have been qualified.

CRITICAL: Always validate variable-place combinations first

Multi-Entity Discovery Routing Hook

After calling search_indicators or get_variable_metadata, inspect the observation_properties list on candidate variables:


2. Discovery Heuristics: Concept Splitting & Parameter Tuning

To ensure focused and accurate candidate retrieval when calling search_indicators:

A. Concept Extraction & Multi-Query Splitting

B. Parameter Configuration Guidelines


3. Geographic Place Qualification & Fallback Recovery

Data Commons requires qualified geographic names to avoid database name conflicts.

A. Core Qualification Rules

B. Vague & Unqualified Query Fallbacks

C. Geographic Resolution Recovery (Troubleshooting)


4. Playbook Recipes & Call Examples

Recipe 1: Data for a Specific Place

Recipe 2: No Place Filtering


5. Processing search_indicators Responses

Always treat results as candidates. You must filter, rank, and verify them based on the user’s full context.

A. Response Structure Reference

{
  "topics": [
    {
      "dcid": "dc/t/TopicDcid",
      "memberTopics": ["dc/t/SubTopic1", "..."],
      "memberVariables": ["dc/v/Variable1", "..."],
      "placesWithData": ["country/FRA", "..."]
    }
  ],
  "variables": [
    {
      "dcid": "dc/v/VariableDcid",
      "placesWithData": ["country/FRA", "country/CAN", "..."]
    }
  ],
  "dcidNameMappings": {
    "dc/t/TopicDcid": "Readable Topic Name",
    "dc/v/VariableDcid": "Readable Variable Name",
    "country/FRA": "France",
    "country/CAN": "Canada"
  },
  "status": "SUCCESS"
}

B. Field Mapping Rules


6. Processing get_variable_metadata Responses

Use this response to verify dataset coverage, date ranges, and sources before fetching observations.

A. Response Structure Reference

{
  "status": "SUCCESS",
  "variables": {
    "Count_Person": {
      "id": "Count_Person",
      "name": "Total population",
      "description": "The total number of people in a population.",
      "facets": [
        {
          "id": "2911625765",
          "provenanceId": "dc/base/France_Demographics",
          "obsCount": 35,
          "dateRange": { "start": "1991", "end": "2025" },
          "scope": { "entityCoverage": ["country/FRA"] }
        }
      ]
    }
  },
  "provenances": {
    "dc/base/France_Demographics": {
      "id": "dc/base/France_Demographics",
      "properties": {
        "source": "National Institute of Statistics and Economic Studies, France",
        "url": "https://www.insee.fr/en/statistiques/8333211"
      }
    }
  }
}

B. Field Mapping Rules


7. Bounded Date Query & Date Filtering Rules

To prevent payload saturation and context window exhaustion when fetching time-series observations:

A. Date Range Boundary Interpretations

When date="range" is used in get_observations, the date ranges are evaluated as follows:


8. Processing get_observations Responses

A. Response Structure Reference

{
  "variable": { "dcid": "Count_Person", "name": "Total population" },
  "placeObservations": [
    {
      "place": { "dcid": "country/FRA", "name": "France", "typeOf": ["Country"] },
      "timeSeries": [{ "date": "2025", "value": 68605616 }]
    }
  ],
  "sourceMetadata": { "sourceId": "2911625765", "provenanceUrl": "https://www.insee.fr" },
  "alternativeSources": []
}

B. Field Mapping Rules