30 Day Map Challenge 2026 - Day 10 (Icon Map Pro) - Prompting only

Which areas of Johannesburg are underserved by pharmacies, and where should a pharmacy chain look at opening?

For Day 10 of the 30 Day Map Challenge, the theme is Prompting only. After Day 9's look at city, town and countryside, I handed over the keyboard. I didn't write a line of code or touch the report myself. The map was built with Claude Code and the Icon Map skills, from a single prompt.

The question behind it is the one a BI team or agency is asked every week: how quickly can you go from a business question to a finished, checked report, and where does the AI still need a person? I chose site selection for a pharmacy chain because it is a real commercial question with a clear spatial answer.

The prompt

This was the whole brief:

Using only openly licensed data and the installed Icon Map skills, build a one-page Power BI report answering: "Which areas of Johannesburg, South Africa, are underserved by pharmacies, and where should a pharmacy chain investigate opening new locations?" Work independently from data discovery through to a completed, validated report. Use the supplied report template, choose the most appropriate mapping approach and explain your analytical decisions. Document your sources, processing, assumptions and limitations. Verify the finished report in Power BI Desktop, review screenshots and correct any problems you identify. Ask for my input only when you cannot reasonably proceed independently.

The only request I had was to take control of Power BI on my desktop. About 45 minutes after the first download, the report was saved in Power BI Desktop with a written method, a list of sources and the scripts to rebuild it.

Explore the interactive report

  • The map shows Johannesburg as about 1,600 hexagons of about 0.74 km² each. Each is coloured by its number of underserved residents, from pale cream (none) to deep red (8,000 or more).
  • Blue dots are the 618 pharmacies mapped inside the metro. Paler dots are the 113 just outside it, which residents can still use.
  • Numbered badges are the ten candidate sites, each with a 2 km catchment ring. Hover over any hex, pharmacy or site for its figures.
  • The cards give the headline numbers.
  • The bar chart ranks the ten sites by the underserved residents within 2 km of each.

Interactive report: Day 10, Johannesburg's pharmacy gaps

This is a map of mapped pharmacies, not every pharmacy. Open data is thinner in townships, which may be exactly where the gaps appear. It is a shortlist for site visits, not a site decision.

Starting with open data the agent found itself

The agent looked for openly licensed sources and settled on four:

  • Population: Kontur Population for South Africa, November 2023 release. It is already on H3 hexagons at resolution 8, so it needed no reshaping. The national file is a 39 MB download, and about 5.7 million people fall inside the city.
  • City boundary: the City of Johannesburg Metropolitan Municipality from geoBoundaries, about 1,645 km².
  • Pharmacies, part one: OpenStreetMap, queried through the Overpass API. OSM has 166 pharmacy features inside the metro, far too few for a city of nearly six million. The agent noticed this straight away and went looking for a second source.
  • Pharmacies, part two: Overture Maps places, release 2026-10-21. DuckDB queried the GeoParquet files on Amazon S3 directly, filtered to a box around the city, and found about 880 places classed as pharmacies.

There were two hiccups on the way. The public Overpass server was at capacity, so the agent tried a second server and retried with pauses. Overture had also renamed its categories field to taxonomy since the skill's examples were written, so the agent read the new schema and adapted the query.

From two messy sources to one list of pharmacies

Merging OSM and Overture needed a few rules, all written down in the data folder:

  • What counts as a pharmacy. In OSM, amenity=pharmacy or healthcare=pharmacy, plus shop=chemist only if it dispenses or is named a pharmacy. In Overture, places with a confidence of 0.40 or more, not marked closed, and either categorised as a pharmacy or named like one (Clicks, Dis-Chem, "Apteek"). Wholesalers, manufacturers and the odd "party planner" were removed.
  • Duplicates. An Overture point within 100 m of an OSM pharmacy is the same shop. Two Overture points within 25 m, or within 150 m with the same name, are also one shop.

The result is 618 pharmacies in the metro: 158 from OpenStreetMap and 460 from Overture, almost four times what OSM has on its own.

Measuring access: distance isn't enough

