Boston Mayor Martin Walsh celebrates his reelection to a second term at an election-night party in Boston. (AP)

Republicans are still counting the upsets and losses in Tuesday’s local races. The defeat in Virginia has been analyzed plenty; it’s races further down the ballot, especially in suburbs, that have made Democrats grow more confident about the 2018 midterms. Here’s a guide to what switched hands, which will be updated as runoffs and recounts continue.

Colorado. Local progressives helped Crystal Murillo, a Democrat, take a Republican-held city council seat in Aurora, a suburb of Denver.

Massachusetts. Boston’s Democratic mayor, Marty Walsh, won a second term as was widely expected. But further down the ballot, left-wing Democrats made serious gains, starting with lawyer Lydia Edwards winning a seat on Boston’s city council. Members of DSA unseated more conservative Democrats on Somerville’s board of aldermen; the liberal city’s board now consists entirely of candidates backed by Sanders’s group Our Revolution. In Worcester, the Working Families Party helped put an education activist on the school board.

New Hampshire. For the first time in 14 years, Democrats seized control of this state’s biggest city, making Joyce Craig the first female mayor of Manchester. That result was presaged by Democratic wins in state legislative races near the city all year — and it was capped off when Democrats upset Republicans by just 20 votes to grab another state legislative seat in Manchester. Since last year, Democrats have slashed the GOP’s conference in the House of Representatives from 226 to 218.

New Jersey. Gov.-elect Phil Murphy was a favorite to win from the moment he won the Democratic nomination. The only question about his bid was how long his coattails might be. The answer: Not long enough to add to the Democrats’ sold legislative majority, but long enough to take back Atlantic City and to break a long Republican hold on Parsippany, the sort of suburb where the Trump backlash has brought Democrats from the fringe to contention.

New York. Some of the first electoral warning shots of the Obama era came in November 2009, when Republicans ousted struggling Democratic county executives in Westchester and Nassau counties, which border New York City. On Tuesday, Democrats grabbed both counties back, taking Nassau narrowly and taking Westchester — home of Hillary Clinton — in a landslide. Republicans held off a Democratic wave only in the western city of Binghamton.

North Carolina. Few states have thrown up obstacles to Democrats like this one, where Republicans, perhaps in the final months of a favorable gerrymander, have partially defunded the Democratic attorney general’s office and broken up judicial districts that favored their opponents. But there is no gerrymandering cities, and Democrats took full advantage of their urban growth, easily retaining city hall in Charlotte and winning it in Fayetteville.

Pennsylvania. Republicans picked the lock on this state’s presidential vote last year — and one year later, lost the keys to local offices. Democrats surprised themselves by scooping up local offices throughout the Philadelphia suburbs, and easily holding city halls in places where the party suffered last year, like Erie and Scranton.

Washington. By all appearances, Democrats easily won the 45th state Senate district — and with it, control of every state government along the West Coast. But by dint of Washington’s vote-by-mail law, there will be no official call in the race until later this week, when ballots postmarked on Tuesday are opened. Gov. Jay Inslee (D-Wash.) and most state Democrats have already congratulated Manka Dhingra, their nominee; Republicans have not yet conceded.