Find the Nearest Major Gas Station, Restaurant, Store, and More with Wolfram|Alpha
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?”
So there are two conclusions to be made here:
- Yes, Stephen Wolfram really does use Wolfram|Alpha in practical, real-life situations. A lot.
- 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:
- the nearest Walgreens
- the Avis nearest to the Golden Gate Bridge
- a Starbucks open at 10pm in Pittsburgh
- or even the Chipotle nearest to Grand Central Station open at 9pm
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):
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:
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.
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.