The credit and financial website WalletHub took the occasion of the nation’s birthday to determine what U.S. city is the best place to celebrate the Fourth of July. Using 20 key metrics to rank the 100 largest American cities, New York City came in first place,with Washington, D.C., coming in fourth.

Los Angeles took second place, San Diego came in third, and, following D.C., Las Vegas ranked No. 5.

“There’s nothing more American than going all out on Fourth of July,” WalletHub wrote about its research. “We grill, we drink and we blow stuff up — all in the name of freedom. But freedom is not free.”

“Everything from hotdogs to travel to hospital bills following fireworks accidents costs major scratch,” Wallethub wrote. “In fact, the National Retail Federation projects that American households this year will spend a collective $6.8 billion — down from last year’s $6.9 billion — on Fourth of July food alone.”

Metrics included the cost of beer and wine, fireworks shows, and the Fourth of July weekend weather forecast.

Based on the data collected, the American cities rounding out the Top ten best places to celebrate the Fourth of July are, in order: Dallas, Atlanta, Chicago, San Francisco, and St. Louis.

The American cities in the bottom ten are, from 91 to 100 — Aurora, Colorado; Chula Vista, California; Corpus Christi, Texas; Laredo, Texas; Bakersfield, California; Birmingham, Alabama; Hialeah, Florida; Lubbock, Texas; Memphis, Tennessee; and San Bernardino, California.

The WalletHub report also includes these Independence Day facts and figures:

$6.8 Billion: Amount Americans plan to spend on 4th of July food.

$6.8 Billion: Amount Americans plan to spend on 4th of July food. 150 Million: Number of hot dogs eaten each 4th of July.

150 Million: Number of hot dogs eaten each 4th of July. $1.6+ Billion: Amount we plan to spend on 4th of July beer and wine.

$1.6+ Billion: Amount we plan to spend on 4th of July beer and wine. $1+ Billion: Amount we’re expected to spend on fireworks in 2019 (67 percent of fireworks injuries occur within a month of July 4).

$1+ Billion: Amount we’re expected to spend on fireworks in 2019 (67 percent of fireworks injuries occur within a month of July 4). $5.4 Million: Value of American flags imported annually (mostly from China).

$5.4 Million: Value of American flags imported annually (mostly from China). 47+ Million: Number of people who travel 50+ miles from home for the 4th of July.

Follow Penny Starr on Twitter