For the first time ever, wind has surpassed coal as an energy source in Texas.

Data released this month by the Electric Reliability Council of Texas shows wind created 22 percent of the electricity used in the first half of the year, edging out coal by 1 percentage point.

Texas is the largest consumer of coal in the country, according to the Energy Information Administration. But cheap natural gas and renewable energy prices are biting into coal's market share.

Another reason for wind's competitiveness this year could be the weather.

Many of the coal plants in Texas are "peaker plants," meaning they operate only when electricity demand is high. A mild spring and summer may have kept demand lower than expected and some of those plants offline.

Natural gas still continues to produce more electricity than any other source, at 38%. Solar energy accounts for about 1% of electricity here. Daniel Cohan, a civil and environmental engineering professor at Rice University, said that number could slowly tick up.

“For several years in a row now, we’ve had almost a doubling of the amount of solar farms in Texas," he said. "And it looks like we’re set to have a few more doublings ahead. So, Texas is really becoming one of the growth areas for solar after a very slow start."

Cohen said this move toward renewables will help combat climate change.

“It still remains to be seen whether [wind] surpasses coal for the entire year," he said. July and August are typically the biggest months for coal generation, and coal could pull ahead.

"But, so far, it just illustrates the big transition that we’re having away from coal and toward wind power," he said.