The three ratings
Maine Political Data makes use of three rating metrics: the Partisan Electoral Alignment Index, Base Advantage and Unenrolled Lean, to describe how voters behave in an area. These three metrics were developed by Matthew Gagnon, Chief Executive Officer of Maine Policy Institute, and are intended to give researchers a better idea of the true political culture of the state.
Every place page opens with three tiles. Together they answer one question: how does this place actually vote, and where does that result come from? All three are two-party margins, written the way election results are written: D+12 means the Democrat runs 12 points ahead of the Republican among voters who chose one of the two. Positive numbers are Democratic, negative are Republican. Every figure is an average over the last four general elections, so a single unusual year cannot swing it.
Under the tiles, each place is ranked against the 504 Maine towns, cities and plantations with enough votes and registrations for a stable estimate (the registration and results pages count places differently because each counts what its own source reports), on each rating, counted from whichever end it is closer to: "82nd most Democratic on outcome" means 81 towns have a more Democratic Partisan EAI. In that line, outcome is the Partisan EAI, base is the Base Advantage and unenrolled lean is the Unenrolled Lean. Counties and districts are ranked the same way against their own kind.
Partisan EAI (Partisan Electoral Alignment Index)
Column: partisan_performance
The Partisan Electoral Alignment Index is a custom evaluation methodology metric developed to describe the overall electoral performance of a given political unit.
The Partisan EAI is an attempt to measure how election outcomes tend to go in an evaluated area. It represents the actual two-party margin in the major statewide and federal races, averaged over the window. Nothing is modeled. If a place voted for Democratic candidates by 16 points on average, the tile reads D+16.
Base Advantage
Column: partisan_base
This is how the enrolled partisans stack up. We take the place's enrolled Democrats and enrolled Republicans and ask what the margin would be if only they voted, and if they turned out and stayed loyal to their party at the rates Maine's enrolled partisans do statewide. It measures the registration base after correcting for the fact that enrolled partisans do not all vote and do not all vote the party line. It does not include unenrolled voters at all.
Unenrolled Lean
Column: unenrolled_lean_relative
This is which way the independents here break, compared with independents across Maine. Maine's unenrolled voters (what other states call independents) are the largest single bloc in most towns, and they are not one group. The unenrolled voters of a mill town in the Androscoggin valley are mostly former Democrats who still vote that way on some things and not others; the unenrolled voters of a coastal suburb are something else entirely. The tile shows how far this place's unenrolled voters lean from the statewide unenrolled vote in the same races. A reading of R+11 means: in the same elections, this town's unenrolled voters split about 11 points more Republican than Maine's unenrolled voters as a whole did.
The tile is relative rather than absolute for a reason explained under Unenrolled Lean below. The absolute figure, and the statewide figure it is compared against, are both in the scores tables (see the Data Sources page for how to obtain them).
A worked example
Lewiston, over the 2018–2024 window:
On paper Lewiston is a D+29 town: Democrats outnumber Republicans on the rolls by a wide margin. It performs at D+16. The 13-point gap has two causes, and the model separates them. First, Lewiston's enrolled Democrats are less loyal than the state's: a meaningful share of them vote Republican, a legacy of the city's Franco-American Democratic tradition outliving its politics. That costs the Democrats about 12 points of the base (the Base Loyalty figure, published in the full data). Second, Lewiston's unenrolled voters lean about 11 points more Republican than Maine's unenrolled voters overall, though because Maine's unenrolled lean Democratic in the window, Lewiston's still split slightly Democratic in absolute terms and add a point or so. Base, loyalty and unenrolled together reproduce the actual result within half a point.
Compare Hampden, where the story runs the other way: a Republican registration base (R+14) that ends up at D+1 because its enrolled Republicans leak Democratic votes and its unenrolled voters lean 15 points more Democratic than the state's. That is the situation people mean when they say the independents put a town in play. The tiles show whether they do, and for whom.
Data and races
Which elections count
General elections for President, Governor, U.S. Senate and U.S. House, over the last four even-year cycles (currently 2018, 2020, 2022 and 2024; each November, once the results are certified, the newest cycle enters and the oldest leaves). Each cycle carries equal weight, and within a cycle each office carries equal weight; the two U.S. House races count as one office. State legislative and county races are excluded: many are uncontested, candidate and incumbency effects dominate, and district lines cut through towns.
Two-party margins, and the 15 percent rule
Votes for independent and minor-party candidates are set aside; the margin is computed among Democratic and Republican votes only. A race is dropped altogether when candidates outside the two major parties take more than 15 percent of the vote, because the two-party framing then misdescribes the contest. In the current window that removes the 2018 and 2024 U.S. Senate races, both won by Angus King as an independent. Historically it also removes the 1992 and 1996 presidential races (Perot), the 1994, 1998, 2006 and 2010 governor's races and the 2012 Senate race. No candidate is ever recoded to a party they did not run under, and no race is removed because a candidate ran unusually well. The rule is a threshold, not a judgment.
Ranked-choice races (2018 onward) use first-choice votes. Declared write-ins are never counted as a party's nominee. Overseas and military ballots, which the state reports statewide rather than by town, are left out.
Registration
Active registered voters in each election year's November enrollment file from the Secretary of State, in four groups: enrolled Democrats, enrolled Republicans, unenrolled voters, and all minor parties together (Green Independent, Libertarian, No Labels and others). Where a small township's votes are reported by the state on another town's line, the two are combined for the vote count and the estimated rates are applied to each place's own registration.
The estimation model
The state publishes how many people in each town are enrolled in each party, and how many votes each candidate received there. It does not publish how enrolled Democrats, enrolled Republicans or unenrolled voters actually voted, because ballots are secret. Recovering group behavior from those town totals is the problem statisticians call ecological inference. It is the same method courts rely on in voting-rights cases to estimate how racial groups voted.
For every qualifying race we fit a Bayesian ecological-inference model across all of Maine's roughly 500 voting places at once (the RxC multinomial-Dirichlet model implemented in the PyEI library). For each group of registrants it estimates the share who voted for the Democrat, the share who voted for the Republican, and the share who did something else (voted for another candidate, left it blank, or did not vote). It produces two kinds of estimate:
- Statewide rates for each group in that race. In the 2024 presidential race, for example, it finds that about 92 percent of enrolled Democrats who voted chose Harris and 2 percent chose Trump; about 94 percent of enrolled Republicans chose Trump and 4 percent chose Harris; and unenrolled voters split about 26 to 22 for Harris, with the rest voting third-party, blank or not at all.
- Town-specific rates for each group in each town, estimated within the same model. Towns with many voters are estimated from their own returns; small towns are pulled toward the statewide pattern, which is what keeps a 40-voter plantation from producing a wild number.
The model's estimates reproduce each town's actual result closely: across the window, the model's reconstruction of the margin is within half a point of the real margin in towns with 500 or more unenrolled voters.
Base Advantage, step by step
The rates are the statewide ones, so a place's Base Advantage depends only on its own enrollment and on how Maine partisans behave in general. Race values are averaged within each cycle and then across the four cycles. Because loyalty is high in every race, the Base Advantage tracks the raw registration margin closely. It is best read as the registration edge, made honest about turnout and party loyalty.
Unenrolled Lean, step by step
The relative figure is what the tile shows. Here is why. The statewide unenrolled vote swings hard from race to race with the candidates on the ballot: in the same window Maine's unenrolled voters broke heavily for Susan Collins in 2020 and heavily for Democratic House candidates in 2018. Those swings are common to every town, and they say nothing about any particular place. Subtracting the statewide figure for the same race removes the candidates and the year and leaves the town. It also means the tile is not distorted by any one candidate's personal appeal: Jared Golden's strength with unenrolled voters in the Second District lifts every Second District town's raw lean by roughly the same amount, and the relative figure cancels it. No race is excluded for that reason, and none needs to be.
Relative leans are also far steadier. Within a town, the raw unenrolled lean varies by about 48 points from race to race across the window; the relative lean varies by about 12. The standard error of a town's relative lean, taken from that spread across the nine race slots, is typically three to six points in towns with 500 or more unenrolled voters.
The absolute figure is available in the data (unenrolled_lean) beside the statewide value for the same window (D+19 for 2018–2024). It carries an additional caveat described under Confidence and limits.
Base Loyalty
Column: base_loyalty · in the full data tables
Base Loyalty measures whether the enrolled partisans in a place vote the way their registration says. It is the Base Advantage recomputed with the town's own estimated partisan behavior instead of the statewide rates, minus the Base Advantage itself. A negative figure means the place's enrolled Democrats vote more Republican than the state's (or its enrolled Republicans are unusually loyal); a positive figure means the reverse. Madawaska, with a registration base of D+39 and a Base Loyalty of R+24, has enrolled Democrats who vote well to the right of the state's. Yarmouth's D+13 reflects enrolled Republicans who often vote Democratic.
This is the least certain of the figures, because it is the difference between two estimates and inherits both errors. Values within about five points of zero should be read as zero. Where it is large, it is confirmed by two independent sources: the change in each town's party enrollment since 2010 (towns whose Democratic enrollment eroded are the towns whose remaining Democrats vote right), and the same towns' votes on party-coded ballot questions such as Medicaid expansion and the 2025 voter-ID question.
How the pieces add up
Every place also carries a decomposition of its result into points of margin supplied by each group, using the town's own estimated rates for all of them. The pieces sum to the model's reconstruction of the actual margin. For Lewiston:
| Component | Column | Points | What it is |
|---|---|---|---|
| Enrolled partisans | base_impact_pts | D+14.0 | Base Advantage of D+29, reduced by the local loyalty shortfall, weighted by the partisans' share of the vote |
| Unenrolled voters | unenrolled_impact_pts | D+0.8 | Absolute unenrolled lean of D+8, at their estimated share of the vote |
| Minor-party enrollees | minor_party_impact_pts | D+1.6 | Green, Libertarian and other enrollees, at their estimated behavior |
| Model margin | model_margin | D+16.5 | Actual Partisan EAI: D+16.4 |
The unenrolled share of the vote (unenrolled_weight_pct) is the strength factor: a lean only matters in proportion to how many votes it moves. As explained below, the model understates this share, so the impact figures for unenrolled voters are conservative.
Counties, districts and precincts
Counties, congressional districts, State Senate and House districts, county commissioner districts and the state itself are never computed by averaging town ratings. The underlying estimated votes and registrants are summed first, and the margins are computed from the sums, so a large city counts for more than a small town. Districts use the current maps, with each town assigned from the Secretary of State's own precinct-to-district coding. Where a town is split between districts, its enrolled Democrats, Republicans and unenrolled voters are divided between the pieces according to the precinct enrollment files, so each piece gets its own share of each group.
Precincts within multi-precinct towns have their own Base Advantage, because the state reports enrollment by precinct. Their Unenrolled Lean and Base Loyalty are the town's, because the state has not published precinct-level vote counts for the 2018–2024 general elections. Forty-seven unorganized townships that report votes but have no voter registration of their own cannot be rated.
History and drift
The same ratings are computed for every general election back to 1990, both cycle by cycle and as the rolling four-cycle figure the tiles use. These power the drift charts on each place page. Two cautions apply to the early years. The 1990s are thin: after the 15 percent rule, several cycles have only one or two qualifying races, so one landslide House race can swing a cycle's value. And before 2007 the state's enrollment tables did not distinguish active from inactive voters, so those registration counts are not strictly comparable to later ones.
Confidence and limits
What the data cannot decide. Town totals can tell us how each group behaves across Maine and how each town differs from the pattern. They cannot fully separate two explanations for the same result: that a town's unenrolled voters lean Republican, or that its enrolled Republicans are unusually loyal and its Democrats unusually not. The model's town-level estimates pick a mix of the two, and the relative Unenrolled Lean, Base Loyalty and the rankings are robust to how it does so: five alternative model specifications tested in development agree on the ordering of places at correlations of 0.88 to 0.98. The absolute level of the unenrolled lean is not robust in the same way. Depending on what one assumes about partisan loyalty and turnout, Maine's unenrolled voters over 2018–2024 could be described as anywhere from mildly Republican to strongly Democratic. That is why the tile shows the relative figure, and why the absolute figure should be read as "under this model's assumptions."
Turnout. The model attributes more of the turnout to enrolled partisans and less to unenrolled voters than is likely true. The unenrolled share of the vote it reports (about 13 percent statewide) is probably close to half the real figure, so the unenrolled impact in points is understated by a similar factor. The direction and ranking of the leans are not affected. A voter file with participation history would fix this; nothing else will.
Registration is not opinion. Base Advantage inherits every quirk of Maine enrollment: ancestral registration that outlives a family's politics, strategic enrollment in a town's dominant party to vote in the primary that matters, list-maintenance purges that move thousands of voters to inactive status in some years, and automatic registration that places new voters in the unenrolled column by default. Base Loyalty is the correction for the first of these; the rest are simply part of what the base measures.
Unenrolled voters are not one group. The rating describes the net behavior of everyone in a place who is registered without a party: committed independents, disengaged occasional voters, newcomers and the young, and former partisans who dropped their enrollment. That is the point of measuring it by place. It is not a claim that any individual unenrolled voter behaves that way.
Validation
- Prediction. Ratings built from the 2016–2022 elections alone predicted each town's 2024 presidential margin within 3.3 points once the statewide swing is set aside (weighted RMSE). The raw enrollment margin misses by 7.8 points and a town's own 2016–2022 average result by 6.5. Adding the unenrolled lean to the base raises the share of town-to-town variation explained from 80 to 96 percent.
- Stability. Ratings computed on 2016–2022 and on 2018–2024 correlate at 0.99 (Base Advantage) and 0.98 (Unenrolled Lean). In towns with 500 or more unenrolled voters, a single cycle's relative lean correlates 0.97 or better with the next cycle's.
- Reconstruction. The decomposition reproduces the actual margin within 0.4 points in towns with 500 or more unenrolled voters.
- Independent checks. Base Loyalty and relative Unenrolled Lean both correlate at about −0.8 with an index of how each town's party enrollment shifted between 2010 and 2024. Towns whose enrolled Democrats defect from Democratic candidates also vote to the right of the state on party-coded ballot questions (correlation 0.72–0.78), which shows the loyalty effect belongs to the voters rather than to particular candidates.
- Sensitivity. Counting Angus King's Senate votes as Democratic, instead of excluding those races, leaves the rankings essentially unchanged (rank correlation 0.995 or better) and shifts levels toward the Democrats, which supports the exclusion.
Sources and versions
All three ratings are calculated from official State of Maine election records published by the Maine Secretary of State:
- Voter registration. The Secretary of State's Registered & Enrolled Voters reports, which give the number of enrolled Democrats, Republicans, members of other parties and unenrolled voters in every municipality (and in every precinct of towns split between districts) at each general election.
- Election results. The Secretary of State's official tabulations of general election results by municipality for President, Governor, U.S. Senate and U.S. House.
Nothing else goes into the ratings: no polls, no exit polls, no voter file and no survey data. Counties, legislative, congressional and county commissioner districts and the state are built up from the same town-level records, using the current district maps.
Scores version 2, September 30, 2026. Window: general elections of 2018, 2020, 2022 and 2024. Estimation: PyEI, RxC multinomial-Dirichlet ecological inference, 2 chains × 500 draws per race. The full tables at every level, the 1990–2024 history, the code and the validation workbook are available on request from the Maine Policy Institute. Column names in the scores tables are given in small type beside each rating above.
Version 1 (the same day) showed two tiles, a Partisan Score and an absolute Unenrolled Lean. Version 2 renamed the Partisan Score as Base Advantage without changing its values, replaced the absolute unenrolled tile with the relative one, added the Partisan EAI (Partisan Electoral Alignment Index) and Base Loyalty, and added the decomposition, standard errors and confidence classes.