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 child-places playbook

Statistics across the places contained within a parent geography — on this instance, the countries within the world, a continent, a UN region or another geographic grouping. The general playbook hands off here when a question spans the places contained in a parent geography.

This is the data-commons-child-places-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 across child places within a parent entity, always separate your work into three distinct phases to avoid context bloat:

  1. Discovery (search_child_indicators): Use this to find candidate variables matching the user’s concept that are available at the sub-national/child level.

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

  3. Retrieval (get_child_observations): Fetch the actual timeseries arrays across all child places of a specified type once the variables and facets have been qualified.

CRITICAL: Always validate variable-place combinations first

Multi-Entity Discovery Routing Hook

After calling search_child_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_child_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. Child Place Indicator Discovery Rule

C. Vague & Unqualified Query Fallbacks

D. Geographic Resolution Recovery (Troubleshooting)


4. Playbook Recipes & Call Examples

Recipe: Sampling Child Places & Containment Data


5. Processing search_child_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": ["geoId/06037", "..."]
    }
  ],
  "variables": [
    {
      "dcid": "dc/v/VariableDcid",
      "placesWithData": ["geoId/06037", "geoId/06075", "..."]
    }
  ],
  "dcidNameMappings": {
    "dc/t/TopicDcid": "Readable Topic Name",
    "dc/v/VariableDcid": "Readable Variable Name",
    "geoId/06037": "Los Angeles County, CA",
    "geoId/06075": "San Francisco County, CA"
  },
  "dcidPlaceTypeMappings": {
    "geoId/06037": ["County"],
    "geoId/06075": ["County"]
  },
  "status": "SUCCESS"
}

B. Field Mapping Rules


6. Processing get_variable_metadata Responses

Use this response to verify dataset coverage, date ranges, and sources for sampled child places before fetching full observation arrays.

A. Response Structure Reference

{
  "status": "SUCCESS",
  "variables": {
    "UnemploymentRate_Person": {
      "id": "UnemploymentRate_Person",
      "name": "Unemployment Rate",
      "facets": [
        {
          "id": "2176550201",
          "provenanceId": "dc/base/BLS_CP",
          "obsCount": 12,
          "dateRange": { "start": "2020", "end": "2024" },
          "scope": { "entityCoverage": ["geoId/06037"] }
        }
      ]
    }
  },
  "provenances": {
    "dc/base/BLS_CP": {
      "id": "dc/base/BLS_CP",
      "properties": {
        "source": "Bureau of Labor Statistics",
        "url": "https://www.bls.gov"
      }
    }
  }
}

B. Field Mapping Rules


7. Child Place Type Determination Heuristics

Before calling get_child_observations, inspect the dcidPlaceTypeMappings returned by search_child_indicators to determine the value for the child_place_type parameter:

  1. Common Type: Find the place type common to ALL sampled child places.

  2. Specific Type Priority: If multiple types are common to all child places, choose the most specific type (e.g., prefer "County" over "AdministrativeArea2").

  3. Majority Fallback: If no single type is common to all, use the type that maps to a clear majority (50%+ threshold) of the sample.

  4. Resolution Failure: If there is no common type and no majority type, child-place mode is not supported. Fall back to making individual get_observations calls in single-place mode for each child place using the base skill resource at ‘skill://data-commons-researcher/SKILL.md’.


8. Bounded Date Query & Date Filtering Rules

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

A. Child Places Mode Constraint

B. Date Range Boundary Interpretations

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


9. Processing get_child_observations Responses

A. Response Structure Reference

{
  "variable": { "dcid": "UnemploymentRate_Person", "name": "Unemployment Rate" },
  "resolvedParentPlace": { "dcid": "geoId/06", "name": "California", "typeOf": ["State"] },
  "childPlaceType": "County",
  "placeObservations": [
    {
      "place": { "dcid": "geoId/06037", "name": "Los Angeles County", "typeOf": ["County"] },
      "timeSeries": [{ "date": "2024", "value": 5.4 }]
    }
  ],
  "sourceMetadata": { "sourceId": "2176550201", "provenanceUrl": "https://www.bls.gov" },
  "alternativeSources": []
}

B. Field Mapping Rules