Agent recipe · Available · tested on 0.53.0

Dot-density points from polygon counts

Can an AI agent make a dot-density map, one dot per so many people, from polygons with counts?

Yes. The random-points analysis step places one random dot per amount of a polygon's numeric field (one per 50 people, say) inside each polygon, spread evenly by area. The generator is seeded, so everyone who opens the link sees the same dots. The dots carry represents, so a following hexbin step can sum them into equal-area hexagons.

Ask for it like this

  • “Make a dot-density map of population”
  • “One dot per 100 people from these census tracts”
  • “Turn these polygons with counts into points I can bin”

Inputs

Accepts: Polygon FeatureServer layer with a count field, Polygon GeoJSON with a count field. Engines: maplibre, arcgis.

  • source: A polygon layer.
  • field: A numeric count field, such as population.

Optional:

  • unitsPerPoint: Amount per dot; leave out for about 10,000 dots. At most 100,000 dots.
  • seed: Whole number; change it for a different but equally valid layout.
  • area: "view" reads only polygons in the current map view.
  • visible: false on the step hides the dots, such as when a hexbin step bins them.

Steps

Discover → inspect → plan → validate → execute → verify → share. Each step names where it runs; none is a hosted REST endpoint.

  1. discover: Read llms.txt, this recipe and api/capabilities.json; note the engine and execution environment you actually have. (Declarative URL; https://gismap.online/llms.txt, https://gismap.online/api/capabilities.json, https://gismap.online/api/manifest.json)
  2. inspect: Read the source metadata: geometry type, field names and types, spatial reference, extent, sentinels and query support. Query real values before filtering; never invent fields. (Declarative URL, Standalone JavaScript, In-browser API; <layer URL>?f=pjson, sources.inspect, sources.detectSentinels, layers.metadata)
  3. plan: Confirm polygon geometry and a count field (not a rate or percentage). Sum the field over the filter to choose unitsPerPoint: total ÷ unitsPerPoint is the dot count, which should stay under 100,000. Up to 50,000 polygons are read; filter with where for bigger layers. (Standalone JavaScript; sources.inspect)
  4. validate: Add { "operation": "random-points", "input": 0, "options": { "field": "POP", "unitsPerPoint": 50, "seed": 1 } } and validate the spec. (Standalone JavaScript, In-browser API; mapSpec.validate)
  5. execute: Return the #map=json: link, or run analysis.run("random-points", ...) in a page. To bin the dots, add a hexbin step with input { "step": 0 } and statistic sum of represents. (Declarative URL, In-browser API; https://gismap.online/schemas/map-v1.schema.json, mapSpec.createLink, analysis.run)
  6. verify: Open the link and check the dot count in the summary against total ÷ unitsPerPoint, and that it does not start with "Incomplete:". (In-browser API; layers.list)
  7. share: Return the link and say that dots are placed at random inside each polygon, not at addresses. (Declarative URL; mapSpec.createLink)

Result

map-v1 with a polygon layer and an analysis step { operation: "random-points" }. Schema: /schemas/map-v1.schema.json.

  • Interactive dot-density map link · Declarative URL

Verify before reporting success

  • Field is a count
  • Dot count ≈ total ÷ unitsPerPoint
  • No "Incomplete:" in the summary, or the gap is reported
  • Map text says dots are random within polygons

Report prepared, validated, loaded, rendered and verified separately, and partial or failed when they apply. A generated link alone is only prepared.

Limitations

  • Dots are random positions inside each polygon, not real locations: never present them as addresses.
  • Rates and percentages cannot become dots; use a count.
  • Reads up to 50,000 polygons and makes up to 100,000 dots.

If something goes wrong

  • "too many points": raise unitsPerPoint to the amount the message suggests.
  • "Incomplete:": filter the layer with where, or use area "view" with a closer camera.

Examples

Example · rendered · checked 2026-11-20

Ventura County, one dot per 50 people

Prompt: “Make a dot-density map of Ventura County's population from census blocks, one dot per 50 people.”

Data: California Census 2020 Redistricting Blocks (Esri, U.S. Census Bureau)

Open the result

map-v1 JSON
{
  "version": 1,
  "title": "Ventura County population, one dot per 50 people",
  "basemap": "gray-vector",
  "camera": {
    "center": [
      -119.1,
      34.25
    ],
    "zoom": 9.6
  },
  "layers": [
    {
      "url": "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/California_Census_2020_Redistricting_Blocks/FeatureServer/0",
      "type": "feature",
      "title": "Ventura County census blocks (2020)",
      "where": "County_Name = 'Ventura County' AND P0010001 > 0",
      "opacity": 0.35,
      "renderer": {
        "type": "simple",
        "color": "#c9cdd2",
        "outline": "#ffffff"
      }
    }
  ],
  "analysis": [
    {
      "operation": "random-points",
      "input": 0,
      "options": {
        "field": "P0010001",
        "unitsPerPoint": 50,
        "seed": 1
      },
      "title": "People, one dot per 50"
    }
  ]
}

What was checked:

  • Opened on MapLibre: 7,843 blocks loaded and 16,886 dots drawn (843,843 people ÷ 50 ≈ 16,877); no console errors.
  • The block outlines follow the publisher's scale range and are hidden at the opening zoom; zoom in to see them.
  • ArcGIS engine not checked.