The obvious measure is distance to the nearest pharmacy. But in Soweto, a pharmacy 1 km away may be shared by 200,000 people. So the agent used a two-step floating catchment area (2SFCA), a standard method for measuring healthcare access:

  1. Each pharmacy's capacity is divided by the number of people living within 2 km of it.
  2. Each hex adds up the shares of every pharmacy within 2 km. The result is pharmacies per 10,000 residents, allowing for competition between neighbouring areas.

There is no official South African target, so the benchmark is Johannesburg's own average: 1.09 pharmacies per 10,000 residents. A hex's underserved residents are its population multiplied by its shortfall against that average. If there is no pharmacy within 2 km at all, every resident counts.

Why 2 km? It is about a 25-minute walk, and most people in the areas that came out worst walk or take a minibus taxi.

The edge of the city isn't the edge of the world

The first run made Ivory Park, on the city's north-east edge, look severely underserved. The agent spotted the cause: pharmacies just across the boundary in Tembisa had been clipped away, along with their customers. It re-downloaded both sources with a 3 km buffer around the city and counted pharmacies and people in the buffer, while reporting only on hexes inside the city. Ivory Park stayed high on the list, but now for the right reason.

Picking sites one at a time

The ten sites were chosen greedily. The agent picked the hex with the most underserved residents within 2 km, added a hypothetical pharmacy there, recalculated access for the whole city and repeated. Sites had to be at least 3 km apart, and each was named after its nearest OpenStreetMap suburb.

Building it in Icon Map Pro

The template already contained an Icon Map Pro visual, and Pro suited the page. It needed layered points, hexes and shapes, tooltips and lasso selection, but not the Slicer's select-inside-a-shape filtering. The agent explained that choice and kept the template's page, theme and layout.

One view table, five layers

The model has four tables loaded from CSV, for the hexes, pharmacies, sites and boundary. One calculated view table then unions them into the rows the map needs:

  • H3 cells carry only a hex ID and a weight.
  • Pharmacies carry latitude, longitude and a size, so they draw as circles.
  • Sites carry an SVG badge, built in DAX, with the site number inside it.
  • Catchment rings and the city outline are WKT text with no coordinates.

Each row fills one Icon Map role and leaves the others blank, so it draws on exactly one layer. Colours and badges are worked out in the view rather than stored in the data, so changing a colour is a one-line DAX edit.

The bug the screenshots caught

The first screenshot showed the whole city in a uniform purple. The agent's first fix, switching the hexes to a per-row colour, made no difference. Its second, a gradient on fixed values, brought the colours back, but the pattern was wrong. Soweto, which the data said was the worst-served area, looked pale, while dark hexes sat on top of the pharmacies.

The agent compared the picture with the CSV and worked out what had happened. With H3 from coordinates, Icon Map Pro re-bins every row that has a latitude and longitude, including the pharmacies and sites, so the cells no longer carried the precomputed weights. Switching to H3 from indexes, where hex rows carry only their H3 ID and weight, fixed it at once. Soweto, Ivory Park, Diepsloot and Orange Farm now stand out exactly as the numbers say.

Smaller fixes from reviewing the screenshots

  • The title wrapped onto a second line, so its text box was widened across the page.
  • The cards showed "3M", so display units were switched off to give 2,675,696.
  • The bar chart scrolled with only 9 of 10 bars visible, so it was made taller and given data labels.
  • The notes panel needed a scrollbar, so the copy was shortened.
  • The number of residents more than 2 km from a pharmacy differed by 98 people between the card and the summary file, because only one used rounded distances. Both now use the same rounding.

Design choices

Colour. The hexes use a warm sequential ramp on fixed values of 0, 3,000 and 8,000 underserved residents, so the same shade means the same thing wherever you look. The agent ran the Icon Map basemap contrast check against a muted light basemap. Only the palest shade was faint, and only over water, of which Johannesburg has very little.

Points that don't compete. Pharmacies are small navy dots with a white outline. The candidate sites are teal numbered badges, a colour used nowhere else on the page, so they read as "new".

The text panel is the legend. The panel besides the map carries the question, the answer, a colour key and the method.

