CNBC ranks Texas No. 1 for business, but offers residents a few warnings

No. 1: Texas Total score: 1651 No. 1: Texas Total score: 1651 Photo: Getty Images Photo: Getty Images Image 1 of / 33 Caption Close CNBC ranks Texas No. 1 for business, but offers residents a few warnings 1 / 33 Back to Gallery

You did it, y'all. Texas is No. 1 for business according to CNBC's annual rankings.

It's the first time the Lone Star State has taken the top spot since 2012 and the fourth time overall since the rankings came out in 2007. There's a lot to be proud of in the news organization's glowing report.

Texas has a winning formula: no corporate or personal tax, smart spending, rising gas prices and an almost unbelievable rate of job growth. In fact, one out of seven jobs created in the United States came from Texas. With an annual GDP of $1.7 trillion, the state as the 10th largest economy in the world, according to CNBC.

NEWS YOU CAN USE: How to save $500 a year on electricity

In an accompanying editorial Governor Greg Abbott writes:

Innovation and self-reliance are deeply rooted in the Lone Star State, and when freed from the stranglehold of over taxation and overregulation, new ideas flourish. By limiting senseless government restrictions, the opportunity to succeed in business is as limitless as the land itself.

The rankings are given on the basis of workforce, infrastructure, cost of doing business, economy, quality of life, technology and innovation, education, business friendliness, access to capital and cost of living. Each category is weighted based on how often each state cite it in their sales pitches.

While Texas ranked high for infrastructure and economy, some areas the state did not do so well in raise legitimate concerns for the state's future.

The state ranked low in overall quality of life and education. Both are huge factors for businesses looking to move here. The news publication also points out some of the state's high-profile legal battles with the "bathroom bill" and "sanctuary cities" as tarnishing the state's image.

>>Scroll through the slideshow above to see the top ranked states. You can see the full report here.