Incubated in a Data Science for Social Good Fellowship, the Legislative Influence Detector aims to increase government transparency.
A Wisconsin bill banning all nonemergency abortions at 20 weeks, signed into law last July, received national media attention. UChicago data scientist Joe Walsh estimates about a thousand articles were written about the bill. Few of them, however, mentioned that the Wisconsin legislation was nearly word-for-word identical to the Texas abortion bill that state senator Wendy Davis famously filibustered in 2013—and to 72 other bills introduced in 41 state legislatures in the past few years. States pass a lot of bills. According to a Washington Post analysis, in 2014 the average state government passed 462 new laws (by comparison, the 113th Congress passed 296 laws in two years). However, state lawmakers “often don’t have the staff and the expertise and the time to write legislation,” says Walsh, so they introduce bills passed in other states or written by advocacy groups. There are also far fewer reporters covering politics in Springfield, Illinois, or Lansing, Michigan, than there are in Washington, DC, and therefore less journalistic oversight of the hundreds of bills passed in state capitols. “That means there are a lot of groups that are able to exercise disproportionate influence in getting legislation that they like passed,” says Walsh. “We wanted to know if we could use data science to identify those groups.” This past summer, Walsh, project manager Lauren Haynes, and a team of three data science fellows developed a text analysis tool to help track copied legislation across state capitols and uncover lobbyists’ influence. They were one of 12 teams supported by a 2015 Eric and Wendy Schmidt Data Science for Social Good Summer Fellowship. DSSG pairs teams of paid fellows, usually students or recent graduates with an interest in social issues, with mentors like Walsh and a public or private sector partner to find data-driven solutions for a specified problem. The fellowship is run by the University’s Center for Data Science and Public Policy, a collaboration between Chicago Harris and the Computation Institute. In 2015 teams developed programs and algorithms to help the City of Cincinnati predict which buildings would fail inspections, to anticipate instances of childhood obesity and cardiac arrest at NorthShore University Health System, and to identify students at Montgomery County Public Schools in Maryland at risk of falling behind. Walsh and his team worked with the Sunlight Foundation, a nonprofit focused on government transparency that had amassed a trove of more than 500,000 state bills and pitched the project to DSSG. The fellows supplemented the Sunlight Foundation data with 2,400 pieces of model legislation collected from five major lobbying groups, including the conservative American Legislative Exchange Council and the liberal State Innovation Exchange. A lot of the model legislation was publicly available on the groups’ websites, says Walsh—“It’s kind of surprising how much stuff is out there.” Their text analysis tool, the Legislative Influence Detector (LID), uses a local alignment algorithm, akin to algorithms used to identify like strands of DNA, to find similar pieces of legislation. The algorithm is accurate but slow—running all the bills the fellows had collected through the algorithm would have taken thousands of years, says Walsh. So the team added a preliminary step: LID first uses a “bag of words” tool similar to plagiarism detection software to check for the same words, in any order, and find the most probable 100 matches to a specific bill. Then LID uses the local alignment algorithm to find the legislation with the same words in mostly the same order. Running the Wisconsin abortion bill through LID turned up matches from across the country that were almost identical, differing mainly in small stylistic choices, such as writing out a number instead of using numerals, and the occasional misspelling. (The team then turned to Google and found matching model legislation on the website of Doctors on Fetal Pain, an antiabortion advocacy group.)