The map needs country boundary shapes. Data apps fetch external data through external connections — a project admin registers the API once, and apps call it through a proxy that pins requests to the registered host.A great free source is the Natural Earth dataset mirrored on jsDelivr. Create a connection under Project Settings → Data app connections with:
Name - world_geojson (the name becomes the alias the app calls — keep it short and descriptive)
Content types - application/json and application/geo+json
Max response size - raise it to 8 MB. The world-countries file used below is ~0.8 MB, which brushes against the 1 MB default; higher-resolution files need more (see Troubleshooting).
In the connection’s Instructions field, tell the agent what lives there — this text is passed into the app-build sandbox:
Country and land shapes from the Natural Earth dataset. Fetch GeoJSON filesunder /gh/nvkelso/natural-earth-vector/geojson/, e.g.ne_110m_admin_0_countries.geojson for world country polygons. Features carryuseful properties: NAME, ADM0_A3 (ISO-3 code), CONTINENT, POP_EST, GDP_MD.
Finally, use the wizard’s Test step with the path /gh/nvkelso/natural-earth-vector/geojson/ne_110m_admin_0_countries.geojson and Save as sample — the generator then knows the exact response shape when it builds your app.
Any HTTPS API an admin registers works the same way:
Your own storage - host simplified GeoJSON for your sales regions, store catchment areas, or delivery zones on S3/GCS/your CDN, and register that origin.
Open-data APIs - many government portals serve boundaries as GeoJSON (e.g. census, postcode, or administrative-area APIs).
No connection at all - for small, stable shapes you can ask the agent to inline a simplified GeoJSON directly into the app source. No network, no connection to manage — best under a few hundred KB.
Prefer GeoJSON over TopoJSON sources. TopoJSON is smaller on the wire, but decoding it needs the topojson-client package, which isn’t available in the app sandbox. Natural Earth publishes plain GeoJSON, so no conversion is needed.
Create a new app with the Custom template. Describing the projection, the interactions, and the connection by name gets you most of the way in one prompt. This is the kind of prompt that produced the World Atlas app:
Build a "World Atlas" data explorer using the world_geojson connection.- A large interactive globe (d3 orthographic projection) that slowly auto-rotates and can be dragged to spin. Draw it from /gh/nvkelso/natural-earth-vector/geojson/ne_110m_admin_0_countries.geojson.- Color countries by a switchable metric — population, GDP, income group, continent — with a matching legend.- Clicking a country pauses the rotation and opens a side panel with its details.- Dark space theme with a subtle starfield. Aim for the polish of the d3 gallery on Observable.
Prompting tips for maps:
Name the projection. “Orthographic globe”, “Natural Earth projection”, “Mercator focused on Europe” — d3 supports them all, and naming one removes the guesswork.
Name the connection and the file path. The agent sees the connection’s instructions and samples, but spelling out the exact file avoids a wrong guess.
Describe the interactions — rotate, hover tooltips, click-to-select, metric switcher — as user-visible behavior.
Point at inspiration. The d3 gallery is a good shared vocabulary for the look you’re after.
When you create or iterate on the app, open the resource picker in the builder and link world_geojson. The link is what authorizes the app to call the connection at runtime — the prompt text alone doesn’t grant access.If the app calls a connection that isn’t linked, the fetch fails with:
This app is not linked to the requested connection
You can review and change an app’s linked connections from the same picker when iterating, without regenerating the app.Under the hood, the generated code fetches shapes like this:
You rarely write this by hand — but recognizing the shape helps you iterate with precise follow-up prompts (“slow the auto-rotation”, “thicken country borders on hover”).
The same mechanism works for any API. The World Atlas app links a second connection, weather (Base URL https://api.open-meteo.com, path /v1/forecast, no auth), and fetches a forecast when you click a country:
const res = await client.externalFetch('weather', { method: 'GET', path: '/v1/forecast', query: { latitude: '48.86', // query values must be strings longitude: '2.35', current: 'temperature_2m,weathercode', timezone: 'auto', },});
So far the colors come from properties baked into the GeoJSON. The real power move is coloring the map from your semantic layer — revenue by country, active users by region, on-time delivery by state — with the same permissions and access controls as everything else in your project.Ask for it in an iteration prompt:
Color the countries by total revenue from the orders explore instead ofpopulation. Join on the customer country ISO-3 code. Countries with norevenue stay gray.
The generated code runs a Lightdash query and joins it onto the features by country code:
import { query, useLightdash } from '@lightdash/query-sdk';const revenueByCountry = query('orders') .label('Revenue by country') .dimensions(['customers_country_code']) // ISO 3166-1 alpha-3 .metrics(['orders_total_revenue']) .limit(500);function Globe({ geo }) { const { data, loading, error, lineage } = useLightdash(revenueByCountry); const byCountry = useMemo( () => new Map( (data ?? []).map((row) => [ row.customers_country_code, row.orders_total_revenue, ]), ), [data], ); const color = d3 .scaleSequential(d3.interpolateBlues) .domain([0, d3.max([...byCountry.values()]) ?? 1]); const fillFor = (feature) => { const value = byCountry.get(feature.properties.ADM0_A3); return value != null ? color(value) : '#1a2535'; // gray = no data }; // Render the globe with fillFor, and spread {...lineage} on the // root element so the host's "Inspect data" can trace the query.}
Mind your join keys. A map only lights up where a row in your data matches a shape in the geo file. Pick a key that exists on both sides — country code, region code, postcode, admin ID — and make sure the format matches (ISO alpha-2 vs alpha-3, upper vs lower case, leading zeros). If your warehouse uses a different code than the geo file does, either translate it in the app or expose a matching dimension in your model.
Because the query runs through Lightdash, viewers only ever see data they’re allowed to see — a map in a data app respects user attributes and project permissions like any chart.
A globe is one projection swap away from a flat map. Useful iteration prompts:
“Make it a flat world map instead of a globe” → d3.geoNaturalEarth1()
“Focus the map on Europe only” → filter features, then fit the projection
// Flat world map, sized to the containerconst projection = d3.geoNaturalEarth1().fitSize([width, height], geo);// One region: filter the features, then fit the projection to themconst europe = { type: 'FeatureCollection', features: geo.features.filter((f) => f.properties.CONTINENT === 'Europe'),};const regional = d3.geoMercator().fitExtent( [[16, 16], [width - 16, height - 16]], europe,);
For sub-country maps, Natural Earth also publishes first-level admin areas (states and provinces) under the same connection path — ne_110m_admin_1_states_provinces.geojson, or the more detailed ne_50m_... variants (raise the connection’s max response size first).
This app is not linked to the requested connection - the app calls an alias that isn’t linked. Link the connection in the builder’s resource picker.
Fetch fails or the response is cut off - the GeoJSON is bigger than the connection’s max response size. The 110m world file is ~0.8 MB (fine at 8 MB); 50m is ~5 MB; 10m files are larger still. Raise the limit, or step down a resolution — 110m is plenty for a world view.
Countries missing or gray after a join - check the join key. Use ADM0_A3 (see the tip above), and make sure your dimension returns ISO alpha-3 codes.
The agent tried to fetch() a URL directly - direct network calls are blocked in the app sandbox. Data must come through externalFetch on a linked connection. If this happens, iterate with “use the world_geojson connection instead of fetching directly”.
No map tiles / basemap imagery - tile servers are blocked by the app’s content security policy, by design. d3’s SVG projections don’t need them. For a tile-based scatter or choropleth on a dashboard, use the core Map chart instead.
Fonts look different than expected - external stylesheets (e.g. Google Fonts) are also blocked by the content security policy; the app falls back to system fonts. Ask for system fonts in your prompt to avoid the console noise.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Lightdash","colors":{"primary":"#8072ff","light":"#8072ff","dark":"#8072ff"},"logo":{"light":"https://mintcdn.com/lightdash/NAoHiyWrKI0dLTGZ/logo/light.svg?fit=max\u0026auto=format\u0026n=NAoHiyWrKI0dLTGZ\u0026q=85\u0026s=4b91c8292b732e3daca7558549cf018c","dark":"https://mintcdn.com/lightdash/NAoHiyWrKI0dLTGZ/logo/dark.svg?fit=max\u0026auto=format\u0026n=NAoHiyWrKI0dLTGZ\u0026q=85\u0026s=c15813eedf4ff7a28709d8c163765fd1","href":"https://lightdash.com/"},"favicon":"https://mintcdn.com/lightdash/fPTXVBgl8dEzSm3L/favicon.png?fit=max\u0026auto=format\u0026n=fPTXVBgl8dEzSm3L\u0026q=85\u0026s=ab889bc3b46d3db2eb20c3ff381c098a","api":{"playground":{"display":"simple"}},"appearance":{"default":"light"},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://www.lightdash.com/#","label":"Book a demo"},{"href":"https://app.lightdash.cloud/login","label":"Login"}],"primary":{"type":"button","label":"Start for free","href":"https://www.lightdash.com/start?utm_source=docs\u0026utm_medium=internal_cta\u0026utm_campaign=get_started"}},"footer":{"socials":{"github":"https://github.com/lightdash/lightdash","slack":"https://join.slack.com/t/lightdash-community/shared_invite/zt-3pbwqmq5e-vhTc7HHcS787w618ngoPHA","linkedin":"https://www.linkedin.com/company/lightdash","x":"https://x.com/lightdash_devs"},"links":[{"header":"Lightdash","items":[{"label":"About us","href":"https://www.lightdash.com/about"},{"label":"Community","href":"https://join.slack.com/t/lightdash-community/shared_invite/zt-3pbwqmq5e-vhTc7HHcS787w618ngoPHA"},{"label":"Blog","href":"https://www.lightdash.com/blog"}]}]},"seo":{"indexing":"all"},"fonts":{"heading":{"family":"Space Grotesk","weight":600,"source":"https://fonts.gstatic.com/s/spacegrotesk/v16/V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2","format":"woff2"}},"icons":{"library":"tabler"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lightdash","hasAudioNarration":false,"actualSubdomain":"lightdash","customDomains":["docs.lightdash.com"],"gitSource":{"type":"github","owner":"lightdash","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"issues":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aef6c43552e9ea17aa800a4","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API","count":877},{"language":"default","tag":"Reference","count":873},{"language":"default","tag":"Docs","count":211},{"language":"default","tag":"API Reference","count":189},{"language":"default","tag":"Projects","count":146},{"language":"default","tag":"v2","count":128},{"language":"default","tag":"Organizations","count":76},{"language":"default","tag":"Integrations","count":44},{"language":"default","tag":"Explore","count":35},{"language":"default","tag":"My Account","count":31}],"searchSettings":{"maxResults":10}},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"type":"email","email":"support@lightdash.com","showHelpButton":false}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"#navigation-items>ul.sidebar-group{margin-top:12px}.feature-badges{display:flex;flex-wrap:wrap;align-items:center;gap:0.375rem;margin:1rem 0;font-size:0.8125rem}.feature-badges:first-child{margin-top:0}#content>.callout:first-child{margin-top:0}.feature-badge-link{display:inline-flex;align-items:center;vertical-align:middle;border:0;border-radius:9999px;text-decoration:none!important;background-image:none!important}.feature-badge-link:hover [data-badge]{background-color:color-mix(in srgb, var(--color-text) 20%, transparent);box-shadow:0 0 0 1px var(--color-text)}.feature-badge-link:active [data-badge]{background-color:color-mix(in srgb, var(--color-text) 35%, transparent);box-shadow:inset 0 0 0 2px var(--color-text);transform:translateY(1px)}.feature-badge-link:focus-visible{outline:2px solid currentColor;outline-offset:3px}.sticky-first-col{overflow-x:auto;position:relative;max-width:100%}.sticky-first-col table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}.sticky-first-col table th:first-child,.sticky-first-col table td:first-child{position:sticky;left:0;z-index:1;min-width:260px;max-width:320px;white-space:normal;background-color:#ffffff;box-shadow:inset -1px 0 0 0 rgba(0, 0, 0, 0.08)}.sticky-first-col table thead th:first-child{z-index:2}html.dark .sticky-first-col table th:first-child,html.dark .sticky-first-col table td:first-child{background-color:#0b0b0f;box-shadow:inset -1px 0 0 0 rgba(255, 255, 255, 0.1)}svg.matrix-no{background-color:#d9d5f0}html.dark svg.matrix-no{background-color:#2e2947}.copy-prompt{margin:1.5rem 0}.copy-prompt-btn{display:inline-flex;align-items:center;gap:0.75rem;padding:0.75rem 1.375rem;border:none;border-radius:9999px;background-color:#8072ff;color:#ffffff;font-size:0.875rem;font-weight:500;line-height:1.25rem;cursor:pointer;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08);transition:background-color 150ms ease}.copy-prompt-btn:hover{background-color:#6c5df2}.copy-prompt-btn:focus-visible{outline:2px solid #8072ff;outline-offset:2px}.copy-prompt-label{font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}.copy-prompt-icons{display:inline-flex;align-items:center;gap:0.3125rem}.copy-prompt-icons svg{width:1.25rem;height:1.25rem;flex:none;transition:transform 300ms ease-out}.copy-prompt-icons svg:nth-child(1){transform:rotate(-6deg)}.copy-prompt-icons svg:nth-child(4){transform:rotate(6deg)}.copy-prompt-btn:hover .copy-prompt-icons svg:nth-child(1){transform:translateX(-4px) rotate(-12deg)}.copy-prompt-btn:hover .copy-prompt-icons svg:nth-child(2){transform:translate(-1px, -1px) rotate(6deg) scale(1.1)}.copy-prompt-btn:hover .copy-prompt-icons svg:nth-child(3){transform:translate(1px, 2px) rotate(-6deg) scale(1.1)}.copy-prompt-btn:hover .copy-prompt-icons svg:nth-child(4){transform:translateX(4px) rotate(12deg)}.copy-prompt-preview{margin:0.625rem 0 0 0.25rem;font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size:0.8125rem;color:#9ca3af;opacity:0;transform:translateY(4px);transition:opacity 200ms ease,\n transform 200ms ease}html.dark .copy-prompt-preview{color:#6b7280}.copy-prompt-preview.is-copied{color:#5747cf}html.dark .copy-prompt-preview.is-copied{color:#cfc9ff}.copy-prompt:hover .copy-prompt-preview,.copy-prompt:has(.copy-prompt-btn:focus-visible) .copy-prompt-preview,.copy-prompt-preview.is-copied{opacity:1;transform:none}.copy-prompt-sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){.copy-prompt-icons svg,.copy-prompt-preview{transition:none}.copy-prompt-preview{transform:none}}.setup-path{--setup-path-line: #e2e2e8;--setup-path-surface: #f5f5f7;--setup-path-ground: #ffffff;--setup-path-ink: #16151d;--setup-path-muted: #5d5c69;--setup-path-faint: #8b8a97;--setup-path-accent: #8072ff;display:grid;gap:1rem;justify-items:start;margin:1.5rem 0;color:var(--setup-path-ink);font-size:1rem;line-height:1.55}html.dark .setup-path{--setup-path-line: #2d2d38;--setup-path-surface: #1b1b22;--setup-path-ground: #0f0f14;--setup-path-ink: #efeff3;--setup-path-muted: #a5a5b2;--setup-path-faint: #777784}.setup-path p{margin:0}.setup-path ol{list-style:none;margin:0;padding:0}.setup-path svg{display:block;flex:none}.setup-path button{font-family:inherit;color:inherit;cursor:pointer}.setup-path-trunk{display:grid;width:100%}.setup-path-trunk>li{position:relative;display:grid;grid-template-columns:2.375rem minmax(0, 1fr);gap:1rem;padding:0 0 1.5rem;margin:0}.setup-path-trunk>li::before{content:\"\";position:absolute;left:calc(1.1875rem - 1px);top:2.375rem;bottom:0;width:2px;background:var(--setup-path-line)}.setup-path-trunk>li.is-done::before{background:var(--setup-path-accent)}.setup-path-trunk>li.is-last{padding-bottom:0}.setup-path-trunk>li.is-last::before{display:none}.setup-path-tile{position:relative;z-index:1;display:grid;place-items:center;width:2.375rem;height:2.375rem;flex:none;border-radius:0.625rem;background:var(--setup-path-surface);transition:transform 180ms ease}.setup-path-tile.is-dark{background:#16151d}.setup-path-trunk>li.is-current>.setup-path-tile{background:var(--setup-path-ink);color:var(--setup-path-ground)}.setup-path-trunk>li.is-pending>.setup-path-tile{background:transparent;border:2px dashed var(--setup-path-line);color:var(--setup-path-faint)}.setup-path-node{display:grid;gap:0.75rem;min-width:0}.setup-path-question{display:flex;align-items:center;min-height:2.375rem;font-size:1.125rem;font-weight:600;line-height:1.3}.setup-path-answer{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:2.375rem}.setup-path-answer p{display:grid;min-width:0;line-height:1.3}.setup-path-answer p span{font-size:0.8125rem;color:var(--setup-path-muted)}.setup-path-answer p strong{font-weight:600}.setup-path-change{flex:none;padding:0.25rem 0.625rem;border:1px solid transparent;border-radius:0.5rem;background:none;font-size:0.875rem;font-weight:500;color:var(--setup-path-muted)!important}.setup-path-change:hover{border-color:var(--setup-path-line);color:var(--setup-path-ink)!important}.setup-path-leaves{display:flex;flex-wrap:wrap;gap:0.375rem;margin-top:-0.25rem}.setup-path-leaves a{display:inline-flex;align-items:center;gap:0.375rem;padding:0.1875rem 0.625rem;border-radius:0.5rem;background:var(--setup-path-surface);font-size:0.8125rem;color:inherit;text-decoration:none}.setup-path-leaves a:hover{text-decoration:underline}.setup-path-leaves svg,.setup-path-chevron{color:var(--setup-path-faint)}.setup-path-note{font-size:0.8125rem;color:var(--setup-path-muted)}.setup-path-note a,.setup-path-step-body a{color:var(--setup-path-ink);font-weight:600;text-decoration:underline;text-underline-offset:3px}.setup-path-pending{display:flex;align-items:center;min-height:2.375rem;font-size:0.9375rem;line-height:1.4;color:var(--setup-path-muted)}.setup-path-options{display:grid;grid-template-columns:repeat(var(--setup-path-columns), minmax(0, 1fr));gap:0.625rem}.setup-path-option{display:flex;align-items:center;gap:0.75rem;min-width:0;padding:0.75rem 0.875rem;border:1px solid var(--setup-path-line);border-radius:0.75rem;background:var(--setup-path-ground);text-align:left;transition:border-color 150ms ease,\n background 150ms ease}.setup-path-option:hover{border-color:var(--setup-path-faint)}.setup-path-option:hover .setup-path-tile{transform:scale(1.06)}.setup-path-option:focus-visible,.setup-path-change:focus-visible,.setup-path-ghost:focus-visible,.setup-path-phase li>button:focus-visible{outline:2px solid var(--setup-path-accent);outline-offset:2px}.setup-path-option[aria-checked=\"true\"]{border-color:var(--setup-path-ink);background:var(--setup-path-surface)}.setup-path-option[aria-checked=\"true\"] .setup-path-tile:not(.is-dark){background:var(--setup-path-ground)}.setup-path-option-text{display:grid;flex:1;gap:1px;min-width:0}.setup-path-option-title{display:flex;flex-wrap:wrap;align-items:center;gap:0.1875rem 0.5rem;font-size:0.9375rem;font-weight:600;line-height:1.3}.setup-path-option-hint{font-size:0.8125rem;line-height:1.4;color:var(--setup-path-muted)}.setup-path-tag{padding:1px 0.4375rem;border:1px solid var(--setup-path-line);border-radius:99px;font-size:0.6875rem;font-weight:600;color:var(--setup-path-muted);white-space:nowrap}.setup-path-radio{display:grid;place-items:center;width:1.125rem;height:1.125rem;flex:none;border:1.5px solid var(--setup-path-line);border-radius:50%;color:transparent;transition:background 150ms ease,\n border-color 150ms ease}.setup-path-option[aria-checked=\"true\"] .setup-path-radio{border-color:var(--setup-path-ink);background:var(--setup-path-ink);color:var(--setup-path-ground)}.setup-path-options.is-compact .setup-path-option{padding:0.5625rem 0.75rem}.setup-path-options.is-compact .setup-path-radio{display:none}.setup-path-options.is-compact .setup-path-option-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setup-path-ghost{display:inline-flex;align-items:center;gap:0.375rem;padding:0.375rem 0.75rem;border:1px solid var(--setup-path-line);border-radius:0.5rem;background:none;font-size:0.875rem;font-weight:500}.setup-path-ghost:hover{border-color:var(--setup-path-ink)}.setup-path-result{display:grid;gap:1rem;min-width:0}.setup-path-result-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0.5rem 1rem;min-height:2.375rem}.setup-path-result-title{font-size:1.125rem;font-weight:600}.setup-path-result-title span{margin-left:0.5rem;font-size:0.875rem;font-weight:500;color:var(--setup-path-muted)}.setup-path-phases{display:grid;border-top:1px solid var(--setup-path-line)}.setup-path-phase{display:grid;grid-template-columns:8rem minmax(0, 1fr);gap:0 1rem;padding:0.75rem 0;border-bottom:1px solid var(--setup-path-line)}.setup-path-phase-name{display:flex;align-items:center;align-self:start;gap:0.5rem;padding:0.4375rem 0;font-size:0.9375rem;font-weight:600}.setup-path-phase-name svg{color:var(--setup-path-muted)}.setup-path-phase li{margin:0;padding:0}.setup-path-phase li>button{display:flex;align-items:center;gap:0.75rem;width:100%;min-width:0;padding:0.4375rem 0.5rem;border:0;border-radius:0.5rem;background:none;text-align:left}.setup-path-phase li>button:hover{background:var(--setup-path-surface)}.setup-path-step-number{width:1.25rem;flex:none;font-size:0.8125rem;font-weight:600;font-variant-numeric:tabular-nums;color:var(--setup-path-faint)}.setup-path-step-title{flex:1;min-width:0;font-size:0.9375rem;font-weight:500}.setup-path-chevron{transition:transform 150ms ease}.setup-path-phase li.is-open .setup-path-chevron{transform:rotate(90deg)}.setup-path-step-body{display:grid;gap:0.375rem;justify-items:start;padding:0 0.5rem 0.625rem 2.5rem;font-size:0.875rem;color:var(--setup-path-muted)}.setup-path-step-body a{display:inline-flex;align-items:center;gap:0.3125rem}.setup-path-step-body>span{font-size:0.8125rem;color:var(--setup-path-faint)}@media (max-width: 640px){.setup-path-options{grid-template-columns:1fr}.setup-path-options.is-compact{grid-template-columns:repeat(2, minmax(0, 1fr))}.setup-path-phase{grid-template-columns:1fr;gap:0.25rem}}@media (prefers-reduced-motion: reduce){.setup-path-tile,.setup-path-option,.setup-path-radio,.setup-path-chevron{transition:none}}"},{"filePath":"sidebar-filter.css","content":".nav-filter{--filter-ink: rgb(var(--gray-700));--filter-muted: rgb(var(--gray-500));--filter-breadcrumb: rgb(var(--gray-600) / 0.8);--filter-border: rgb(var(--gray-200));--filter-surface: rgb(var(--background-light));--filter-hover: rgb(var(--gray-600) / 0.05);color:var(--filter-ink);margin-bottom:1rem;font-size:0.875rem;line-height:1.5}html.dark .nav-filter{--filter-ink: rgb(var(--gray-300));--filter-muted: rgb(var(--gray-400));--filter-breadcrumb: rgb(var(--gray-400) / 0.8);--filter-border: rgb(var(--gray-800));--filter-surface: rgb(var(--background-dark));--filter-hover: rgb(var(--gray-200) / 0.05)}.nav-filter-field{display:flex;align-items:center;gap:0.5rem;min-height:2.25rem;padding:0 0.625rem;border:1px solid var(--filter-border);border-radius:0.75rem;background:var(--filter-surface);transition:border-color 150ms ease, box-shadow 150ms ease}.nav-filter-field:focus-within{border-color:rgb(var(--primary));box-shadow:0 0 0 3px rgb(var(--primary) / 0.12)}.nav-filter svg{width:1rem;height:1rem;flex:none;color:var(--filter-muted)}.nav-filter input{width:100%;min-width:0;padding:0.5rem 0;font:inherit;color:inherit;background:transparent;border:0;outline:none}.nav-filter input::placeholder{color:var(--filter-muted)}.nav-filter button{display:grid;place-items:center;width:1.75rem;height:1.75rem;flex:none;border-radius:0.5rem;cursor:pointer}.nav-filter button:hover,.nav-filter-results a:hover{background:var(--filter-hover)}.nav-filter button:focus-visible,.nav-filter-results a:focus-visible{outline:2px solid rgb(var(--primary));outline-offset:2px}.nav-filter-status{padding:0.625rem 0.75rem 0;color:var(--filter-muted);font-size:0.75rem}.nav-filter-status:empty{display:none}.nav-filter-results{margin-top:0.5rem}.nav-filter-results ul{list-style:none;padding:0;margin:0}.nav-filter-results a{display:grid;gap:0.125rem;padding:0.5rem 0.75rem;border-radius:0.75rem;color:inherit;text-decoration:none}.nav-filter-results small{color:var(--filter-breadcrumb);font-size:0.75rem}.nav-filter-results small svg{display:inline;width:0.625rem;height:0.625rem;margin:0 0.125rem;vertical-align:-0.0625rem;color:inherit}.nav-filter-results a[aria-current=\"page\"]{background:rgb(var(--primary) / 0.1);color:rgb(var(--primary))}.nav-filter-empty{padding:0.75rem;color:var(--filter-muted)}.nav-filter [hidden],#navigation-items[hidden]{display:none}#mobile-nav #navigation-items[data-nav-filter-active]>:not(.nav-filter):not([data-nav-filter-controls]){display:none}@media (max-width: 1023px){.nav-filter input{font-size:1rem}.nav-filter-field{min-height:2.75rem}}@media (prefers-reduced-motion: reduce){.nav-filter-field{transition:none}}"}],"page":{"pagePath":"data-apps/build-maps-and-globes","slug":"/data-apps/build-maps-and-globes","pageMetadata":{"title":"Build maps and globes in a data app","sidebarTitle":"Build maps and globes","description":"Build interactive d3 maps and globes in a data app from external shapes and your semantic layer","doc-type":"tutorial","href":"/data-apps/build-maps-and-globes"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Build interactive d3 maps and globes in a data app from external shapes and your semantic layer\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,OptimizedImage,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This tutorial shows how to pull map shapes from an external connection, render them with `,_jsx(_components.code,{children:`d3-geo`}),`, and connect data from Lightdash inside a data app.`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-world-view-hero.jpg?fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=a1e9e50ab6247b5594ad19ad7c598290`,alt:`A data app showing an interactive d3 globe with countries colored by GDP and a country detail panel for Spain`,\"data-og-width\":`2438`,width:`2438`,\"data-og-height\":`1950`,height:`1950`,\"data-path\":`images/data-apps/build-maps-and-globes/maps-world-view-hero.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-world-view-hero.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=7edd28a4ce9f8c452d2809411fef4422 280w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-world-view-hero.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=1e07e8c0bfe5d698d44ba0103921a7d6 560w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-world-view-hero.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=c5ed959d8ca278fe0786c5d86b885dc0 840w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-world-view-hero.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=7baf3a05ad3d839fed0f235ee405b6f0 1100w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-world-view-hero.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=26e6576ea656ab42387ba78397835ea6 1650w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-world-view-hero.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=7aee694237527f7c38f8aefcd8222a92 2500w`})}),`\n`,_jsx(_components.p,{children:`The ingredients:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`An external connection`}),` that serves GeoJSON country shapes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A prompt`}),` describing the globe and its interactions.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A Lightdash query`}),` joined onto the shapes by country code.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`1-set-up-an-external-connection-for-geo-data`,children:`1. Set up an external connection for geo data`}),`\n`,_jsxs(_components.p,{children:[`The map needs country boundary shapes. Data apps fetch external data through `,_jsx(_components.a,{href:`/data-apps/external-connections`,children:`external connections`}),` — a project admin registers the API once, and apps call it through a proxy that pins requests to the registered host.`]}),`\n`,_jsxs(_components.p,{children:[`A great free source is the `,_jsx(_components.a,{href:`https://www.naturalearthdata.com/`,children:`Natural Earth`}),` dataset mirrored on jsDelivr. Create a connection under `,_jsx(_components.strong,{children:`Project Settings → Data app connections`}),` with:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),` - `,_jsx(_components.code,{children:`world_geojson`}),` (the name becomes the alias the app calls — keep it short and descriptive)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Base URL`}),` - `,_jsx(_components.code,{children:`https://cdn.jsdelivr.net`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Auth`}),` - None (it’s a public CDN)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Allowed methods`}),` - `,_jsx(_components.code,{children:`GET`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Allowed paths`}),` - `,_jsx(_components.code,{children:`/gh/nvkelso/natural-earth-vector/geojson/`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Content types`}),` - `,_jsx(_components.code,{children:`application/json`}),` and `,_jsx(_components.code,{children:`application/geo+json`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Max response size`}),` - raise it to 8 MB. The world-countries file used below is ~0.8 MB, which brushes against the 1 MB default; higher-resolution files need more (see `,_jsx(_components.a,{href:`#troubleshooting`,children:`Troubleshooting`}),`).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`In the connection’s `,_jsx(_components.strong,{children:`Instructions`}),` field, tell the agent what lives there — this text is passed into the app-build sandbox:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Country and land shapes from the Natural Earth dataset. Fetch GeoJSON files`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`under /gh/nvkelso/natural-earth-vector/geojson/, e.g.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ne_110m_admin_0_countries.geojson for world country polygons. Features carry`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`useful properties: NAME, ADM0_A3 (ISO-3 code), CONTINENT, POP_EST, GDP_MD.`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Finally, use the wizard’s `,_jsx(_components.strong,{children:`Test`}),` step with the path `,_jsx(_components.code,{children:`/gh/nvkelso/natural-earth-vector/geojson/ne_110m_admin_0_countries.geojson`}),` and `,_jsx(_components.strong,{children:`Save as sample`}),` — the generator then knows the exact response shape when it builds your app.`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-connection-wizard.png?fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=60cb2af99648d417e199b22343b16536`,alt:`The Data app connections settings page with a GeoJSON connection configured`,\"data-og-width\":`3200`,width:`3200`,\"data-og-height\":`2000`,height:`2000`,\"data-path\":`images/data-apps/build-maps-and-globes/maps-connection-wizard.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-connection-wizard.png?w=280\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=f96e45315d933b9e72f2484949a00c0c 280w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-connection-wizard.png?w=560\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=f09fd6c13929f689c24ae910bd25ba90 560w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-connection-wizard.png?w=840\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=899de25b7fede84b8cb487943a4a761c 840w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-connection-wizard.png?w=1100\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=f81b32df68b4d65d56dbaa8160ae2495 1100w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-connection-wizard.png?w=1650\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=b50331aa015da3311b04476fc724cd02 1650w, https://mintcdn.com/lightdash/r5g66-wQ4pdXMZMF/images/data-apps/build-maps-and-globes/maps-connection-wizard.png?w=2500\u0026fit=max\u0026auto=format\u0026n=r5g66-wQ4pdXMZMF\u0026q=85\u0026s=c6efd91231b0a4154a41ee07b49945cd 2500w`})}),`\n`,_jsx(Heading,{level:`3`,id:`where-else-geo-data-can-come-from`,children:`Where else geo data can come from`}),`\n`,_jsx(_components.p,{children:`Any HTTPS API an admin registers works the same way:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Your own storage`}),` - host simplified GeoJSON for your sales regions, store catchment areas, or delivery zones on S3/GCS/your CDN, and register that origin.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Open-data APIs`}),` - many government portals serve boundaries as GeoJSON (e.g. census, postcode, or administrative-area APIs).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No connection at all`}),` - for small, stable shapes you can ask the agent to inline a simplified GeoJSON directly into the app source. No network, no connection to manage — best under a few hundred KB.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Prefer `,_jsx(_components.strong,{children:`GeoJSON`}),` over TopoJSON sources. TopoJSON is smaller on the wire, but decoding it needs the `,_jsx(_components.code,{children:`topojson-client`}),` package, which isn’t available in the app sandbox. Natural Earth publishes plain GeoJSON, so no conversion is needed.`]}),`\n`,_jsx(Heading,{level:`2`,id:`2-prompt-the-globe`,children:`2. Prompt the globe`}),`\n`,_jsxs(_components.p,{children:[`Create a new app with the `,_jsx(_components.strong,{children:`Custom`}),` template. Describing the projection, the interactions, and the connection by name gets you most of the way in one prompt. This is the kind of prompt that produced the World Atlas app:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Build a \"World Atlas\" data explorer using the world_geojson connection.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- A large interactive globe (d3 orthographic projection) that slowly`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` auto-rotates and can be dragged to spin. Draw it from`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` /gh/nvkelso/natural-earth-vector/geojson/ne_110m_admin_0_countries.geojson.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Color countries by a switchable metric — population, GDP, income group,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` continent — with a matching legend.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Clicking a country pauses the rotation and opens a side panel with its`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` details.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Dark space theme with a subtle starfield. Aim for the polish of the d3`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` gallery on Observable.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Prompting tips for maps:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name the projection.`}),` “Orthographic globe”, “Natural Earth projection”, “Mercator focused on Europe” — d3 supports them all, and naming one removes the guesswork.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name the connection and the file path.`}),` The agent sees the connection’s instructions and samples, but spelling out the exact file avoids a wrong guess.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Describe the interactions`}),` — rotate, hover tooltips, click-to-select, metric switcher — as user-visible behavior.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Point at inspiration.`}),` The `,_jsx(_components.a,{href:`https://observablehq.com/@d3/gallery`,children:`d3 gallery`}),` is a good shared vocabulary for the look you’re after.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`3-link-the-connection`,children:`3. Link the connection`}),`\n`,_jsxs(_components.p,{children:[`When you create or iterate on the app, open the resource picker in the builder and link `,_jsx(_components.code,{children:`world_geojson`}),`. The link is what authorizes the app to call the connection at runtime — the prompt text alone doesn’t grant access.`]}),`\n`,_jsx(_components.p,{children:`If the app calls a connection that isn’t linked, the fetch fails with:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`This app is not linked to the requested connection`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`You can review and change an app’s linked connections from the same picker when iterating, without regenerating the app.`}),`\n`,_jsx(_components.p,{children:`Under the hood, the generated code fetches shapes like this:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useLightdashClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@lightdash/query-sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useLightdashClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`useEffect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`externalFetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'world_geojson'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'GET'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` path:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/gh/nvkelso/natural-earth-vector/geojson/ne_110m_admin_0_countries.geojson'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setGeo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// parsed GeoJSON FeatureCollection`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`and the globe itself is standard `,_jsx(_components.code,{children:`d3-geo`}),` — a projection, a path generator, and one SVG `,_jsx(_components.code,{children:`\u003cpath>`}),` per country:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` projection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` d3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`geoOrthographic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`scale`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`R`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`translate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`clipAngle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`90`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` d3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`geoPath`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`projection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`svg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'path'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`datum`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Sphere'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`attr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'class'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'geo'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`attr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'d'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`attr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'fill'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'#0d3868'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ocean`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`svg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'g'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`selectAll`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'path.country'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`geo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`features`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`join`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'path'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`attr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'class'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'geo country'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`attr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'d'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`attr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'fill'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`feature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` colorFor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`feature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`attr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'stroke'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'#08121e'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Drag to rotate: nudge the projection, redraw every path`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` drag`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` d3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`drag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'drag'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`lambda`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`phi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`gamma`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` projection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`rotate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` projection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`rotate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` lambda`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dx`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`max`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`70`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`min`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`70`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`phi`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dy`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` gamma`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` svg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`selectAll`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'.geo'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`attr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'d'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`svg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`call`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`drag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You rarely write this by hand — but recognizing the shape helps you iterate with precise follow-up prompts (“slow the auto-rotation”, “thicken country borders on hover”).`}),`\n`,_jsx(Heading,{level:`3`,id:`a-second-connection-live-data-per-location`,children:`A second connection: live data per location`}),`\n`,_jsxs(_components.p,{children:[`The same mechanism works for any API. The World Atlas app links a second connection, `,_jsx(_components.code,{children:`weather`}),` (Base URL `,_jsx(_components.code,{children:`https://api.open-meteo.com`}),`, path `,_jsx(_components.code,{children:`/v1/forecast`}),`, no auth), and fetches a forecast when you click a country:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`externalFetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'weather'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'GET'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` path:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/v1/forecast'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` query:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` latitude:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '48.86'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// query values must be strings`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` longitude:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '2.35'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` current:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'temperature_2m,weathercode'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` timezone:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'auto'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`4-add-lightdash-query-data`,children:`4. Add Lightdash query data`}),`\n`,_jsxs(_components.p,{children:[`So far the colors come from properties baked into the GeoJSON. The real power move is coloring the map from `,_jsx(_components.strong,{children:`your semantic layer`}),` — revenue by country, active users by region, on-time delivery by state — with the same permissions and access controls as everything else in your project.`]}),`\n`,_jsx(_components.p,{children:`Ask for it in an iteration prompt:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Color the countries by total revenue from the orders explore instead of`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`population. Join on the customer country ISO-3 code. Countries with no`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`revenue stay gray.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`The generated code runs a Lightdash query and joins it onto the features by country code:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`34`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`34`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useLightdash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@lightdash/query-sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` revenueByCountry`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'orders'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Revenue by country'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`dimensions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'customers_country_code'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ISO 3166-1 alpha-3`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`metrics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'orders_total_revenue'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`limit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`500`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Globe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`geo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`loading`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`lineage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useLightdash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`revenueByCountry`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` byCountry`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useMemo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`row`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` row`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`customers_country_code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` row`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`orders_total_revenue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` color`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` d3`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`scaleSequential`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`d3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`interpolateBlues`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`domain`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`d3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`max`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`byCountry`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`values`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()]) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`??`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fillFor`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`feature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` byCountry`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`feature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`properties`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`ADM0_A3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` color`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '#1a2535'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// gray = no data`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Render the globe with fillFor, and spread {...lineage} on the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // root element so the host's \"Inspect data\" can trace the query.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Mind your join keys.`}),` A map only lights up where a row in your data matches a shape in the geo file. Pick a key that exists on both sides — country code, region code, postcode, admin ID — and make sure the format matches (ISO alpha-2 vs alpha-3, upper vs lower case, leading zeros). If your warehouse uses a different code than the geo file does, either translate it in the app or expose a matching dimension in your model.`]})}),`\n`,_jsx(_components.p,{children:`Because the query runs through Lightdash, viewers only ever see data they’re allowed to see — a map in a data app respects user attributes and project permissions like any chart.`}),`\n`,_jsx(Heading,{level:`2`,id:`5-flat-maps-and-regions`,children:`5. Flat maps and regions`}),`\n`,_jsxs(_components.p,{children:[`A globe is one `,_jsx(_components.code,{children:`projection`}),` swap away from a flat map. Useful iteration prompts:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`“Make it a flat world map instead of a globe” → `,_jsx(_components.code,{children:`d3.geoNaturalEarth1()`})]}),`\n`,_jsx(_components.li,{children:`“Focus the map on Europe only” → filter features, then fit the projection`}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Flat world map, sized to the container`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` projection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` d3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`geoNaturalEarth1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fitSize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`height`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`geo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// One region: filter the features, then fit the projection to them`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` europe`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'FeatureCollection'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` features:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` geo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`features`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` f`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`properties`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`CONTINENT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Europe'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` regional`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` d3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`geoMercator`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fitExtent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`16`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`16`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`width`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 16`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`height`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 16`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` europe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For sub-country maps, Natural Earth also publishes first-level admin areas (states and provinces) under the same connection path — `,_jsx(_components.code,{children:`ne_110m_admin_1_states_provinces.geojson`}),`, or the more detailed `,_jsx(_components.code,{children:`ne_50m_...`}),` variants (raise the connection’s max response size first).`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`This app is not linked to the requested connection`})}),` - the app calls an alias that isn’t linked. Link the connection in the builder’s resource picker.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fetch fails or the response is cut off`}),` - the GeoJSON is bigger than the connection’s max response size. The 110m world file is ~0.8 MB (fine at 8 MB); 50m is ~5 MB; 10m files are larger still. Raise the limit, or step down a resolution — 110m is plenty for a world view.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Countries missing or gray after a join`}),` - check the join key. Use `,_jsx(_components.code,{children:`ADM0_A3`}),` (see the tip above), and make sure your dimension returns ISO alpha-3 codes.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`The agent tried to `,_jsx(_components.code,{children:`fetch()`}),` a URL directly`]}),` - direct network calls are blocked in the app sandbox. Data must come through `,_jsx(_components.code,{children:`externalFetch`}),` on a linked connection. If this happens, iterate with “use the `,_jsx(_components.code,{children:`world_geojson`}),` connection instead of fetching directly”.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No map tiles / basemap imagery`}),` - tile servers are blocked by the app’s content security policy, by design. d3’s SVG projections don’t need them. For a tile-based scatter or choropleth on a dashboard, use the core `,_jsx(_components.a,{href:`/visualizations/map`,children:`Map chart`}),` instead.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fonts look different than expected`}),` - external stylesheets (e.g. Google Fonts) are also blocked by the content security policy; the app falls back to system fonts. Ask for system fonts in your prompt to avoid the console noise.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Build maps and globes in a data app","sidebarTitle":"Build maps and globes","description":"Build interactive d3 maps and globes in a data app from external shapes and your semantic layer","doc-type":"tutorial","href":"/data-apps/build-maps-and-globes"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Set up an external connection for geo data","slug":"1-set-up-an-external-connection-for-geo-data","depth":2,"children":[{"title":"Where else geo data can come from","slug":"where-else-geo-data-can-come-from","depth":3,"children":[]}]},{"title":"2. Prompt the globe","slug":"2-prompt-the-globe","depth":2,"children":[]},{"title":"3. Link the connection","slug":"3-link-the-connection","depth":2,"children":[{"title":"A second connection: live data per location","slug":"a-second-connection-live-data-per-location","depth":3,"children":[]}]},{"title":"4. Add Lightdash query data","slug":"4-add-lightdash-query-data","depth":2,"children":[]},{"title":"5. Flat maps and regions","slug":"5-flat-maps-and-regions","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/lightdash/d0a9cf4e6619eae5/analytics.js","/_mintlify/custom/lightdash/09fccb112e45cce5/sidebar-filter.js","/_mintlify/custom/lightdash/4337efe479da3a6a/sidebar-navigation.js"],"subdomain":"lightdash","siteName":"Lightdash","title":"Build maps and globes in a data app - Lightdash","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T20:54:17.492Z","originalFileLocation":"data-apps/build-maps-and-globes.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Build interactive d3 maps and globes in a data app from external shapes and your semantic layer\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lightdash\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Build maps and globes in a data app - Lightdash\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build interactive d3 maps and globes in a data app from external shapes and your semantic layer\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lightdash\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lightdash.com/data-apps/build-maps-and-globes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lightdash.mintlify.site/_mintlify/api/og/v2?division=Data+apps\u0026amp;title=Build+maps+and+globes+in+a+data+app\u0026amp;description=Build+interactive+d3+maps+and+globes+in+a+data+app+from+external+shapes+and+your+semantic+layer\u0026amp;theme=ec550573033c2195fadd36ad\u0026amp;signature=19aa470286594d5c13c74d0a76a97c97a3d2eadaeb22eff1e8d09cf0428694cb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Build maps and globes in a data app - Lightdash\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build interactive d3 maps and globes in a data app from external shapes and your semantic layer\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lightdash.mintlify.site/_mintlify/api/og/v2?division=Data+apps\u0026amp;title=Build+maps+and+globes+in+a+data+app\u0026amp;description=Build+interactive+d3+maps+and+globes+in+a+data+app+from+external+shapes+and+your+semantic+layer\u0026amp;theme=ec550573033c2195fadd36ad\u0026amp;signature=19aa470286594d5c13c74d0a76a97c97a3d2eadaeb22eff1e8d09cf0428694cb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/lightdash/x1yO_UZNDKcOd4RY/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lightdash\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8072ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lightdash.com/data-apps/build-maps-and-globes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/data-apps/build-maps-and-globes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.lightdash.com/#organization\",\"name\":\"Lightdash\",\"url\":\"https://docs.lightdash.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lightdash/NAoHiyWrKI0dLTGZ/logo/light.svg?fit=max\u0026auto=format\u0026n=NAoHiyWrKI0dLTGZ\u0026q=85\u0026s=4b91c8292b732e3daca7558549cf018c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lightdash.com#website\",\"name\":\"Lightdash\",\"url\":\"https://docs.lightdash.com\",\"publisher\":{\"@id\":\"https://docs.lightdash.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lightdash.com/data-apps/build-maps-and-globes#webpage\",\"url\":\"https://docs.lightdash.com/data-apps/build-maps-and-globes\",\"name\":\"Build maps and globes in a data app\",\"description\":\"Build interactive d3 maps and globes in a data app from external shapes and your semantic layer\",\"dateModified\":\"2026-10-29T20:54:17.492Z\",\"isPartOf\":{\"@id\":\"https://docs.lightdash.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lightdash.com/data-apps/build-maps-and-globes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lightdash.com/data-apps/build-maps-and-globes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Data apps\",\"item\":\"https://docs.lightdash.com/data-apps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build maps and globes in a data app\",\"item\":\"https://docs.lightdash.com/data-apps/build-maps-and-globes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.lightdash.com/data-apps/build-maps-and-globes#article\",\"headline\":\"Build maps and globes in a data app\",\"name\":\"Build maps and globes in a data app\",\"description\":\"Build interactive d3 maps and globes in a data app from external shapes and your semantic layer\",\"url\":\"https://docs.lightdash.com/data-apps/build-maps-and-globes\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lightdash.com/data-apps/build-maps-and-globes#webpage\"},\"dateModified\":\"2026-10-29T20:54:17.492Z\",\"publisher\":{\"@id\":\"https://docs.lightdash.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lightdash.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lightdash\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Lightdash","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Welcome to Lightdash","mode":"wide","href":"/introduction"},{"group":"Get started","icon":"rocket","root":{"title":"Getting started","href":"/get-started"},"directory":"card","pages":[{"title":"Quickstart","href":"/get-started/quickstart"},{"title":"Agentic onboarding with Aurora","sidebarTitle":"Agentic onboarding","tag":"Beta","href":"/get-started/agentic-onboarding"},{"title":"Explore your data","href":"/get-started/explore-your-data"},{"title":"Build your semantic layer","href":"/get-started/build-your-semantic-layer"},{"title":"Migrating from another BI tool","sidebarTitle":"Migrate from another BI tool","href":"/get-started/migrate-from-another-bi-tool"},{"title":"The Lightdash Way","href":"/get-started/lightdash-way"}]},{"group":"Explore","icon":"telescope","root":{"title":"Explore your data","href":"/explore"},"directory":"card","pages":[{"group":"Build charts","pages":[{"title":"Configure your charts","href":"/explore/configure-charts"},{"title":"Custom tooltips","href":"/explore/configure-custom-tooltip"},{"title":"Using custom fields","sidebarTitle":"Custom fields","href":"/explore/create-custom-fields"},{"title":"Formatting your fields","sidebarTitle":"Formatting fields","href":"/explore/formatting-your-fields"},{"title":"Period-over-period comparisons","sidebarTitle":"Period-over-period","href":"/explore/period-over-period"},{"title":"SQL runner","sidebarTitle":"SQL runner","href":"/explore/sql-runner"},{"title":"Merge queries","sidebarTitle":"Merge queries","href":"/explore/merge-queries"},{"title":"External sources","sidebarTitle":"External sources","tag":"Experimental","href":"/explore/external-sources"}]},{"group":"Table calculations","root":{"title":"Table calculations","href":"/explore/table-calculations"},"directory":"card","pages":[{"title":"Formula table calculations","sidebarTitle":"Formula","href":"/explore/table-calculations/formulas"},{"title":"Row functions","href":"/explore/table-calculations/functions/row-functions"},{"title":"Pivot functions","href":"/explore/table-calculations/functions/pivot-functions"},{"title":"Aggregate functions","href":"/explore/table-calculations/functions/aggregate-functions"},{"title":"SQL templates","href":"/explore/table-calculations/sql-templates"}]},{"group":"Dashboards","root":{"title":"Dashboards","href":"/explore/dashboards"},"pages":[{"title":"Interacting with dashboards","href":"/explore/dashboards/interact"},{"title":"Dashboard filters","href":"/explore/dashboards/filter"},{"title":"Dashboard parameter controls","sidebarTitle":"Parameter controls","tag":"Experimental","href":"/explore/dashboards/parameter-controls"},{"title":"Date zoom","href":"/explore/dashboards/date-zoom"}]},{"title":"Documents","href":"/explore/documents"},{"group":"Explore view","root":{"title":"The Explore view","href":"/explore/explore-view"},"pages":[{"title":"Filtering in the Explore view","href":"/explore/explore-view/filter"}]},{"title":"Filters reference","href":"/explore/filters-reference"},{"group":"Metrics catalog","root":{"title":"Metrics catalog","href":"/explore/metrics-catalog"},"directory":"card","pages":[{"title":"Catalog","href":"/explore/metrics-catalog/curate-the-catalog"},{"title":"Saved Trees","href":"/explore/metrics-catalog/build-saved-trees"},{"title":"Drivers","href":"/explore/metrics-catalog/drivers"}]},{"title":"Search","href":"/explore/search"},{"title":"Learn","tag":"Beta","href":"/explore/learn"},{"group":"Organize and share","pages":[{"title":"Spaces","href":"/explore/spaces"},{"title":"Default user spaces","href":"/explore/default-user-spaces"},{"title":"Review requests","sidebarTitle":"Review requests","href":"/explore/review-requests"},{"title":"Homepage","href":"/explore/homepage"},{"title":"How to promote content","sidebarTitle":"Promoting content","href":"/explore/promote-content"},{"title":"Verified charts and dashboards","sidebarTitle":"Verified content","href":"/explore/verified-content"},{"title":"Version history","sidebarTitle":"Version history","href":"/explore/version-history"},{"title":"Sharing charts","href":"/explore/share-charts"},{"title":"Scheduled deliveries","href":"/explore/create-scheduled-deliveries"},{"title":"Alerts","href":"/explore/create-alerts"}]}]},{"group":"Visualizations","icon":"chart-histogram","root":{"title":"Visualizations","href":"/visualizations"},"directory":"card","pages":[{"group":"Built-in charts","pages":[{"title":"Bar chart","icon":"chart-bar","href":"/visualizations/bar-chart"},{"title":"Line chart","icon":"chart-line","href":"/visualizations/line-chart"},{"title":"Area chart","icon":"chart-area","href":"/visualizations/area-chart"},{"title":"Mixed chart","icon":"chart-area-line","href":"/visualizations/mixed-chart"},{"title":"Scatter chart","icon":"chart-scatter","href":"/visualizations/scatter-chart"},{"title":"Pie chart","icon":"chart-pie","href":"/visualizations/pie-chart"},{"title":"Funnel chart","icon":"chart-funnel","href":"/visualizations/funnel-chart"},{"title":"Treemap chart","icon":"chart-treemap","href":"/visualizations/treemap-chart"},{"title":"Sankey chart","icon":"chart-sankey","tag":"Beta","href":"/visualizations/sankey"},{"title":"Table","icon":"table","href":"/visualizations/table"},{"title":"Big value","icon":"number-123","href":"/visualizations/big-value"},{"title":"Gauge","icon":"gauge","href":"/visualizations/gauge"},{"title":"Map","icon":"world","href":"/visualizations/map"}]},{"group":"Custom charts","root":{"title":"Custom charts","sidebarTitle":"Custom charts","href":"/visualizations/custom-charts"},"pages":[{"title":"Create reusable chart types with Chart Studio","sidebarTitle":"Chart Studio","href":"/visualizations/chart-studio"},{"title":"Install chart types from the chart library","sidebarTitle":"Chart library","href":"/visualizations/chart-library"}]}]},{"group":"Semantic layer","icon":"stack-2","root":{"title":"Lightdash semantic layer","href":"/semantic-layer"},"directory":"card","pages":[{"title":"Tables reference","sidebarTitle":"Tables","href":"/semantic-layer/tables"},{"title":"Dimensions reference","sidebarTitle":"Dimensions","href":"/semantic-layer/dimensions"},{"title":"Metrics reference","sidebarTitle":"Metrics","href":"/semantic-layer/metrics"},{"title":"Joins reference","sidebarTitle":"Joins","href":"/semantic-layer/joins"},{"title":"Nested and repeated columns","href":"/semantic-layer/nested-and-repeated-columns"},{"title":"Explores","sidebarTitle":"Explores","href":"/semantic-layer/explores"},{"title":"How to use parameters","sidebarTitle":"Parameters","href":"/semantic-layer/parameters"},{"title":"SQL variables","href":"/semantic-layer/sql-variables"},{"title":"Virtual views","href":"/semantic-layer/virtual-views"},{"title":"Lightdash YAML","sidebarTitle":"Lightdash YAML","href":"/semantic-layer/yaml"},{"title":"Caching","href":"/semantic-layer/caching"},{"group":"Pre-aggregates","root":{"title":"Pre-aggregates","href":"/semantic-layer/pre-aggregates"},"directory":"card","pages":[{"title":"External pre-aggregates","sidebarTitle":"External","href":"/semantic-layer/pre-aggregates/external"},{"title":"Monitoring and debugging pre-aggregates","sidebarTitle":"Monitoring and debugging","href":"/semantic-layer/pre-aggregates/monitoring"},{"title":"Auditing pre-aggregates from the CLI","sidebarTitle":"CLI audit","href":"/semantic-layer/pre-aggregates/audit-with-cli"}]},{"title":"lightdash.config.yml reference","sidebarTitle":"lightdash.config.yml","href":"/semantic-layer/lightdash-config-yml"},{"title":"Writing useful descriptions in your semantic layer","sidebarTitle":"Writing descriptions","href":"/semantic-layer/writing-descriptions"},{"title":"dbt modeling strategies for Lightdash","sidebarTitle":"Modeling strategies","href":"/semantic-layer/modeling-strategies"}]},{"group":"Workflow","icon":"git-branch","root":{"title":"Workflow","href":"/workflow"},"directory":"card","pages":[{"group":"CLI","root":{"title":"Lightdash CLI","sidebarTitle":"CLI","href":"/workflow/cli"},"directory":"card","pages":[{"title":"How to install the Lightdash CLI","sidebarTitle":"Install the CLI","href":"/workflow/cli/install"},{"title":"Authenticate the CLI","sidebarTitle":"Authenticate","href":"/workflow/cli/authenticate"},{"title":"Generate semantic layer YAML","sidebarTitle":"Generate YAML","href":"/workflow/cli/generate"},{"title":"Deploy changes to production","sidebarTitle":"Deploy changes","href":"/workflow/cli/deploy"},{"title":"Validate content","sidebarTitle":"Validate","href":"/workflow/cli/validate"},{"title":"Lint your code","sidebarTitle":"Lint","href":"/workflow/cli/lint"},{"title":"Compilation","sidebarTitle":"Compilation","href":"/workflow/cli/compile"},{"title":"Lightdash CLI reference","sidebarTitle":"Reference","href":"/workflow/cli/reference"}]},{"title":"Lightdash Desktop","sidebarTitle":"Desktop","tag":"Experimental","href":"/workflow/lightdash-desktop"},{"title":"Lightdash Mobile","sidebarTitle":"Mobile","href":"/workflow/lightdash-mobile"},{"title":"Preview projects","href":"/workflow/preview-projects"},{"title":"Pull requests","href":"/workflow/pull-requests"},{"title":"Automate with CI/CD","href":"/workflow/set-up-ci-cd"},{"title":"Validating your content","href":"/workflow/validating-your-content"},{"title":"Content as code","href":"/workflow/content-as-code"},{"title":"Local data app development","href":"/workflow/local-data-app-development"},{"title":"Migrate dashboards between projects","sidebarTitle":"Migrate dashboards","href":"/workflow/migrate-dashboards-between-projects"},{"title":"Editing dashboards with agents","href":"/workflow/edit-dashboards-with-agents"},{"title":"Agent skills","href":"/workflow/install-agent-skills"},{"title":"Set up VS Code for Lightdash","sidebarTitle":"Set up VS Code","href":"/workflow/set-up-vs-code"},{"title":"Renaming models, metrics, and dimensions","sidebarTitle":"Rename models and fields","href":"/workflow/rename-models-and-fields"},{"title":"Keyboard shortcuts","href":"/workflow/keyboard-shortcuts"}]},{"group":"Agents","icon":"robot","root":{"title":"AI agents","href":"/agents"},"directory":"card","pages":[{"group":"Set up agents","pages":[{"title":"Set up AI agents","sidebarTitle":"Set up agents","href":"/agents/set-up-agents"},{"title":"AI Router","sidebarTitle":"AI Router","href":"/agents/enable-ai-router"},{"title":"Data access control","href":"/agents/data-access"},{"title":"Agent identity","sidebarTitle":"Agent identity","tag":"Beta","href":"/agents/agent-identity"},{"title":"Agent permissions","sidebarTitle":"Agent permissions","tag":"Beta","href":"/agents/agent-permissions"},{"title":"Agent access to restricted data","sidebarTitle":"Restricted data","href":"/agents/agent-access-to-restricted-data"},{"title":"Thread retention","href":"/agents/thread-retention"}]},{"group":"Work with agents","pages":[{"title":"Using AI agents","href":"/agents/use-ai-agents"},{"title":"Deep research","sidebarTitle":"Deep research","href":"/agents/deep-research"},{"title":"Creating and editing content","sidebarTitle":"Content editing","tag":"Beta","href":"/agents/enable-content-tools"}]},{"group":"Improve answers","pages":[{"title":"Effective analytics with agents","sidebarTitle":"Effective analytics","href":"/agents/effective-analytics-with-agents"},{"title":"Agent context","sidebarTitle":"Agent context","href":"/agents/agent-context"},{"title":"Knowledge documents","href":"/agents/knowledge-documents"},{"title":"Custom agent skills","href":"/agents/custom-agent-skills"},{"title":"Verified answers","href":"/agents/verified-answers"},{"title":"Create evaluation suites","href":"/agents/create-evaluation-suites"},{"title":"Agent visibility","sidebarTitle":"Visibility","href":"/agents/visibility"},{"title":"AI agent issues","sidebarTitle":"Issues","tag":"Beta","href":"/agents/issues"},{"title":"Send issues to Linear and Jira","sidebarTitle":"Linear and Jira","tag":"Beta","href":"/agents/issues-linear-jira"}]},{"group":"Build agent workflows","pages":[{"title":"AI agents as code","sidebarTitle":"Agents as code","href":"/agents/agents-as-code"},{"title":"AI writeback","href":"/agents/ai-writeback"},{"title":"AI coding agent","tag":"Beta","href":"/agents/ai-coding-agent"},{"title":"Autopilot","sidebarTitle":"Autopilot","tag":"Beta","href":"/agents/autopilot"}]},{"group":"Integrations","pages":[{"title":"Set up agents in Slack","href":"/agents/set-up-slack-agents"},{"title":"Lightdash MCP server","href":"/agents/lightdash-mcp"},{"title":"Lightdash Docs MCP","href":"/agents/lightdash-docs-mcp"},{"title":"Connect external MCP servers","sidebarTitle":"External MCP servers","href":"/agents/connect-external-mcp-servers"}]}]},{"group":"Data apps","icon":"cube-spark","root":{"title":"Data apps","tag":"Beta","href":"/data-apps"},"tag":"Beta","directory":"card","pages":[{"title":"Customize themes","sidebarTitle":"Themes","href":"/data-apps/customize-themes"},{"title":"External connections","sidebarTitle":"External connections","href":"/data-apps/external-connections"},{"title":"Custom dependencies","tag":"Experimental","href":"/data-apps/custom-dependencies"},{"title":"Scheduled deliveries and syncs","sidebarTitle":"Deliveries and syncs","description":"Send a data app's results on a schedule as files, or sync them to a Google Sheet","href":"/data-apps/deliveries-and-syncs"},{"title":"Build maps and globes in a data app","sidebarTitle":"Build maps and globes","href":"/data-apps/build-maps-and-globes"},{"title":"AI analysis","sidebarTitle":"AI analysis","description":"Summarize what a data app or dashboard shows, flag anomalies, and investigate why","tag":"Experimental","href":"/data-apps/ai-analysis"},{"title":"Saved app state","sidebarTitle":"Saved app state","tag":"Experimental","href":"/data-apps/saved-app-state"}]},{"group":"Embed","icon":"image-in-picture","root":{"title":"Embedding","href":"/embed"},"directory":"card","pages":[{"title":"Set up embedding","sidebarTitle":"Set up embedding","href":"/embed/set-up-embedding"},{"title":"How to Embed Dashboards","sidebarTitle":"Dashboards","href":"/embed/embed-dashboards"},{"title":"How to Embed Charts","sidebarTitle":"Charts","href":"/embed/embed-charts"},{"title":"How to embed AI agents","sidebarTitle":"AI agents","href":"/embed/embed-ai-agents"},{"title":"How to embed the metrics catalog","sidebarTitle":"Metrics catalog","href":"/embed/embed-metrics-catalog"},{"title":"How to embed data apps","sidebarTitle":"Data apps","href":"/embed/embed-data-apps"},{"title":"Embedding reference","href":"/embed/reference"},{"title":"Embedding with iframe","sidebarTitle":"iframe","href":"/embed/iframe"},{"title":"Embedding with React SDK","sidebarTitle":"React SDK","href":"/embed/react-sdk"},{"title":"How to translate embedded dashboards","sidebarTitle":"Translating dashboards","href":"/embed/translate-embedded-dashboards"}]},{"group":"Integrations","icon":"plug","root":{"title":"Integrations","href":"/integrations"},"directory":"card","pages":[{"title":"Connect your warehouse and project","sidebarTitle":"Connect your project","href":"/integrations/connect-project"},{"title":"Connect through an SSH tunnel","href":"/integrations/connect-through-ssh-tunnel"},{"title":"Connect Athena with web identity","sidebarTitle":"Athena web identity","tag":"Beta","href":"/integrations/connect-athena-with-web-identity"},{"group":"dbt","root":{"title":"dbt","href":"/integrations/dbt"},"directory":"card","pages":[{"title":"Syncing dbt projects","sidebarTitle":"Syncing dbt projects","href":"/integrations/dbt/projects"},{"title":"dbt write-back","href":"/integrations/dbt/write-back"},{"title":"dbt MetricFlow metrics","sidebarTitle":"dbt MetricFlow","href":"/integrations/dbt/metricflow"},{"title":"Upgrading dbt","href":"/integrations/dbt/upgrading"}]},{"title":"Slack integration","sidebarTitle":"Slack","href":"/integrations/slack"},{"group":"Google Sheets","root":{"title":"Google Sheets","href":"/integrations/google-sheets"},"directory":"card","pages":[{"title":"Lightdash for Google Sheets","sidebarTitle":"Google Sheets add-on","href":"/integrations/google-sheets/add-on"}]},{"title":"Metrics SQL API","tag":"Beta","href":"/integrations/metrics-sql-api"},{"title":"Snowflake Cortex","href":"/integrations/snowflake-cortex"},{"title":"Apache Ossie","tag":"Experimental","href":"/integrations/apache-ossie"}]},{"group":"Workspace admin","icon":"shield-cog","root":{"title":"Workspace admin","href":"/workspace-admin"},"directory":"card","pages":[{"group":"Access and permissions","pages":[{"title":"Invite your team","sidebarTitle":"Invite your team","href":"/workspace-admin/invite-new-users"},{"title":"Roles and permissions","href":"/workspace-admin/roles"},{"title":"Direct access","href":"/workspace-admin/direct-access"},{"title":"Custom Roles","href":"/workspace-admin/custom-roles"},{"title":"Groups","href":"/workspace-admin/manage-groups"},{"title":"User attributes","href":"/workspace-admin/user-attributes"},{"title":"Service accounts","href":"/workspace-admin/service-accounts"}]},{"group":"SSO","root":{"title":"SSO providers","href":"/workspace-admin/sso"},"directory":"card","pages":[{"title":"SSO setup","href":"/workspace-admin/sso/setup"},{"title":"Verified domains","href":"/workspace-admin/sso/verified-domains"},{"title":"SCIM Integration","href":"/workspace-admin/sso/scim"}]},{"group":"Organization settings","pages":[{"title":"Managing your organization","href":"/workspace-admin/manage-your-organization"},{"title":"Creating multiple projects","href":"/workspace-admin/manage-projects"},{"title":"AI settings","href":"/workspace-admin/ai-settings"},{"title":"Customizing the appearance of your project","sidebarTitle":"Color palettes","href":"/workspace-admin/appearance"},{"title":"Custom email domain","href":"/workspace-admin/set-up-custom-email-domain"},{"title":"Organization credentials","href":"/workspace-admin/organization-credentials"},{"title":"Multiple warehouse connections","sidebarTitle":"Warehouse connections","tag":"Experimental","href":"/workspace-admin/multiple-warehouse-connections"},{"title":"Set up timezones","sidebarTitle":"Timezones","href":"/workspace-admin/set-project-timezone"}]},{"group":"Monitoring and limits","pages":[{"title":"Usage analytics","href":"/workspace-admin/usage-analytics"},{"title":"Usage analytics project","tag":"Beta","href":"/workspace-admin/usage-analytics-project"},{"title":"Project compilation history","href":"/workspace-admin/project-compilation-history"},{"title":"Export limits","href":"/workspace-admin/export-limits"},{"title":"Instance health","href":"/workspace-admin/instance-health"}]}]},{"group":"Personal settings","icon":"user-cog","root":{"title":"Personal settings","href":"/personal-settings"},"directory":"card","pages":[{"title":"Personal access tokens","sidebarTitle":"Access tokens","href":"/personal-settings/create-personal-tokens"},{"title":"Personal warehouse connections","sidebarTitle":"Warehouse connections","href":"/personal-settings/personal-warehouse-connections"},{"title":"Timezones","href":"/personal-settings/timezone"}]},{"group":"Self-host","icon":"server-bolt","root":{"title":"Self-hosting","href":"/self-host"},"directory":"card","pages":[{"title":"Lightdash Cloud vs. Self-Hosted","href":"/self-host/lightdash-cloud-vs-self-hosted"},{"title":"Enterprise on-prem setup","sidebarTitle":"On-prem setup","href":"/self-host/enterprise-on-prem"},{"title":"Production deployment checklist","href":"/self-host/production-deployment-checklist"},{"title":"Data flows and telemetry in self-hosted Lightdash","sidebarTitle":"Data flows and telemetry","href":"/self-host/data-flows-and-telemetry"},{"title":"Environment variables","mode":"wide","href":"/self-host/customize-deployment/environment-variables"},{"group":"Install","pages":[{"title":"Self-Host Lightdash","href":"/self-host/self-host-lightdash"},{"title":"Self-host Lightdash using docker compose","sidebarTitle":"Docker compose","href":"/self-host/self-host-lightdash-docker-compose"}]},{"group":"Upgrading","pages":[{"title":"Upgrade your instance","href":"/self-host/upgrading"},{"title":"Upgrade notes","href":"/self-host/upgrade-notes"}]},{"group":"Connect services","pages":[{"title":"Configure a Github integration for self-hosted Lightdash","sidebarTitle":"Github Integration","href":"/self-host/customize-deployment/configure-github-for-lightdash"},{"title":"Configure a Slack integration for self-hosted Lightdash","sidebarTitle":"Slack Integration","href":"/self-host/customize-deployment/configure-a-slack-app-for-lightdash"},{"title":"Configure a Google Sheets integration for self-hosted Lightdash","sidebarTitle":"Google sheets","href":"/self-host/customize-deployment/configure-google-sheets-integration"}]},{"group":"Infrastructure","pages":[{"title":"Configure Lightdash to use an external database","sidebarTitle":"Use External Database","href":"/self-host/customize-deployment/configure-lightdash-to-use-an-external-database"},{"title":"Configure Lightdash to use external storage","sidebarTitle":"External storage","href":"/self-host/customize-deployment/configure-lightdash-to-use-external-object-storage"},{"title":"Run a dedicated scheduler worker","sidebarTitle":"Scheduler worker","href":"/self-host/customize-deployment/scheduler"},{"title":"Add headless browser on self-hosting","sidebarTitle":"Headless browser","href":"/self-host/customize-deployment/enable-headless-browser-for-lightdash"},{"title":"Sandboxes","sidebarTitle":"Sandboxes","href":"/self-host/customize-deployment/sandboxes"},{"title":"Secure Lightdash with HTTPS","sidebarTitle":"Secure with HTTPS","href":"/self-host/customize-deployment/secure-lightdash-with-https"},{"title":"Configure Prometheus metrics for self-hosted Lightdash","sidebarTitle":"Prometheus metrics","href":"/self-host/customize-deployment/configure-prometheus-metrics-for-self-hosted-lightdash"},{"title":"Configure OpenTelemetry tracing for self-hosted Lightdash","sidebarTitle":"OpenTelemetry tracing","href":"/self-host/customize-deployment/configure-opentelemetry-tracing-for-self-hosted-lightdash"}]},{"group":"Access and licensing","pages":[{"title":"Configure Lightdash to use passwords or SSO for authentication","sidebarTitle":"SSO and auth","href":"/self-host/customize-deployment/use-sso-login-for-self-hosted-lightdash"},{"title":"Organization roadmap","href":"/self-host/customize-deployment/organization-roadmap"}]},{"group":"Enterprise features","root":{"title":"Self-hosting Enterprise Edition","sidebarTitle":"Enterprise features","href":"/self-host/enterprise-features"},"pages":[{"title":"Self-host agents","sidebarTitle":"Agents","href":"/self-host/enterprise-features/ai-agents"},{"title":"Self-host the MCP server","sidebarTitle":"MCP","href":"/self-host/enterprise-features/mcp"},{"title":"Self-host data apps","sidebarTitle":"Data apps","href":"/self-host/enterprise-features/data-apps"},{"title":"Self-host pre-aggregates","sidebarTitle":"Pre-aggregates","href":"/self-host/enterprise-features/pre-aggregates"},{"title":"Self-hosted usage analytics","sidebarTitle":"Usage analytics","tag":"Beta","href":"/self-host/enterprise-features/usage-analytics"}]},{"group":"NATS workers","root":{"title":"NATS workers","href":"/self-host/nats-workers"},"directory":"card","pages":[{"title":"Warehouse workers","sidebarTitle":"Warehouse workers","href":"/self-host/nats-workers/warehouse-workers"},{"title":"Pre-aggregate workers","sidebarTitle":"Pre-aggregate workers","href":"/self-host/nats-workers/pre-aggregate-workers"}]}]},{"group":"Support","icon":"lifebuoy","root":{"title":"Support","href":"/support"},"directory":"card","pages":[{"title":"Generating a HAR file","href":"/support/generate-har-file"},{"title":"AI thread debug dump","href":"/support/ai-thread-debug-dump"},{"title":"Feature badges reference","href":"/support/feature-badges"},{"title":"Support access","href":"/support/support-access"}]}]},{"tab":"API","pages":[{"title":"API","href":"/api-reference/v1/introduction"}]}]},"basePath":"","title":"Build maps and globes in a data app - Lightdash","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-CXMGc493.js","DynamicMarkdown-D-2HDKEp.js","zoom-image-lightbox-CE4cYsJE.js","lightbox-handle-r17bVUz3.js"]}