Creating a better ZIP code search for patients

When people search for a doctor, they often use ZIP code as a starting point, choosing a search radius aling with it. Yet most ZIP codes are irregularly shaped. On a recent healthcare project, a few of us on the team wondered: how do we best pick a centerpoint for the radius?

ZIP Codes A rendition of hypothetical ZIP codes of irregular shapes, with one highlighted.
Most ZIP codes are highly irregular shapes. Let's look at this example.

Finding the centerpoint by using a simple bounding box is a rudimentary way of determining a locus — essentially just averaging out the dimensions of the ZIP code.

Customers aren’t served well by this averaging approach, since the locus may actually be actually in a different ZIP code and be farther from certain people.

Bounding BoxDrawing a bounding box around the ZIP code.
Drawing a bounding box around the ZIP code is a very simplistic way of finding a centerpoint, but not the best way.

This center point even falls outside of the ZIP code it is supposed to represent, which isn't ideal for the residents of that ZIP.

Radius based on center of bounding box. A radius extends and draws a circle within the bounding box.
A radius for the search area, based solely on the center of the bounding box around the ZIP code.

Of course, we want the healthcare locations to be most convenient for everyone in that ZIP code. We found that we needed to calculate the centroid (or: the center of gravity), for the ZIP code.

Center of Bounding Box: a radius and circle drawn from a simple outline of the ZIP code.
A simple bounding box doesn't provide well enough for the residents of the ZIP code.
Centroid of Polygon: in this version, the circle and radius are drawn from the centroid.
Using a centroid returns more results within the ZIP code.
7.49% more area
A boost in area within the ZIP code, and a more central starting point.

Using the centroid covers 7.49% more area of the ZIP code than the “bounding box” method does, better representing the locations in that area.

Designing for simple averages, adding up the extremes and calculating a mean, often helps no one (see the 99% Invisible episode about deisgning fighter plane cockpits).

By picking a better center point for the radius, we could begin to serve people in a more helpful way.

The client seemed to like the approach, and we went about implementing it. One downside of working at a creative agency is that we can't often see the direct results, as by the time the project is live, we've moved on to other clients. In the future, being more integrated into the product team would help to validate the interaction choices more securely.

More Work

Helping parents and teens evaluate sports for their children

How do people know which sports may be most beneficial for their teenagers to play? And how might they customize rankings based on what is important to them or their family members?