"The profile page should be a representation of me and what I do when I go out into the world," Foursquare Head of Search Andrew Hogue told me, but what he really means is that you as a person are quickly becoming the sum of everywhere you've been and everything you've done. On Facebook, you're the sum of all your interactions and photos with others; but on Foursquare, location and detecting patterns are key. Foursquare today released a completely revamped mobile app for iOS and Android that takes years of data mining and algorithm refinement and stuffs it into a tiny blue-green app. Foursquare began its life as a way to see what your friends are up to, but it has quickly evolved into a life-logging tool / artificial intelligence that knows you "like an old friend does," Hogue said.

The new app looks vibrant and clean, featuring a photo-centric news feed, ergonomically re-placed Check-In button, and colorful profile pages, but the real meat is a revamped Explore tab that pulls data on every Foursquare user in real-time and creates incredibly relevant recommendations. The effort was pioneered by Hogue, who previously led Google’s Structured Data team on local search projects and before that studied pattern recognition at MIT. When you tap Explore in “the all-new Foursquare,” the app populates what sandwich places you might like (if it’s lunch time), or what bars are worth hitting (if it’s 3AM on a Saturday night). Explore provides recommendations based on a massive amount of data points, like what sandwich shops you’ve been to before, what time it is, where your friends have been, where there are deals, if you’re new in town, if you’re outside your neighborhood, and where people like you hang out.

For example, here’s a scenario: you’re in Chinatown, it’s lunch-time, and people lately have been posting tips on Foursquare about dumpling places. If you’ve expressed interest in dumplings before, the app will likely recommend a place in the area that’s well-reviewed and popular. “We look at all the data we have about the area including the most talked-about places and foods, and use that data for recommendations,” Hogue said. Yelp, on the other hand, isn’t nearly as real-time in the way it presents data. If you’re just blocks away in SoHo, however, the app might throw some more glitzy cafes your way. “We use map data to define neighborhoods and see trends within those neighborhoods from users,” Hogue said, “because you live your life in a neighborhood. If I visit Lincoln Park in Chicago for the first time, I can open the app and see the vibe of that neighborhood.”

Foursquare is able to feed you relevant recommendations because it knows what places, neighborhoods, and cities you have been to. Users visiting other cities may see the hottest tourist spots in the Explore area, while locals will see trendy places they haven’t yet tried. Creating “magical search experiences” built on top of hundreds of data points working behind the scenes is the goal. As Foursquare has created and refined its Explore engine, the team discovered many odd trends around New York City, the company’s home town. “For every two degrees the temperature goes up, check-ins at ice cream shops go up by 2%,” Hogue said. Like an economist, Hogue can quantify exactly when people start hitting museums when it’s cold and beaches when it’s hot. He can even see how people move about the city, and what places they avoid. “In New York, people don’t cross Houston street to go somewhere for lunch. One side is NYU and the other side is shopping and Louis Vuitton.”

After months of studying user data, Foursquare decided that it needed one more data point: the Like. “If you check in to a place, it doesn’t mean you like it there,” Hogue said. “In fact, it might actually be a negative endorsement if you don’t check in there again.” The Like creates a new kind of metadata that makes the app’s recommendations even more accuratel, because you can endorse a place without having checked-in there if you’re a new user. “It’s never one signal. It’s always the combination of independent signals that make a great search engine.” In the end, you are the ultimate data point — your photo on the new profile screen is flanked by places you’ve checked in, photos you’ve taken at each place, lists you’ve curated filled with stuff you like, badges you’ve earned by eating chinese four days in a row, and tips you’ve left about places you’ve visited.

The new Foursquare app is rolling out now to the App Store and Google Play Store.

This article was originally published on theverge.com - How the 'all-new' Foursquare is using big data to figure out what you'll crave next