search-charts
Our World In Data offers thousands of charts and related data on many important topics - from global population data, energy and electricity, economic data like GDP or poverty, health data like causes of death or prevalence of diseases, to data on democracy, violence and war. This skill describes how to effectively search for charts to either show visually or download the data for.
What this skill does
Searching for charts is done via an http request to
https://ourworldindata.org/api/search
Query parameters:
- `q` — search string (keyword-based, Algolia-powered)
- `hitsPerPage` — number of results per page (default: 20)
- `page` — page number, 0-indexed (default: 0)
The result is a json that adheres to this schema:
```typescript
export enum ChartRecordType {
Chart = "chart",
ExplorerView = "explorerView",
MultiDimView = "multiDimView",
}
export enum ExplorerType {
Grapher = "grapher",
Indicator = "indicator",
Csv = "csv",
}
type GrapherTabName = "LineChart" | "ScatterPlot" | "StackedArea" | "DiscreteBar" | "StackedDiscreteBar" | "SlopeChart" | "StackedBar" | "Marimekko" | "Table" | "WorldMap"
interface BaseSearchChartHit {
url: string
title: string
slug: string
availableEntities: string[]
originalAvailableEntities?: string[]
objectID: string
variantName?: string
subtitle?: string
availableTabs: GrapherTabName[]
}
type SearchChartViewHit = BaseSearchChartHit & {
type: ChartRecordType.Chart
}
type SearchExplorerViewHit = BaseSearchChartHit & {
type: ChartRecordType.ExplorerView
explorerType: ExplorerType
queryParams: string
}
type SearchMultiDimViewHit = BaseSearchChartHit & {
type: ChartRecordType.MultiDimView
queryParams: string
chartConfigId: string
}
export type SearchChartHit =
| SearchChartViewHit
| SearchExplorerViewHit
| SearchMultiDimViewHit
interface SearchResult {
query: string
results: SearchChartHit[]
nbHits: number
page: number
nbPages: number
hitsPerPage: number
}
```
The response json can be quite verbose, so don't pull the search results into your context window but instead use `jq` or a programming language to extract the information you need (often title, subtitle and url are the most relevant fields for any given hit).
Example - extract key fields from top 5 results:
```bash
curl -s "https://ourworldindata.org/api/search?q=life+expectancy&hitsPerPage=5" | jq '.results[] | {title, subtitle, url, availableTabs}'
```
## Search Tips
The search is a keyword based search operated by Algolia. The query param `q` is used to submit the search string. The vocabulary used at OWID is often following that of topic specialists, so search for "death rate malaria" instead of "people who died from malaria", or "literacy" instead of "people who can read".
Results are sorted by relevance - usually the first page of hits will contain the best results. If you get a large number of charts back, and the top charts don't seem to be ideal matches, try refining the search with additional terms. If you don't get any results, try a search with slightly different terms or synonyms.
It is often a good idea to communicate the top hits back to the user and either ask them which chart/data to proceed with or to pick the best but let them know the title of a few others that were also considered.
## Available Visualizations
The `availableTabs` field indicates what visualizations a chart supports. Use these mappings when constructing URLs:
| Tab Name (from API) | URL tab parameter | Description |
|---------------------|-------------------|-------------|
| `LineChart` | `line` | Time series line chart |
| `WorldMap` | `map` | Choropleth world map |
| `Table` | `table` | Data table view |
| `DiscreteBar` | `discrete-bar` | Bar chart |
| `SlopeChart` | `slope` | Slope chart comparing two time points |
| `Marimekko` | `marimekko` | Marimekko/mosaic chart |
| `ScatterPlot` | `scatter` | Scatter plot |
| `StackedArea` | `stacked-area` | Stacked area chart |
| `StackedBar` | `stacked-bar` | Stacked bar chart |
To display a specific visualization, append `?tab=<value>` to the chart URL. For example:
```
https://ourworldindata.org/grapher/life-expectancy?tab=map
```
## Using Search Results
To fetch either the visual chart or the data, use the url property as is verbatim, including all query params. Consult the fetch-chart-image or fetch-chart-data skills for more details on how best to request either one.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.