Political success doesn’t depend solely on who controls the branches of government. Sometimes all it takes to thwart a party’s agenda is a little bit of office dysfunction — look no further than the current occupant of the White House.

The same consideration applies to anyone angling to replace President Donald Trump, which is why HuffPost went looking for a way to quantify the health or toxicity of those would-be candidates’ current workplaces. Ultimately, we turned to Legistorm, a vast database of congressional staffers and their salaries, and its calculations of staff turnover.

Based on data from 2001 to 2017, here are the rankings for 17 members of Congress who are thought to be exploring a Democratic Party run for president, from greatest turnover to least:

Rep. Tulsi Gabbard (0.40)

Sen. Amy Klobuchar (0.35)

Rep. John Delaney (0.26)

Rep. Eric Swalwell (0.25)

Sen. Michael Bennet (0.23)

Rep. Beto O’Rourke (0.23)

Sen. Kirsten Gillibrand (0.21)

Sen. Bernie Sanders (0.19)

Sen. Cory Booker (0.17)

Sen. Jeff Merkley (0.16)

Sen. Sherrod Brown (0.15)

Sen. Mark Warner (0.15)

Sen. Chris Murphy (0.13)

Sen. Elizabeth Warren (0.13)

Sen. Kamala Harris (0.12)

Sen. Tim Kaine (0.11)

Rep. Tim Ryan (0.11)

The number next to each name — the “turnover index” — reflects the share of salaries within each member’s office that has turned over as opposed to the share of people. Legistorm uses this calculation so that the departure of highly paid staff, who in theory have more desirable jobs, outweighs the departure of lower-paid staff, who may more readily move around.

The list comes with several caveats, the biggest being that turnover isn’t automatically the product of a dysfunctional office. It can just as easily reflect a change in the lawmaker’s staffing needs (due to, say, a new committee assignment) or a fluke. The more recently a member was elected to Congress, the smaller the sample size will be and the less reliable the calculation in describing long-term trends.

Members of party leadership also tend to have higher staff turnover because their offices offer a stepping stone to other plum positions. In fact, when Legistorm uses its turnover index to make its own “Worst Bosses?” list, it excludes party leaders. Nearly half the members on HuffPost’s list have at one point served in party leadership: Brown, Gillibrand, Murphy, Ryan, Sanders, Warner and Warren.

In addition, staff turnover tends to surge when a lawmaker prepares to leave Congress or run for a new office. O’Rourke announced his bid for the Senate in March 2017, and Delaney announced in June 2017 that he was running for president.

Finally, Legistorm’s calculations don’t include interns, fellows, shared staff or anyone employed less than 30 days. And of course, Legistorm’s data doesn’t cover mayors or governors contemplating a presidential run in 2020.

So why look at the numbers at all?

Because, as Legistorm puts it, “Offices with the most staff turnover might also include some of the worst bosses.” A bad boss can foster an ineffectual office — one that doesn’t truly serve the member’s constituents or accomplish legislative goals on behalf of voters.

We also want to ask: What’s driving the turnover? If you’ve worked in one of the more tumultuous offices on this list, we’d love to hear from you about what’s going on. Get in touch at molly.redden@huffpost.com.