FlowsBook a callSign inCreate free accountSign up
Business and places data

How to count businesses in an area you draw yourself, not a city's outline

Draw the exact patch you care about, search inside it, and read the count, the mix of types and, where population data exists, people per place. Step by step.

Part of the guide Location intelligence automation

By the xMap team · · 4 min read

To count businesses in an area that matches how you actually work, draw the area as a shape on a map, search for the kinds of place you want inside it, and count only what falls within the line. A city's official outline or a neat circle rarely matches a sales patch, a delivery zone or the streets a shop draws its customers from, and the count changes a lot depending on where the edge sits. Drawing your own boundary makes the number answer your question rather than someone else's.

This article is about the drawing and what to do with the number. It covers three ways to define a shape, how the search behaves inside it, how to turn a count into something comparable, and a made-up example from Lyon.

Three ways to define the shape

In xMap Flows the shape lives in the Area of interest block. Pick the way that fits what you have.

  • Draw it. Open Draw your areas and click out a polygon or a rectangle around the streets you mean. You can draw several, edit their corners and name them.
  • Paste it. If a boundary already exists as GeoJSON, from a planning team or a GIS file, paste it in; polygons, multipolygons and feature collections are read.
  • Points with a radius. Drop points, for example your stores, and give them one distance, from 250 m to 25 km. Each becomes a circle and every block after it reads them as areas.

How the search behaves inside your shape

Put Nearby places after the Area of interest, with Where set to Area of interest and the types you are counting. Each area is searched from its middle out to its edge, and only places inside the shape itself are kept, so nothing spills over a river or a ring road you drew along.

Three limits are worth knowing before you trust the total:

  • Each type is one search per area, and one search returns at most the 500 nearest places. In a dense shape the step says when it reached 500, which means the real count is higher.
  • Switch on Cover the whole area for shapes wider than 3 km. The area is then searched in 7 parts, its middle and six around it, so places near the edge are not crowded out by those in the middle.
  • A shape larger than about 25 km from middle to edge is too big for one search. Split it into smaller drawn areas, up to 8 a run.

Counting by type inside one shape

When you search several types at once, each place keeps its own category, so the list can be grouped. A quick way to see the mix is the run's results table sorted by category, or a Make a report step whose charts show the leading kinds. If you will repeat this monthly, add Place classifier with your own short list, so twenty fine-grained types become four groups you can compare over time.

From a count to people per place

A bare count compares badly between shapes of different size. Two ways make it fair. Divide by area to get places per square kilometre, or divide by residents to get people per place. For residents, add Demographics over the same Area of interest: it gives the number of people living in the shape from xMap's population grid.

A made-up example in Lyon

This example is invented to show the method. A bakery group is choosing between two districts of Lyon for its next shop. The expansion manager draws each district along the streets the group's existing shops serve, rather than using the official boundaries, which cut across a market square. The flow searches Bakery and Pastry shop in both shapes, with Cover the whole area on, and runs Demographics over the same shapes.

Say the first shape holds 38 bakeries and 41,000 residents, and the second holds 22 bakeries and 30,000 residents. The first has the larger count; the second has about 1,360 people per bakery against about 1,080. On that measure the smaller district looks less crowded, which is the opposite of what the raw counts suggested. The manager then puts the two shapes on a map to see where the 22 bakeries sit, because a cluster at one end leaves the other end open.

Making it a monthly check

  1. Save the flow with its drawn shapes and put a Schedule in front, set to monthly.
  2. Keep the same types and settings every month, so the counts compare.
  3. Add Only new on a second branch to list the places that appeared since last month.

A count inside your own boundary is one of the most asked-for numbers in location intelligence automation, and drawing the shape yourself is what makes it worth reporting.

Questions

Can I count businesses in a postcode or ZIP code?

Yes, if you have its boundary as GeoJSON, by pasting it into Area of interest. Otherwise draw the postcode's streets yourself; the shape only needs to be as precise as your decision.

Why is my count exactly 500?

One search returns the 500 nearest places of a type. Hitting that number means there are more: switch on Cover the whole area or split the shape into smaller ones.

Does the count include closed places?

No, by default. Nearby places leaves out places marked closed unless you switch off Only places that are open.

Can I compare a drawn area with a city as a whole?

Yes, but compare rates, such as places per square kilometre, not raw counts, because the city is far bigger than your shape.

Templates that do this

Read next

More on business and places data · Every article · Templates

Put it to work

An AI employee in xMap Flows does this on live data, on its own timetable. Start from a template or describe it in plain words.