Cities and states across the country felt either heartbreak or jubilee Thursday when Amazon announced the 20 finalists -- including Newark -- for a new headquarters location. Now, the final public relations push is on as they jockey for the win.

Ultimately, of course, the decision's up to Amazon, the mega online retailer. While the company has laid out dozens of ways it plans to judge bids, it's hard to know exactly what the company will see in a location that puts it over the top.

Some of the criteria are hard to quantify, like quality of life or culture fit, but others can be translated into hard data. NJ Advance Media chose a number of categories and assigned every finalist a grade of A to F and then ranked them.

Scroll to see how the finalists rank by category, or skip to the final grades.

A note about the data: This is a purely statistical ranking based on a selection of the quantifiable factors Amazon's seeking in a new location. The grades do not take into account more qualitative attributes or the specific details of any single proposal, many of which have not been made public. Numbers for Washington D.C., Northern Virginia and Montgomery County, Maryland were combined. The data comes from Bureau of Labor Statistics, U.S. Census Bureau, Tax Foundation, Toronto Foundation, and Statistics Canada.

Smart citizens

Amazon says its looking for a highly educated population "with corresponding educational attainment," according to its bid request. New York City and Washington, DC, (and its surrounding area) top the list by this measure, while Newark lands at the very bottom of the pack. But that doesn't necessarily tell the whole story.

Newark has a large student population to its advantage, from Rutgers-Newark, the New Jersey Institute of Technology and the Stevens Institute of Technology in nearby Hoboken. If Amazon lands in Newark, those students could choose to stay in the area and try for one of the 50,000 jobs Amazon has promised.

And Newark's proximity means it could draw workers from other parts of New Jersey or New York City, but be a cheaper location than the city. Those workers could also live in very desirable nearby neighborhoods such as Millburn, Maplewood, Westfield and Summit.

Most of those 50,000 jobs would go to tech workers, leading Amazon to look for the next Seattle, a tech hub. Washington, DC, again ranks highly based on the number of its residents in tech and tech-related occupations, along with Atlanta and Austin. Newark barely beats Philadelphia and Toronto toward the bottom of the list.

A strong economy

A "stable and business-friendly environment" was a top priority for Amazon. Using employment data, Newark and Philadelphia rank low compared to cities in the South and West.

While high on unemployment, Toronto rates well on job growth compared to its American peers. For the most part, southern cities dominate the top of the list.

But along with looking for employees, Amazon has to look out for itself. How do these cities rate on taxes? Once again, southern cities stand out, though the results are a little murky: While Texas and Ohio have no corporate income tax, putting Columbus, Austin and Dallas atop the rankings, those states do have a gross receipts tax, which can put a significant burden on businesses.

If you look at the Tax Foundation's most recently business-friendly state rankings, Indiana comes out on top among the finalists.

Newark ranks fourth-to-last in corporate income tax, but it's got an ace up its sleeve: the $5 billion in tax incentives from New Jersey, and a possible $2 billion from the city of Newark itself. The offer would be the biggest in state history.

It's not the only one offering something, though. Most cities have chosen not to publicize their bids, but Chicago, Pennsylvania and California have all offered tax incentives ranging from the hundreds of millions to billions of dollars. Other cities might be offering more qualitative incentives, like research partnerships or housing for employees.

A liveable city

Amazon asked for a "high quality of life" for its employees, but it's hard to say what constitutes "quality." Miles of sidewalks, breathable air, number of bars? One easy metric to measure is affordability, since Amazon employees need to live close to where they work without going bankrupt.

New York City and Washington, DC, are nearly knocked out of the ranking in this category compared to the Midwest and the South. But those regions tend to rate lower in another topic mentioned under Amazon's proposal: A strong transit system.

For example, Columbus, Indianapolis, Nashville and Raleigh are missing a subway or rail system. In comparison, New York City, Boston, Philly, Chicago and L.A. have high-rated subway systems.

Adding it up

And the Amazon Golden Cardboard Box Award goes to...Raleigh! Yes, there's lots of love and hope for Newark, but at least by the data, it's not even an honorable mention. Raleigh and Austin are the best fits, as strong economies and affordable living put them above the rest.

The dark horse may be one state over, in Pittsburgh, which was the only Northeast city to earn above a C.

A note about the grading: In order to calculate the grades, we assigned each city a percentile for each category, then averaged those percentiles to arrive at a general rank, curved to 100 percent.

Erin Petenko may be reached at epetenko@njadvancemedia.com. Follow her on Twitter @EPetenko. Find NJ.com on Facebook.

Disha Raychaudhuri may be reached at draychaudhuri@njadvancemedia.com. Follow her on Twitter. Find her on Facebook.