
Creating a map of the world

A detailed and accurate map of the world is one of the cornerstones for our company. This is the basis, the reference point, a kind of origin. Search and selection of housing by our users begins with the analysis of our map. And despite the abundance of cartographic services existing in the world, we still had to create our own map in due time.
Our only full-time cartographer is Zach Walker. He is responsible for forming the map, drawing all kinds of objects and borders. Why did we take the path of greatest resistance and develop our own map, instead of adapting one of the existing solutions for ourselves?
It's all about AT-AT. This is a software tool that we have developed to create a diagram of the relationships of locations, their influence on each other. It looks like this:

We are constantly interested in how people make choices by looking at places on the map where they have never been in their life? How do they imagine them? How do you choose the perfect travel route and place to stay, looking at just one map?
Current solutions
For our part, we try to help our users in several different ways:
- When you are looking for housing, you are thereby helping us to improve the algorithm for selecting the best places . Accordingly, he can offer future users options that are even more appropriate for their tastes.
- When you select the places you want to visit, our area guide compiles editorial content with manually selected necessary information about these places and adds professional photos. Such collections allow you to learn much more about the corners of the planet that interest you without getting up from your chair.
- Our research team develops sophisticated machine learning and information processing algorithms in various languages in order to automatically collect information from reviews, listings and search templates. This allows us to more accurately guess the wishes of users and offer more relevant collections of options for accommodation.
- We offer users all kinds of tips and tricks from homeowners.
All of the above is designed to help travelers learn about places, not only from a “tourist” point of view, not one-sidedly. After all, template reviews and guides usually give a very narrow and superficial picture of countries and cities.

Traditional “tourist” places of residence are highlighted in green, housing from the Airbnb base is red.
Of course, our main task is to offer the user exactly those places to stay that would best suit his wishes. On the other hand, we need to somehow highlight the millions of unique listings posted on our service by hosts around the world.
What's next?
A neighborhood guide will only be useful if you are looking for the perfect place to stay. But the map does not indicate many areas of interest in terms of culture and history. And not because our hands do not reach, it’s just usually such information is known only to local residents. Moreover, by "district" we mean a non-administrative urban unit. In this case, the district may be the part of the city located along the road crossing three “classical” regions. Or it could be a conglomerate from several "classic" areas.
The responsibility of Zach Walker is precisely the search and mapping of such places, whose borders are delineated precisely according to the cultural-contextual principle, and not the administrative-territorial one. To do this, Zack examines various historical information, asks local residents and corresponds with the owners. So, when a user enters a query for a certain region, he is offered options from different parts of this region, and not just the most popular.
When we started developing this mechanism, it turned out that our current architecture and tools did not allow us to implement such functionality. So we came to the need to create the aforementioned AT-AT.
AT-AT Project
We needed a tool to facilitate the mapping of such areas. By the way, the name AT-AT is borrowed from Star Wars, if you remember, the so-called walking tanks.

Schematically, the composition of AT-AT can be represented as follows:

First of all, we needed to generalize the existing system so that it could process various geographic ranges (continents, regions, countries, regions, special areas, small towns and villages), and not just megacities and administrative areas.

Relationship

After the polygon is created, the backend calculates:
- Higher-class parent polygons: Polygons containing this polygon (San Francisco contains the SoMa area).
- Neighboring polygons of the same class: having a common border or partially overlapping (SoMa district and Folsom Street fair).
- Latitude and longitude of the centroid polygon.
Navigation
Managing a map filled with all kinds of areas can be too hard. Empirically, we came to various display modes in which the working interface becomes transparent.
Our developers even formed unspoken internal rules when working with AT-AT:
1) Do not break the back button
2) Render only what is needed
3) Display information as needed
4) Get out of the way!
With a single mouse click, a polygon is selected and only neighboring polygons are rendered:

And with a double click, the focus is on the selected polygon:

Conclusion
Obviously, in working on such a complex project as the Airbnb service, one has to use various internal tools. AT-AT is only one of many; it facilitates the primary task of mapping areas that are then used by our other services and tools. And, creating your own auxiliary tools for working on some large projects, do not forget that it is impossible to predict all future use cases.
