U.S. Democratic presidential candidate Joe Biden gestures as he speaks during a drive-in campaign event at Bucks County Community College in Bristol, Pennsylvania, October 24, 2020.Kevin Lamarque | ReutersJoe Biden’s birth state delivered.To win back Pennsylvania for Democrats in the 2020 presidential election, the president-elect had to improve upon Hillary Clinton’s 2016 performance across wide swaths of the state.Biden will beat President Donald Trump in the Keystone State after the Republican incumbent carried Pennsylvania four years ago, according to NBC News. The former vice president leads his GOP opponent by more than 45,000 votes with some ballots outstanding. Trump won Pennsylvania by a similar margin of about 44,000 votes in 2016.To start, Biden leads in two of three often discussed counties that supported President Barack Obama twice before flipping to Trump in 2016. He holds an advantage in both Erie County in the northwest corner of the state and Northampton County on its eastern border.He came nowhere close to winning back Luzerne County, an area in northeast Pennsylvania that saw a more than 20 percentage point swing toward the GOP in 2016. Even so, Trump won the area by about 15 percentage points in 2020, down from 19 percentage points four years ago.Eastern Pennsylvania played a huge role in propelling Biden to the White House. He won the Democratic stronghold of Philadelphia County, home to the country’s sixth-most populous city, by about 63 percentage points or more than 440,000 votes. The figures could move more in Biden’s favor as Philadelphia counts its final ballots.Still, Trump has so far fared better there than he did in 2016. Clinton carried the county by 67 percentage points.Biden significantly improved upon Clinton’s margins in the areas surrounding Philadelphia. He won Delaware County by about 26 percentage points, after his predecessor as the Democratic nominee carried it by 22 points.In Montgomery County, his 26 percentage point advantage beat out Clinton’s 21-point edge. Biden also carried Chester County by about 17 percentage points, compared with the former secretary of state’s roughly 10 percentage point margin of victory.Further north, Biden won Lackawanna County by more than 8 percentage points. Clinton carried the area, which includes the president-elect’s hometown of Scranton, by about 3 points.It wasn’t just eastern Pennsylvania that boosted Biden. He improved upon Clinton’s margins in the blue counties of Dauphin, where the state capital of Harrisburg sits, and Centre County, which includes Penn State University.He also saw a bump in support in western Pennsylvania. Allegheny County, home to the state’s second-most populous city, Pittsburgh, backed Biden by about 20 percentage points. Clinton won the area by roughly 17 percentage points in 2016.Biden even cut into Trump’s margins in the red areas surrounding Pittsburgh. Even though the incumbent overwhelmingly won the counties of Washington, Westmoreland, Butler and Beaver, his margin of victory dropped by at least a percentage point in all of those areas compared with 2016.The trend carried across a range of conservative counties in the state, where Biden performed at least slightly better than Clinton did four years ago.One factor at play is a smaller third-party presence in Pennsylvania. Libertarian Jo Jorgensen won 1.1% of the 2020 vote, while Green Party candidate Howie Hawkins did not make the presidential ballot.Four years ago, Libertarian Gary Johnson and Green Party candidate Jill Stein combined to win more than 3% of Pennsylvania votes.Subscribe to CNBC on YouTube.