1. The first step was to obtain all the geotags for each of the 4 cities. A geotag (geolocation) indicates the location of a particular object on the map. For instance, you post a photo from a restaurant and mention the location.
2. For each city we determined the boundaries (ranges of longitude and latitude) and calculated the Cartesian product of these ranges. Thus, we determined a set of points on the map, in which we further searched for geotags.
3. After we collected a list of geotags, we needed to get information about these places. Instagram allows you to get the following data:
- Number of posts by geotag
- Number of likes for top posts by geotag
- Number of comments under top posts
- Geotag category (restaurant, bar, hotel, tourist attraction, etc.)
- Price category
- Additional info: address, website, phone and opening hours
4. Instagram does not approve when you send too many requests, so after a certain number of requests it blocks the account. To bypass the blocking, we used many (lots of!) accounts and various proxies, which allowed us to get all the necessary information.