Country Data Snapshot

Saves ~10 min12 credits

Fetches population and demographics data for a specified country, analyzes key trends, and generates a chart visualization of the results. No credentials or user accounts required.

firef1ie
by firef1ie
1 use1 remix
Step 1 of 5
Prompt1

Collect Target Country

Goal: Identify the target country for the data snapshot | Inputs: The user's message or request | Outputs: A single clearly identified country name to use in subsequent data queries. If the user did not specify a country, ask them which country they would like a data snapshot for before proceeding. | Constraints: Must resolve to exactly one country. If the user mentions multiple countries, ask them to pick one or run the workflow once per country. | Success criteria: A single country name is confirmed and ready to pass to the data query step

Tool2

Fetch Population Data

Query population data for the country identified in the previous step. Fetch key metrics including total population, growth rate, age structure, and urban/rural split. Set country_or_region to the country name from the collect step.

Fetch Population Data
Prompt3

Analyze Demographics

Goal: Analyze the population data and extract key insights | Inputs: Raw population and demographics data from the previous tool call | Outputs: A structured analysis with: 1) Current population and growth rate, 2) Age distribution breakdown, 3) Urbanization trend, 4) Two notable observations. Also prepare a clean dataset suitable for chart generation with labels and values. | Constraints: Keep analysis concise and factual. Format chart data as simple label-value pairs. | Success criteria: Analysis includes at least 3 key metrics and chart-ready data is clearly structured

Workflow preview

What the agent will follow (tools, prompts, and workflow steps).

1. Apply the following prompt: Goal:
Identify the target country for the data snapshot

Inputs:
The user's message or request

Outputs:
A single clearly identified country name to use in subsequent data queries. If the user did not specify a country, ask them which country they would like a data snapshot for before proceeding.

Constraints:
Must resolve to exactly one country. If the user mentions multiple countries, ask them to pick one or run the workflow once per country.

Success criteria:
A single country name is confirmed and ready to pass to the data query step

2. Call tool: Global Population & Demographics Data (Fetch Population Data).

Instructions:
Query population data for the country identified in the previous step. Fetch key metrics including total population, growth rate, age structure, and urban/rural split. Set country_or_region to the country name from the collect step.

Parameters:
{"action": "query_population_data", "demographic_aspect": "all", "calculate_dependency_ratios": true, "include_urban_rural": true, "time_period": "latest"}

3. Apply the following prompt: Goal:
Analyze the population data and extract key insights

Inputs:
Raw population and demographics data from the previous tool call

Outputs:
A structured analysis with: 1) Current population and growth rate, 2) Age distribution breakdown, 3) Urbanization trend, 4) Two notable observations. Also prepare a clean dataset suitable for chart generation with labels and values.

Constraints:
Keep analysis concise and factual. Format chart data as simple label-value pairs.

Success criteria:
Analysis includes at least 3 key metrics and chart-ready data is clearly structured

4. Call tool: Chart Generator (Create Demographics Chart).

Instructions:
Using the structured data from the analysis step, create a bar or pie chart that visualizes the key demographic breakdown (e.g., age distribution or urban vs rural population). Use a clean, professional style.

Parameters:
{}

5. Apply the following prompt: Goal:
Combine the analysis and chart into a final country data snapshot

Inputs:
The demographic analysis and the generated chart image/URL from previous steps

Outputs:
A complete country data snapshot report including the key findings, the chart visualization, and a brief conclusion

Constraints:
Present the information in a clear, readable format. Include the chart image in the response.

Success criteria:
The final output is a cohesive snapshot that a user can immediately understand

Agent Reviews