Percentage of state’s voting-eligible population registered as Republican or Democrat

Although there are still more registered Democrats than Republicans in these key states, the margin is much smaller than it was in 2012.

In Colorado, the percentage of registered Republicans is lower than it was four years ago. While it was considered a swing state in 2008 and 2012, recent demographic shifts have pushed Colorado closer to the Democratic column.

The gains made by Republicans since 2012 have been especially sharp in North Carolina and Florida.

Net shift in Republican and Democratic registrations

Some of that uptick in Florida came from Democrats who switched their registration to Republican, said Karen Giorno, campaign manager in Florida for Donald J. Trump. The state, which has a closed primary, required people who wanted to vote in the Republican primary in March to register as Republican.

The increase in registered Republicans was pronounced in Florida counties that Mitt Romney won in 2012. Four years ago, registered Democrats slightly outnumbered Republicans in Baker County, but Romney won 79 percent of the vote there. The number of registered Republicans has increased by 17 percent since then, while the number of Democrats decreased by 16 percent.

But Democrats usually register more voters right before the election.

The final sprint hasn’t started yet. In 2012, the number of registered Democrats in Nevada in September and October increased by about 44,000, while the number of Republicans rose by about 21,000.

Change in total registered voters in 2012

As states remove deceased people and former residents from voter rolls, their total number of registered voters sometimes will decrease, as happened in Florida in March 2012.

The Clinton campaign is heavily investing in Florida, establishing numerous offices and outspending Mr. Trump on television ads. If early voting goes well in other areas, Mrs. Clinton might move even more resources into Florida.

This cycle, many voters aren’t registering as a Republican or a Democrat.

The number of registered Democrats and Republicans might not be a critical factor in this election. Since 2012, more voters have chosen not to register for either party. In North Carolina, there are nearly as many registered voters with no party affiliation as there are registered Republicans.

Percent increase since 2012 in registered voters not affiliated with a major party

Attracting these voters could be even more important in future elections. In Nevada, 36 percent of unaffiliated voters are 34 or younger, compared with 26 percent of registered Democrats and 18 percent of registered Republicans.