I shared some code on GitHub that scrapes and formats information on US State legislative majorities from Ballotpedia.