Weekly city safety report

A weekly city safety report: incidents, people affected, hotspots investigated, actions.

AdvancedWeeklyAI agent

Government & smart citiesPublic sector

Use this template

What it does

Every Sunday: every road incident in your city, grouped by kind, the people living around each and the hospitals within 5 km, the hotspots investigated by an AI agent, and a one-page safety report from xMap AI to the leadership, on Slack and on a map.

In one sentence: Sundays at 07:00, in Bangkok, find road closures, roadworks and other incidents, clean up their categories, count who lives around, count the hospitals within 5 km of each, sort them by population and keep the top 20, let the AI agent answer, write a report with xMap AI, then email the list to you, send message to a channel in Slack and show them on a map.

Why it is useful

Leadership needs one page, not raw data. Every Sunday the report arrives with the hotspots, who they affect and what to do next week.

Who it is for

Government & smart cities. Municipalities, agencies and city teams planning services and keeping residents safe and informed. Every use case for government & cities

Best use cases

  • A municipality leadership team
  • A traffic authority
  • A civil defense planning unit

What each run gives you

  • A one-page report by email
  • A Slack post
  • A map of hotspots

The time it saves

Sundays at 07:00. Doing the same work by hand takes about 300 minutes each time; it runs about 4 times a month, so it saves about 20 hours a month (an estimate). It is advanced: 12 blocks and 1 tool.

The flow, block by block

  1. Every SundayTrigger · ScheduleStarts the flow on a timetable.
  2. My cityWhere · Area of interestSets where the flow looks: countries, cities or specific places, or areas you draw on a map.
  3. Incidents this weekxMap data · Traffic incidentsRoad closures, roadworks and other incidents on online maps right now, with where they are.
  4. Group themxMap AI · Place classifierAssigns clean categories and merges duplicate places.
  5. Who lives aroundxMap data · DemographicsWho lives in an area: the number of residents, men and women, and nine age groups, from xMap’s population grid (hexagons of about 0.1 km², about 100 countries).
  6. Hospitals around eachxMap data · Nearby placesPlaces around a point from xMap’s own places database (300M+ places, refreshed every month): pick the types of place (more than 5,000, such as Restaurant, Cafe, Pharmacy, Hospital or Gas station, or a whole group of them) and how far to look.
  7. Best 20 firstLogic · Sort and limitPuts the items in order, and can keep only the first ones: the 10 best rated, the 20 nearest, the highest fit scores.
  8. Investigate each hotspot with the AI agentxMap AI · AI agentAn AI agent: for each incoming message it thinks, uses the blocks you link to its Tools port (data, xMap AI, lookups, your tables, other flows, apps), remembers the conversation and writes an answer in {{reply}}.
  9. Schools and emergency services around itxMap data · Nearby placesA tool the AI agent uses when it needs itPlaces around a point from xMap’s own places database (300M+ places, refreshed every month): pick the types of place (more than 5,000, such as Restaurant, Cafe, Pharmacy, Hospital or Gas station, or a whole group of them) and how far to look.
  10. Write the safety reportxMap AI · xMap LLMTell the AI what to do in plain words.
  11. Email me the listAction · EmailSends one email per run with all the items, or one email per item.
  12. Share with the leadership channelApp · SlackChannel-based messaging platform
  13. Show them on a mapAction · Show on a mapShows the results as points on a map, with the area of interest.

Every block can be changed after you use the template: the city, the type of place, the score, where the results go.

Use it now

Answer a few questions, enter your work email, and it runs in your own account, kept running until you pause it. Use this template.

How to set it up

More for Government & smart cities