Scientists often pride themselves on staying out of politics. But in the face of the US withdrawal from the Paris climate agreement, devastating budget cuts, climate denial in schools, and gag orders on science, some are newly willing to throw off their goggles and dive into the fray. Tens of thousands of scientists and their supporters turned out for April’s March for Science in Washington, DC, and 500 cities around the world. And many US scientists are gearing up to run for office, largely setting their sights on Congress—now a hotbed of anti-science rhetoric.

As a biologist myself, I think Capitol Hill could certainly use some advocates for evidence. But before Americans can come together to elect officials who will defend science from its attackers, they must first be able to effectively exercise their vote. I believe that scientists’ analytical skills could go a long way to fight against the problem of partisan gerrymandering—and that’s why scientists should be running for state legislature.

Both sides of the political spectrum have historically dabbled in the art of drawing district lines to ensure wins for their own team. And it’s (mostly) legal. But in 2010, redistricting became more science than art, broadening the scope and scale of partisan gerrymandering.

In a 2010 op-ed for The Wall Street Journal, former George W. Bush staffer turned Republican consultant Karl Rove advertised the GOP’s strategy for winning back Congress. “He who controls redistricting controls Congress,” he wrote.

Rove’s idea was simple. 2010 was a Census year, which meant that Congressional maps would be redrawn to account for population shifts. So to win back Congressional seats, Republicans needed to regain control of state legislatures in key states, then draw district lines to guarantee Republican victories. And so Republican leaders poured money and expertise into REDMAP for Redistricting Majority Project: a plan that transformed redistricting into a thing of data science.

High-resolution gerrymandering became a reality in 2010 with the advances in the power of computing and data processing, which had become more widespread and user-friendly since the redistricting that took place a decade before. With REDMAP’s simple strategy as a guide, voters became data points fed into algorithms to carve districts with the precision of a scalpel. Informatics engineered 2012’s sweeping Republican wins in purple states like Pennsylvania, Wisconsin, and North Carolina, where Democrats received more than half the vote, but Republicans were awarded over two-thirds the House seats.

But informatics can also be implemented as a tool to counter gerrymandering. Michael Latner, a political scientist and co-author of Gerrymandering in America, tells me: “Greater usability and availability of mapping software has made it easier for us to detect gerrymandering.” This fall, Latner is joining the Union of Concerned Scientists, a nonprofit science and advocacy organization, to better develop the science around voting rights and representation.

Already, scientists are putting their powers of data analysis to use to define what it means to draw a fair district. Political scientists like Latner have been working with computer scientists who can, for instance, automate algorithms to churn out millions of possible district maps with varying degrees of partisan bias. With a huge sampling of hypothetical maps, scientists can suss out whether bias under a current districting plan is an extreme outlier, rigged by an intentional gerrymander. Mathematicians have joined in too , taking on the challenge of formalizing a definition for “compactness,” which refers to how weird the shape of a district can be. The most famous example of geometric weirdness is the “salamander” district drawn up in 1812 Massachusetts by the eponymous Governor Gerry—proof that even 19th century Americans enjoyed a snarky portmanteau. Today, examples persist in Maryland’s “The Praying Mantus,” Pennsylvania’s “Goofy Kicking Donald Duck,” and Texas’s “Upside-Down Elephant.”

By taking a deep dive into redistricting, researchers are helping to clarify how the US democracy can maximize political participation and representation in elections. With a Supreme Court hearing on partisan gerrymandering in Wisconsin around the bend, this research can’t come soon enough. Extreme cases of partisan gerrymandering have always been considered unconstitutional. But “extreme” had never been defined until 2016’s Whitford v. Gill, in which a three-judge panel struck down Wisconsin’s state assembly map as unconstitutional.

At the heart of the Wisconsin ruling was a newly coined standard for assessing redistricting plans, known as the “efficiency gap.” The ultimate goal of partisan gerrymandering is to create politically safe districts, either by concentrating the opposition party into one district (“packing”) or diluting their vote across many districts (“cracking”). Opposition voters effectively waste their votes, casting them in elections where their party has no chance of winning.

The efficiency gap measures just how many votes are wasted within a given redistricting plan. This new standard will be on trial when the Supreme Court adjourns.

But to place all hopes for a formalized check against gerrymandering in the judiciary would be unwise. Wisconsin’s gerrymandering case will appear in front of a majority-conservative court. And even if the Supreme Court upholds the lower court’s decision, past elections and policy decisions won’t be undone.

The judicial process takes time. But the 2020 Census, which will allow new redistricting lines to be drawn, is right around the corner. And so scientists who really want to make a difference should consider embedding themselves in state legislatures, where they can use their skills of data analysis and evidence evaluation to champion fair districting.

The task is not trivial. Sophisticated legislators and policymakers with a vested interest in curbing the right to vote routinely appropriate the language of data and statistics to further their agenda. And Kansas Secretary of Sate Kris Kobach — who has been sued four times by the American Civil Liberties Union for voter suppression — is heading a new “Election Integrity” Commission to investigate claims of voter fraud.

The rigor and accuracy of the 2020 Census itself remains uncertain. As the decennial count looms near, the agency has been left without a leader in a critical moment for the tally. Earlier this month, the Census Bureau Director stepped down from his post in response to inadequate funding necessary to generate an adequate and representative national head count. This vacuum of power could open up gaping holes in the population data used to draw districts. Here in particular, a scientist’s powers of informed inference could go a long way in bridging data gaps to ensure a fair distribution of every citizen’s political power to vote.

Democracy hinges on ensuring the participation and representation of all voters, regardless of their political ideology. And scientists have a real stake in the fight for the restoration of representative democracy. “This is not a partisan policy battle. This is a fight to better understand the way that democracy functions,” Latner asserts. “We can’t do that if there are systematic biases that are bending policy in one direction or another.”