Find the Nearest Major Gas Station, Restaurant, Store, and More with Wolfram|Alpha

April 25, 2012
shadow
C. Alan Joyce
Posted by

It sounds like the setup for a stereotypical horror movie, but it’s a true story: a lone traveler—the founder of a major software company and the creator of an innovative computational knowledge engine—driving on a dark and unfamiliar road. A rental car running low on gas. It’s the 21st century, of course, so he’s got GPS—but the last few gas stations it directed him to were shuttered for the night. Should he take his chances with the next station recommended by the GPS? Should he pull over on a spooky, moonless country road and try to call other stations in the desperate hope that someone answers his call?

Well, maybe. Or he could just ask the Wolfram|Alpha iPhone or Android App “Where’s the nearest open gas station?

Where's the nearest open gas station?

So there are two conclusions to be made here:

  1. Yes, Stephen Wolfram really does use Wolfram|Alpha in practical, real-life situations. A lot.
  2. Wolfram|Alpha now knows the locations of some 2.4 million retail establishments for 1,300 major chains in 220 different categories—gas stations, restaurants, department stores, and much more. It also knows the typical business hours for roughly one third of those locations, which makes queries like that one possible.

It’s important to note that right now we only have information on retail chains, so independent retailers or restaurants won’t show up for your queries. And this first dataset is heavily weighted toward the United States and US-based chains. But we’ll be adding more locations of all types and beefing up our international coverage in the near future.

For the moment, that still means that you can ask Wolfram|Alpha to find places like:

Or maybe you’re not quite so choosy about your retail chains; general queries like “nearest pharmacy”, “nearest hotel to JFK”, “Where can I buy shoes in Boston?”, or even “Where can I buy a cup of coffee nearby?” will give you useful information for all the locations Wolfram|Alpha knows about in the relevant category, including street addresses, phone numbers, and direct distances if you’ve got Location Services enabled in your Wolfram|Alpha App.

And even if you’re not in a life-and-death, late-night-stranding sort of situation, there’s some interesting aggregate data to explore here. Let’s say you’ve heard about a particular cult favorite fast food place, but you’re disappointed that no locations seem to be nearby. (OK, let’s say you’re me):

Where is the nearest In-N-Out Burger?

It won’t get you any closer to a hamburger, but the simple input “In-N-Out in the US” will at least give you a quick sense of how far you’ll have to travel—or which state you should live in if you want to maximize your access to a particular regional chain:

In-N-Out in the US

There are some neat comparisons to be done here: try “McDonald’s in the US” and “Burger King in the US“, for example. Or ask about a more general category, like “Mexican fast food restaurants in the US“, and you’ll get a breakdown and ranking by chain as well as by state. I’ve stumbled across a lot of unfamiliar names this way, and it’s been interesting to compare, say, the Taco Buenos and the El Pollo Locos of America to see where each chain is dominant.

Mexican fast food restaurants in the US

We’ll keep you posted as we expand our knowledge base in this area and as we add more useful functionality and visualizations. Like I said, we’re in the early stages of this particular project—we’ll be steadily adding more chains and independent business locations, as well as expanding coverage of opening hours and other store information. So let us know about other information you’d like to compute about retail locations in the US and around the world.

3 Comments

Great to see AggData used in such insightful and helpful ways!

Posted by Chris Hathaway April 28, 2012 at 1:52 am Reply

Suppose you have a Tom-Tom or Garmin and you want to find a public restroom. You might look for gas stations or reasurants. We need a way to find public restrooms at at any establishment. I tried to do that with WA and it didn’t work. That would be a good addition.

Posted by Ted Ersek April 30, 2012 at 11:23 am Reply

That’s a great Service but unfortunately not available in Germany. I tried a few times, but never get results. Hope to get it in future.

Posted by torsten May 6, 2012 at 2:54 am Reply
Leave a Comment

(required)

(will not be published) (required)

(your comment will be held for moderation)