What the map reveals

  • The gaps are in the townships, not the suburbs. Northern suburbs such as Sandton and Rosebank are densely served. Soweto, Ivory Park, Diepsloot, Alexandra and Orange Farm are not.
  • 613,249 residents (11%) live more than 2 km from a mapped pharmacy, and 2.68 million (47%) live where access is below the city average.
  • The top sites are in Soweto and Ivory Park. Emndeni has 192,000 underserved residents within 2 km and just one mapped pharmacy. Ntshonalanga in Ivory Park follows on 189,000, then Mofolo North and Orlando.
  • Orange Farm has the clearest coverage gap. The Stretford site has no mapped pharmacy within 2 km at all.

These figures show the size of the opportunity, not one store's catchment, and each area could support several pharmacies. They don't include government clinics, which dispense much of the chronic medication in these areas, or income, rent and footfall. Most importantly, open data is likely to under-record small independent pharmacies in townships. Every site should be checked against the South African Pharmacy Council register and visited before anyone signs a lease.

What I learned from Day 10

1. One good prompt beats many small ones. A brief that says what "done" means (open data only, validated, screenshots reviewed, limitations documented) gets you a finished report, not a first draft.

2. The agent's best moments were self-corrections. The edge effect, the H3 binning bug and the 98-person mismatch were all found by the agent checking its own output against its own data.

3. Screenshots are the test suite for a map. Every validator passed while the hexes were wrong. Only looking at the rendered page caught it.

4. Skills carry the hard-won detail. Engine settings, blank-value rules for union tables and the advice to load H3 cells by index were all in the Icon Map skills. Once the screenshot showed the problem, the fix was already written down.

5. The human still owns judgement and consent. At one point a tool asked the agent to accept a licence agreement. It declined to accept terms on my behalf and refreshed the data through Power BI Desktop instead. The open-data caveats are also mine to weigh before anyone acts on them.

**6. The agent was not able to add the Lasso control to the map or resolve the legend colours so need to update the Skills files to see if that helps.

Final thoughts

"Prompting only" sounds like a shortcut, but most of the work was the same as any good analysis: find the right data, question the obvious measure, check the edges and look hard at the result. What changed is who does the typing. The same brief would work for any "where should we open next?" question, whether bank branches, clinics, chargers or depots. State the question, insist on open, documented data, and make the agent prove its map with screenshots before it calls the job done.

Sources and attribution

  • Population: Kontur, Kontur Population: South Africa, release of 1 November 2023, H3 resolution 8. Licensed under CC BY 4.0. Downloaded through HDX, November 2026.
  • City boundary: Runfola, D. et al. (2020), geoBoundaries: A global database of political administrative boundaries, PLoS ONE 15(4): e0231866. doi:10.1371/journal.pone.0231866. gbOpen ZAF ADM2, sourced from OCHA ROSEA and the Municipal Demarcation Board. CC BY 3.0 IGO.
  • Pharmacies and suburb names: © OpenStreetMap contributors, available under the Open Database Licence (ODbL). Extracted through the Overpass API, 10 November 2026.
  • Pharmacies: Overture Maps Foundation, places theme, release 2026-10-21.0. CDLA-Permissive-2.0, with some records under CC0 1.0 or Apache 2.0.
  • Mapping: Icon Map Pro by Tekantis, in Microsoft Power BI. Basemap credits are shown in the map's attribution control.
  • Built with: Claude Code and the Icon Map Pro and Icon Map data-preparation skills. Processing in Python and DuckDB with the spatial and H3 extensions.

Methodology note: Population is Kontur's modelled count per H3 resolution-8 cell; cells with fewer than 50 residents are excluded. Pharmacies are merged from OpenStreetMap and Overture Maps (confidence ≥ 0.40). Duplicates are removed within 100 m across the two sources, and within 25 m (or 150 m with the same name) inside Overture. Access is a two-step floating catchment area with a 2 km straight-line catchment and equal capacity per pharmacy. Population and pharmacies within 3 km outside the metro boundary are included to avoid edge effects, but only hexes inside the metro are reported. Underserved residents are residents × max(0, 1 − access ÷ city average), where the city average is 1.09 pharmacies per 10,000 residents. Candidate sites are chosen greedily, at least 3 km apart, recalculating access after each pick. Open data is not a complete inventory of pharmacies, and government clinics, income, footfall and rents are not modelled. Results are based on open data so are illustrative for this mapping challenge, not a recommendation to open.