Mapping the World

By Harrison Shoff


People are always surprised when I tell them about Zack Walker, Airbnb’s in-house cartographer, who works on mapping the world.

They say, “the world is already mapped! There’s Google Maps, Foursquare, Yelp, Garmin, National Geographic, Zheng He, Isabella Bird, Lewis & Clark & Sacagawea, Leif Erikson, the Planet Earth series narrated by David Attenborough…”

Which is true, so what’s all this about?

This is all about “AT-AT,” a new internal tool we built to understand locations and their relationships to other locations. It looks like this:

Big questions and hard problems

At Airbnb, the question we want to answer is how do you understand a place without ever having been there?

How do you capture why your friend said you wouldn’t like Fisherman’s Wharf, but you should still go there to get a double double from In N Out?

How do you know where in the world will make for your perfect trip?

Current solutions

We currently tackle this problem in a number of ways:

  • When you’re searching for a place to stay, our location relevance model lets the Airbnb community inform future guests about great places to stay.
  • When you’re exploring new places to experience, Airbnb Neighborhoods combines local editorial content with the handy, need-to-know information alongside professional photos to explore a place without having to leave your chair.
  • Our discovery team is building big things with natural language processing and machine learning algorithms to understand reviews, listing descriptions, and search patterns to recommend the perfect place to stay right from our homepage.
  • Host guidebooks let you find great recommendations from the host.

These products combine to help Airbnb travelers discover all of the wonderful places that make up a city, not just downtown areas where traditional accommodations are normally found.

Airbnb accommodations (red) and traditional accommodations (blue) in San Francisco

Location is a crucial building block for a number of our engineering efforts. Our team needs to help the Airbnb traveler mitigate their number one concern when finding a place to stay: location. On the flipside we want to highlight the million-plus unique listings opened up by Airbnb hosts around the world.

What’s next

Neighborhoods can only take you so far when trying to match you with the perfect place to stay.

There are culturally significant areas or regions that aren’t drawn on maps. They mostly live in the minds of the local community that calls those areas home. These areas might be a unique part of town along a single road, cutting through 3 neighborhoods. Or they might be a way to describe something in common among multiple neighborhoods.

Finding and mapping these places takes a heroic effort on Zack Walker’s part. He researches historical and current data, talks with folks from the community, and answers emails from hosts to build a clear image of how locals understand their place in the world.

So when you’re looking for a place to stay in “wine country” in Northern California we should be showing you Napa and Sonoma and helping you understand the differences and similarities between the two counties.

While we were very excited to make this happen, this wasn’t possible with our current architecture and existing internal tools. We needed something bigger.

Enter project AT-AT

A small team consisting of Christopher Lin, Alex Blackstock, Daniel Loreto, and myself set out to build the tool to help Zack Walker’s pursuit of mapping the world.

A note on the project code name: Zack wouldn’t let us call it “The Walker System”, so Christopher Lin did the next best thing and used a Star Wars reference (the Imperial Walker or All-Terrain Armored Transport, commonly called “AT-AT”).

AT-AT’s tech stack looks like this:

Our first step was generalizing the existing system so it could handle various geographical polygons (continents, countries, market areas, special regions, towns) and not just cities and neighborhoods.

Relationships

When a polygon is created, the backend calculates the following:

  • Ancestor polygons of the higher type, polygons that contain this polygon (San Francisco => SoMa)
  • Adjacent polygons of the same type, polygons that overlap/border (SoMa => Civic Center)
  • Descendant polygons of a lower type, polygons that this polygon contains (SoMa => Folsom Street Fair)
  • The lat/lng of the centroid of the polygon

Navigation

Navigating a workspace of polygons can be tricky. It took us a few iterations before we landed on interaction patterns that let the UI disappear into the background.

The basic tenents of the system’s UI:

  1. Don’t break the back button
  2. Render only what’s necessary
  3. Reveal information as needed
  4. Get out of the way

We settled on the following interactions: a single click selects a polygon and renders only its adjacent polygons,

and a double-click snaps to the selected polygon.

A tooling culture

Building the future of travel requires a number of special tools working together in the background.

AT-AT is just one of these tools, acting as the foundation for capturing location data for other services and tools to consume — the first step towards answering “Where’s the perfect next trip for me?”

When building tools, remember that you’ll never be able to predict the use cases of the future.

And you’ll learn the most from shipping.

Special thanks

Zack Walker, Ben Hughes, Andy Kramolisch, Ann Montgomery.

Check out all of our open source projects over at airbnb.io and follow us on Twitter: @AirbnbEng + @AirbnbData


Originally published at nerds.airbnb.com on January 7, 2015.