This article relies too much on references to primary sources. (August 2013) ( Learn how and when to remove this template message)
The Cook Partisan Voting Index, often abbreviated as CPVI or simply PVI, is a measurement of how strongly a United States congressional district or state leans toward the Democratic or Republican Party, compared to the nation as a whole. The index is updated after each election cycle. The Cook Political Report introduced the PVI in August 1997 to better gauge the competitiveness of each district using the 1992 and 1996 presidential elections as a baseline.  The index is based on analysis by the Center for Voting and Democracy (now FairVote) for its July 1997 Monopoly Politics report. 
PVIs are calculated by comparing a congressional district's average Democratic or Republican Party share of the two-party presidential vote in the past two presidential elections to the national average share for those elections. For example, the national average for 2004 and 2008 was 51.2% Democratic to 48.8% Republican.  In Alaska's at-large congressional district, the Republican candidate won 63% and 61% of the two-party share in the 2004 and 2008 presidential elections, respectively. Comparing the average of these two district results (62%) against the average national share (49%), this district voted 13 percentage points more Republican than the country as a whole, or R+13.
Prior to its April 2009 update, the PVI formula compared district-level results for the past two presidential elections to nationwide results for only the most recent election. Since then, local elections are compared to synchronic national elections.  The change to an "apples-to-apples" comparison was the result of advocacy by David Nir of the Swing State Project. 
The Cook PVI is displayed as a letter, a plus sign, and a number. The letter (either a D for Democratic or an R for Republican) reflects the major party toward which the district (or state) leans. The number reflects the strength of that partisan preference in rounded percentage points. A district or state without a partisan tilt is designated as "EVEN".
This section does not cite any sources. (April 2018) ( Learn how and when to remove this template message)
The most Democratic congressional district in the country is New York's 15th, located in the Bronx, with a PVI of D+44. The most Republican district is Texas's 13th at R+33. As for states as a whole, Wyoming and Utah are the most Republican at R+25, and Hawaii is the most Democratic at D+18.
The most Democratic district relative to its state is Tennessee's 9th, being D+28 in an R+14 state (a 42-point difference). The most Republican relative to its state is Illinois's 15th, being R+21 in a D+7 state (a 28-point difference). Of the 428 Congressional districts that are in states with more than one district, 104 lean to one party while their state leans to the other.
As of January 2019, the most Democratic-leaning congressional district that is represented by a Republican is New York's 24th; with a PVI of D+3, the district is represented by John Katko, who is the only Republican to represent a Democratic-leaning House district. As of January 2019, the most Republican-leaning congressional district that is represented by a Democrat is Utah's 4th; with a PVI of R+13, the district is represented by Democrat Ben McAdams. Following the 2018 elections, there were 36 Republican-leaning House districts represented by Democrats.
In the Senate, the most Republican-leaning state to have a Democratic senator is West Virginia, represented by Joe Manchin. The least Democratic-leaning state to have two Democratic senators is New Hampshire, represented by Jeanne Shaheen and Maggie Hassan. The most Democratic-leaning state to have a Republican senator is Maine – with Susan Collins. The least Republican-leaning state to have two Republican senators is Florida, represented by Marco Rubio and Rick Scott.
Four of the (index-based) Republican-leaning states have Democratic governors, while three Democratic-leaning states have Republican governors.
This table is sourced from the Cook Political Report's 2016 analysis for districts of the 116th United States Congress, calculated according to the results of the 2012 and the 2016 U.S. presidential elections.  The party representations are based on the winners of the 2018 U.S. House elections. In the House, there are 235 districts that lean Republican, and 192 districts that lean Democratic.
The following district is ranked on the Cook PVI, as it participates in presidential elections. It is represented by a non-voting delegate.
The following districts are not ranked on the Cook PVI, as they are territories that do not participate in presidential elections. Each is represented by a non-voting delegate.
*Caucuses with Democrats
*An independent senator caucuses with the Democrats.