(CNN)There's a clear divide among Republicans retiring from Congress.
Those leaving office without a clear next political step tend to come from places where Trump is less popular. On the flip side, Republicans are more likely to leave the House to seek higher office if Trump was more popular in their districts.
Twenty-five Republicans have announced they will retire and leave Congress and 13 have announced they will leave Congress to run for another office, according to CNN's House departures tracker.
From those 25 retirements, 17 members hail from districts where the presidential vote for Trump in 2016 was below the national average in districts won by Republicans. Only eight members -- less than half of those retirements -- hail from districts where Trump was more popular than the national average. These tallies are computed using data compiled by Daily Kos Elections, and the results are the same when comparing against the median district vote for Trump.
It's the reverse situation when looking at Republicans who have decided to leave Congress without an announced next step in their political career.
Only four Republicans who are leaving Congress to run for higher office hail from districts where Trump's popularity was below the national average. But nine hail from districts where Trump's popularity was above the average.
While retiring Republicans often cite spending more time with family as a reason for leaving, it's also been the case that the home districts of many members leaving have been squarely in the crosshairs of Trump's most divisive issues: from immigration to Obamacare to higher state and local taxes during the tax reform debate.
Washington Rep. Dave Reichert, who is one of 23 Republican members who hails from a district that Hillary Clinton won, is often understood by his constituents to be a moderate. He voted against the Obamacare repeal bill pushed by Republican leaders after aggressive lobbying by his constituents. Reichert also opposed imposing penalties on so-called sanctuary cities and supported sanctions on Russia. Reichert, who has criticized Trump's rhetoric on immigration and expressed support for special counsel Robert Mueller, announced his retirement in September.
A similar story can be told about other more Republicans from districts skeptical of Trump, from Pennsylvania Rep. Charlie Dent to New Jersey Rep. Frank LoBiondo to California Rep. Darrell Issa.
Trump's also been a factor among some members who have been more supportive of his agenda. Michigan Rep. Dave Trott has voted with Trump on every piece of his agenda, with the exception of a bill to impose additional sanctions on Russia, according to Fivethirtyeight's agenda tracker. But when Trott announced his retirement, he made it plain: "Trump was a factor in my decision to retire," he told CNBC. "It's a very partisan environment and I think that problem has been exacerbated under President Trump."
But support for Trump was not very strong in Michigan's 11th Congressional District in 2016 -- the President only won it by four points. An incumbent like Trott might be particularly vulnerable to an energized Democratic base like the one that flipped a long-held Republican seat in Pennsylvania. Trott announced in September he would not run reelection.
Those leaving Congress to run for a new office and advance their careers are doing so in places where Trump support is more solid or on the rise. In West Virginia, Rep. Evan Jenkins announced he'll run for Senate to take on Democrat Joe Manchin. Gallup recently found that West Virginia has the highest job approval for Trump of any state. Trump had a 41-point margin on Clinton there in the 2016 election, up from Republican candidate Mitt Romney's 27-point margin.
Other states where Trump's support remains high are seeing House members looking for a promotion.
According to Gallup, North Dakota has the second-highest approval of Trump. North Dakota Rep. Kevin Cramer is running for Senate. South Dakota is ranked fourth. South Dakota Rep. Kristi Noem is running for Senate.
In Tennessee, where retiring Sen. Bob Corker has clashed with Trump, Trump support is still relatively high, tenth in Gallup's rankings. Two representatives of the state, both from districts with very high Trump support, will run to replace Corker.
The data suggests Republicans can fall into two camps -- emboldened by the President and his policies, or fearful of the backlash they will cause.