Methodology
This page explains how the map is made, from the raw public files to the map on your screen, and how it protects privacy. It has three parts: Overview, Data Preparation and Presentation. Every example here is made up; none shows a real voter. Use the outline on the left to jump around.
1. Overview
1.1 What the product is
An interactive map of registered voters in all 100 North Carolina counties, grouped by precinct. Each precinct is one pie chart drawn at the precinct’s center point (not at anyone’s home) showing the voters registered in that precinct. You can filter by party, projected party, race and ethnicity, age, gender, county and municipality, see charts and a summary table, and draw boundary layers that can be shaded by a measure of the voters inside them. It is built from public government files, and the whole thing is one HTML file.
1.2 What is there now
| Registered voters in the voter file | 8,053,874 |
| Voters shown on the map | 8,004,688 (99.4%) |
| Precinct pies | 2,652 |
| Attributes you can filter or color by (dimensions) | 8 |
| Map overlays | 8 |
| Smallest group of voters an exact combination of attributes can describe | 10 |
| Size of the single HTML file | 4.8 MB |
- The map: one pie per precinct, sized by number of voters, colored by any attribute you choose; pies merge when zoomed out.
- Filters, charts and a summary table that all respond to each other.
- Overlays (counties, precincts with polling places, school districts, court districts, and two Robeson County layers) with optional shading by voter count, party shares, projected margin or average age.
- A second page, the Shading map, shades every precinct by one measure at a time: registration makeup, turnout in recent elections, how voters voted, and distance to early-voting sites and polling places.
1.3 How complete is it
8,004,688 of 8,053,874 registered voters (99.4%) are on the map. 7,834,972 were tied to a precinct by their mapped address, 181,719 more by the precinct on their registration, 37,183 could not be tied to any precinct and 12,003 were removed by the privacy rule (section 2.5). The Data Quality page has the breakdown.
2. Data preparation
Preparation turns several unrelated public files into one consistent set of columns. It is done by Python programs that read the files from disk; nothing is sent to an outside service except the one-time downloads of public data (and requests for polling-place addresses, 2.7). The map is made from an address-level working file that is kept private and is not published.
2.1 Sources
Four kinds of files matter here: voter registration files (who, party, birth year, race, gender, county, municipality, precinct), election history files (used only to work out the projected party, 2.4), address points (to locate each registered address, so the voter can be tied to a precinct polygon) and precinct boundary files. The Sources page lists where each came from.
2.2 Reading the voter files
The state files contain every registration the State Board still tracks, including people whose registration has been removed (the state replaces their address with the word “REMOVED”) and a few hundred whose address is withheld as confidential. Those rows are skipped, which is why the voter total is smaller than the number of rows in the downloads. Everyone else stays: active, inactive and other statuses are all counted.
2.3 Tying voters to precincts
The map uses the State Board of Elections’ July 2024 precinct boundaries (2,656 polygons). A voter is tied to a polygon in two steps:
- By address. The voter’s registered address is matched to an address point (a cascade of matching steps, strictest first: exact street and ZIP; the same street when it exists under only one ZIP; spelling variants of highways, directions and abbreviations; spaces ignored; a near-identical street with the same house number; named buildings such as dorms, from OpenStreetMap; and, in one county, road address ranges) and the point is tested against the precinct polygons. 7,834,972 voters (97.3%) are tied this way.
- By the precinct on the registration. Voters whose address could not be placed (or fell outside every polygon) use the precinct recorded in the voter file, if its name belongs to a polygon. The polygon for each voter-file precinct name is the one that holds at least half of that precinct’s voters who were placed by address. 181,719 voters are tied this way.
The second step exists because the boundary file spells many names differently from the voter file and because boundaries change, so a plain name match would tie only about four fifths of voters to a polygon. Voters whose registration has a blank or “Unknown” precinct or one whose name does not match are left out (37,183 voters). Precincts with fewer than 100 voters are not shown at all.
2.4 The attributes
| Attribute | How it is worked out | What to keep in mind |
|---|---|---|
| Party | Registered party from the voter file. | The Party column is only as current as the file; people change registration. |
| Projected party | Registered Democrats, Republicans and others keep their registered party. Unaffiliated voters are given the party of the primary they voted in (the most recent one if several). | An estimate for the unaffiliated; many have never voted in a primary and stay unaffiliated. It is based on which ballot was requested, not who they voted for. |
| Race / ethnicity | A voter recorded as Hispanic or Latino is counted as Hispanic or Latino of any race; otherwise the recorded race is used (White, Black, Asian, American Indian / Alaska Native, other or unknown). | Self-reported on the registration form; about 10% have no race on file and about a third have no ethnicity, so Hispanic voters are probably undercounted. |
| Age | Seven bands (18-24, 25-34, 35-44, 45-54, 55-64, 65-74, 75 and over) from the age in the voter file. The “average age” shading uses the middle of each band. | Bands are used instead of birth years so that no one is identifiable by age. |
| Gender | As recorded: female, male or undesignated. | About 9% are undesignated. |
| County, municipality, precinct | County and municipality as recorded on the registration; precinct as the polygon tied in 2.3. | A precinct can straddle several municipalities, so a precinct pie can have voters from more than one. |
2.5 Protecting privacy: small groups are blurred
The map lets you filter by several attributes at once, which is exactly how a person could be picked out of a small group: a 35-44-year-old unaffiliated Hispanic woman in a precinct of 3,000 voters may be the only one. To prevent that, the file is anonymised inside every precinct before it is written:
- Within a precinct and municipality, voters with the same party, projected party, race / ethnicity, age band and gender form a group.
- Any group with fewer than 10 voters is too small to show as it is. Its voters lose one attribute, the least important first: gender, then age, then race / ethnicity, then projected party, then party. The voters are re-counted after each step, and anyone still in a group smaller than 10 loses the next attribute.
- A hidden attribute becomes “Suppressed (small group)”, a normal category on the map that you can see in the filter lists and charts.
- If a voter has lost every attribute and the group is still smaller than 10, the voter is removed from the file (12,003 voters in all, 0.15%).
The result is that every combination of attributes in the file describes at least 10 voters (checked on the finished file, see Data Quality). A municipality with fewer than 10 voters in a precinct is merged into “Suppressed (small group)” in the same way.
| Made-up example: 4,000 voters in one precinct | Voters |
|---|---|
| Republican / Republican / White / 65-74 / female | 58 |
| Unaffiliated / Unaffiliated / Hispanic / 25-34 / female (only 1 voter): gender and age are hidden, and the voter joins 15 others | 15 |
| Libertarian / Libertarian / Black / 18-24 (only 1 voter): even with every attribute hidden the group is smaller than 10, so the voter is removed | 0 |
Share of voters with each attribute hidden: party 0.6%, projected party 1.0%, race / ethnicity 2.6%, age 15.9%, gender 22.9%. About 77% of voters keep all five. Because the blurring is not random but follows how rare a combination is, counts that use a hidden attribute (such as gender) undercount that attribute and the “Suppressed” category holds the rest.
2.6 Overlays and regions
For each overlay, every precinct pie is tied to the region that contains the precinct’s center point. Counties use the county recorded for the voter instead. Because a region’s line can cut through a precinct, shading by school district or court district is approximate near region borders: the whole precinct counts for the region that holds its center.
- Precincts use the State Board of Elections’ July 2024 boundaries.
- Court districts come from files dated 2018 (Superior, Prosecutorial) and 2021 (District); later changes are not reflected.
- County commission and school board districts exist only for Robeson County.
- Congressional, NC Senate and NC House districts, municipalities, ZIP areas and census tracts are not offered in this version. The districts need an attribute this version leaves out, and municipalities, ZIP areas and tracts are often smaller than a precinct, so shading them by a precinct’s center point would mislead. (Municipality is available as a filter instead.)
2.7 Polling places and early-voting sites
When the precinct overlay is chosen, blue dots mark the polling places used on Election Day for the March 3, 2026 primary and orange diamonds mark the early-voting sites for the same election (a checkbox hides them). They come from two State Board of Elections lists (a spreadsheet and a PDF table), and facility addresses are located with OpenStreetMap’s search service and the county address-point files (only facility addresses are ever sent, never a voter’s). Clicking a dot shows the site’s name, address and hours. The early-voting PDF is read cell by cell, and each site’s printed schedule is turned into numbers: every day inside a printed date range counts, the hours for a day are closing time minus opening time, and Saturdays and Sundays are weekend hours (the printed weekday names are checked against the real calendar). Each facility address is looked up by street, city and ZIP, and if that fails by the facility’s name and city; every answer is graded address, street or area and must lie in North Carolina and the right county, and it is cross-checked against the county address-point files. OpenStreetMap is the primary source; the address point replaces it where OpenStreetMap found nothing, found only a street or area, or put the site more than one kilometer from the address point. Each polling place is tied to a precinct polygon by the voters registered there (first choice), by an exact name match, or by its location. A polling place shared by several precincts appears once.
2.8 Quality checks
- A privacy check reads the finished HTML file and confirms that no combination of attributes within a precinct and municipality is shared by fewer than 10 voters, and that the file has no name, address, birth date, ID, property or per-voter location columns.
- The match report reruns the address matching for every county; the map’s totals follow from it.
- The map was opened in a browser and the filters, charts, table and popups exercised after each build.
2.9 Assumptions and limits
- The map shows the voter file as of the date it was downloaded; people move and registrations change.
- Each voter is drawn at the center of their precinct, not where they live. Pies show how a precinct looks, never where anyone lives.
- Precinct boundaries are from July 2024; a voter registered to a precinct that has changed since may be tied to a neighboring polygon.
- Calculated labels (projected party) are estimates and will sometimes be wrong for an individual.
- Blurring hides detail in small groups: gender is hidden for about 23% of voters and age for about 16%, so charts by those attributes understate them and show the rest as “Suppressed”.
- The map only shows registered voters, not all residents.
2.10 The analysis pages
The Voting Access and Turnout pages use the same registered-voter file placed at addresses, plus the State Board’s early-voting site lists, polling-place lists and precinct election results. They publish only totals and precinct- or county-level tables; each describes its own method and limits. The Redistricting pages work from 2020 Census blocks and precinct election results instead and have their own How it works page.
3. Presentation: how the HTML file works
The last preparation step packs everything into one HTML file. The data is small because it holds no names, address text or parcel data.
3.1 Columns instead of records
The file stores one column (a plain list) per attribute, and a row is just a position: row 5 is the fifth entry in every list. In this version a row stands for one voter whose attributes have been anonymised (2.5), so identical rows within a precinct are simply repeated. A “pie location” list holds one entry per precinct (its center point), and a second list says where each precinct’s rows start.
3.2 Category codes and compression
Words are never stored per voter. An attribute with a limited set of values gets a small code table, stored once, and each row stores only the number; the precinct column (more than 255 values) uses two bytes. The rows of each precinct are sorted by their combination of attributes, so long runs repeat and the compressed data (gzip, then wrapped as text) is tiny. That is why this file is about 4.8 MB: it has no names, address text, parcel data or exact coordinates, and only 2,652 pie locations instead of millions of addresses.
3.3 What happens when the page opens
- The browser loads the page text; all the data is inside it, and only the background map tiles come from the internet.
- Each column is decoded and decompressed into a typed list in memory, and the voters in each category are counted so the charts have totals.
- Whenever a filter changes, one pass runs over every row and the passing rows are tallied per precinct (for pies), per category (for charts and the table) and per region (for overlay shading).
3.4 Filtering: one pass, one marker list
A single loop visits every row once, checks the active filters, and records a 1 (passes) or 0 in one more list; everything else reads that list, so the pies, charts, summary table, status line and shading cannot disagree. Every filter combination takes about the same time.
3.5 Drawing the pies
- Each precinct’s pie is sized by its voter count on a log scale and its slices come from the chosen attribute. Zoomed out, nearby precincts merge into one larger pie.
- Everything is drawn onto one canvas rather than thousands of map objects.
- Hovering or clicking a pie shows the precinct’s name and totals only. There is no list of voters, no name search and no street address, because the file has none.
3.6 Overlays and shading
The overlay menu is built from a small index describing each overlay. Counties ship ready to use; the others are stored as their own compressed blocks and decoded the first time they are chosen. The passing voters are totalled per region (how many, how many of each party, average age from the age bands) and the chosen measure becomes a color from a scale with a legend. Regions with fewer than 10 voters stay unshaded for shares. Colors are rescaled to each overlay.
3.7 Strengths and limits
Strengths: one small self-contained file; no server or database; works offline apart from map tiles; every filter combination is instant. Limits: the row-per-voter layout still holds 8,004,688 rows in memory, though with no names, address text or parcel data.