California gets the nation’s second-largest positive economic contribution from its immigrant residents, says one new ranking.

Analysts at online financial information firm WalletHub looked at 23 economic and demographic factors to rank states by how much benefits immigrants provide. The report did not look at the legal status of immigrants.

California trailed only New York in the scale of benefits from their immigrant populations and was just ahead of New Jersey. The least immigrant benefits were found in Mississippi, then Wyoming and Idaho.

To do its scorecard, WalletHub broke the immigrant data into four slices. Here’s how those categories were graded:

Immigrant workforce: California got a No. 5 ranking. Tops: New Jersey, Florida and New York. Worst? Montana, Mississippi and Wyoming.

Socioeconomic contribution: California was No. 1 followed by Hawaii and Florida. Worst? Louisiana, Kentucky and Alabama.

Brain gain/Innovation: California was No. 3 behind New York and Delaware. Worst? Wyoming, Idaho and Mississippi.

International students: California got a No. 9 ranking. Tops was Washington, D.C., Massachusetts and New York. Worst? Alaska, Nevada and Mississippi.

Now we’ll add a caveat to this study: Like most rankings, these are a more digestible way to ponder business trends rather than a serious analysis of dollars-and-cents policy issues. Still, they do provide a window into some complex topics.

Are you a real estate fan? Then sign up for The Home Stretch newsletter and its Bubble Watch edition. A twice-a-week review of what’s important for housing around the region! Subscribe here!

WalletHub added some nuggets about California’s immigrant economy, as it ranks nationally within the metrics used for the study:

No. 1 rankings: California has the largest share of jobs generated by immigrant-owned businesses and the largest share of foreign-born technology workers.

No. 6: Economic contribution of international students per capita.

No. 8: Share of jobs created by the presence of international students.

No. 12: Median household income of its foreign-born population.

No. 15: Share of Fortune 500 companies founded by immigrants or their children.

No. 23: Difference between state and local revenues and expenditures per immigrant..”Immigration, and how to handle it, continues to be a contentious topic in the United States in 2020,” WalletHub wrote. “Currently, much of the debate revolves around border security and President Trump’s border wall, which may receive $7.2 billion in diverted Pentagon funds this year. This proposition has divided lawmakers. But political differences aside, there’s no question that immigration as a whole affects the economy.”

PS: Since it’s a political year … My trusty spreadsheet tells me that “blue” states (the 20 plus D.C. that didn’t support President Trump in 2016) averaged a No. 17 rank in total score vs. No. 33 in the 30 red states that supported Trump.