The retail behemoth Amazon has 20 cities on its list of possible locations for its so-called HQ2.

Numbers-crunchers everywhere have been hard at work, assessing various data to handicap each city's chances. (See this nifty interactive graphic, for example.)

Demographics, shmemographics.

The data divas at the marketing agency Digital Third Coast dove into the crucial category of after-work options, specifically late-night restaurants in terms of quantity and quality.

Digital Third Coast's assessment weighed the number of late-night restaurants, the variety of cuisine, the average Google score, average closing times, the number of 24-hour restaurants, and the transit system.

By that combined measure, Philadelphia came in seventh.

The top city was D.C., followed by New York, Digital Third Coast's hometown of Chicago, Miami, Boston, and L.A.

You might think that New York City — home of 15 round-the-clock eateries — would be a shoo-in for the top spot. But Digital Third Coast cites "middling" restaurant reviews and an earlier average closing time.

D.C. got props for its transit system, a huge variety and volume of restaurants, and high Google reviews of restaurants.

Now wait.

The researchers counted only one 24-hour restaurant in Philly. Admittedly, Philly is not the 24-hour town that it once was (after the closings of Little Pete's and Midtown II) — which is not saying much — but there are a few options.

A Digital Third Coast rep says researchers looked at the first 50 restaurants in Google Maps when using the filter "open Saturday after 1:30 a.m."

What came up was not the Melrose Diner or the South Street Diner or the Midtown III Diner, but Oregon Steaks, the takeout window at 10th Street and Oregon Avenue.

"There may be more 24-hour restaurants in the city, but this Google search tends to show the more popular/visited restaurants in the first 50 searches," she said. Also, she said, the average restaurant rating on Google also takes into account the first 50 restaurants under that same filter.

There also will be a chicken-or-egg scenario. Wherever Amazon locates, savvy restaurateurs will open late-night restaurants to meet the demand. Amazon's hometown of Seattle has no shortage of them.

For that matter, keep an eye on Logan Square, where Comcast is building its Comcast Technology Center, which will house about 4,000 workers.