Bipartisanship these days is rare as grass around a hog trough. Even before the Memorial Day “scuffle” on the Texas House floor, the most high-profile issues this session were nearly all its most divisive: Bathroom bills and “show me your papers” laws made for great, conflict-driven news.

But are we really as divided as we think? Being the data nerds we are, we decided to take a closer look. We found that bipartisanship isn’t dead yet, if you look at the bills that ultimately become law. In fact, bills with bipartisan co-sponsorship were much more likely to become law in Texas in 2017 than bills sponsored entirely by Republicans or entirely by Democrats.

According to the the open data project OpenStates, more than 10,000 pieces of legislation were filed in the 85th session. We tagged them according to whether they were signed into law by the governor or became law without the governor’s signature. Setting aside resolutions (like the convention of states resolution), we ended up with a data set of just over 6,400 bills, 1,161 of which became Texas law.

Wanting to know whether bills with bipartisan support were more or less likely to become law, we created a measure of the proportion of Republican cosponsors on a bill: A bill with 50/50 Democratic/Republican co-sponsorship got a score of 50, a bill with all Democratic cosponsors got a score of 0, and a bill with all Republican cosponsors got a score of 100.

At first glance, the numbers seem to support the idea that partisanship is rampant: Of the 1,161 bills that became Texas law, a little over half had zero bipartisan support. 468 had all Republican sponsors, and 184 of them had all Democratic sponsors.

But if you look between those two poles, a more nuanced story emerges: Even though a slight majority of bills that became law in 2017 were highly partisan, highly partisan bills actually had a worse chance of becoming law when compared to partisan bills: Partisan Republican bills had about a 16 percent chance of passage, and partisan Democratic bills had about a 8 percent chance. Bipartisan bills, by contrast, had around a 44 percent chance of passage.

The data we used aren’t perfect: They don’t, for example, distinguish among the different types of sponsorship in the Lege (co-sponsorship, authorship, etc.). Still, we think the data share a more optimistic story about the Texas Legislature than the fisticuffs at the end of this session suggest: Despite hotly partisan rhetoric, if Texas legislators want to have the greatest chance of getting their bills into the law books, they should continue to look for partners across the aisle. Second, it means centrist and independent Texas voters can take some heart: There are indeed legislators who work across the aisle to put together the bipartisan legislation that makes up nearly half of the bills that become law in Texas.

Disclosure: The LBJ School of Public Affairs at the University of Texas at Austin has been a financial supporter of The Texas Tribune. A complete list of Tribune donors and sponsors can be viewed here.