Using Election Data Files
Background: House Bill 381 passed in the 2005 legislative session added to the Election Law the following words in §11-402:
(d) Electronic format of election results –
(1) in addition to the statement of election results specified under subsection (a) of this section, the State Board shall make available in an electronic format a report of election results for each candidate or question voted on at the election:
(i) by precinct;
(ii) by State legislative district, including any subdistrict;
(iii) by county legislative district; and
(iv) for each county as a whole.
The files that have been posted with this document on the SBE web site are designed to meet this requirement. This document has been prepared to explain how the data in the files are organized so that the files can be used for detailed analysis of the election results.
Assumptions and Constraints:
- For the 2020 General Election, precinct level results are available for in-person voting during early voting, in-person voting on election day, and mail-in (formerly called absentee) and provisional voting. For elections prior to the 2020 General Election, precinct level results are only available for election day voting; early voting, mail-in and provisional vote counts are not reported at the precinct level, so those counts are only included in the county-level files.
- To maximize the usability of the output, comma separate files, which can be used by many pieces of software, have been posted. They can be opened directly in Microsoft Excel, or other similar packages, and can be imported into other software. They have all been created with a header line describing the format of the data.
- The words “county legislative district” in the law, have been taken to mean commissioner or councilmanic districts.
- For those seven counties that have no commissioner/councilmanic districts, and for Cecil County that has districts that do not match precinct lines, no level iii reports are generated.
- Files have been sized so that they can be opened in current versions of Excel. That posed some limitations on how the data was displayed, but more universal ability to use the files was considered a key issue.
Candidate Reporting: The law stipulates reporting both for candidates and questions. Since there are some fundamental differences in the data for the two, the file layouts are different. Information about questions is noted after the information on Candidates. There are also differences in file formats for primary and general elections.
Candidate Precinct Level File Structure: For a primary election there is one file per county per party. Files name are of the format – County_Name_by_Precinct_party_year_Primary.csv with the appropriate county name such as Allegany inserted. The data includes:
County
Election District
Election Precinct
Candidate Name
Party
Office Name
Office District
Winner (a Y for contest winners)
Election Night Votes
For a general election, the file also includes a flag showing write-in candidates, and the Election Night Votes Against. Only judges running for continuance in office have votes against recorded. Files name are of the format – county_name_by_precinct_year_general.csv
County
Election District
Election Precinct
Candidate Name
Party
Office Name
Office District
Winner (a Y for contest winners)
Write-In (a Y for write-in candidates)
Election Night Votes For
Election Night Votes Against
Candidate State Legislative District File Structure: In a primary election, there is one file per party, in a general there is one. Files are named State_Legislative_Districts_party_year_primary.csv.
In a primary, this file has one record for each candidate with the following string of data fields:
County (See the translation table in Appendix A)
Candidate Name
Party
Office Name
Office District
Winner
Write-In
LEGS 01A (Vote count for each Legislative District or Subdistrict)
LEGS 01B
LEGS 01C
LEGS 02A
Etc.
For a general election, the file is named - State_Legislative_Districts_year_general.csv. Data about write-ins, and against votes is added:
Vote Type (1 = For, 2 = Against – only appellate judges have type 2 records)
County (See the translation table in Appendix A)
Candidate Name
Party
Office Name
Office District
Winner
Write-In
LEGS 01A (Vote count for each Legislative District or Subdistrict)
LEGS 01B
LEGS 01C
LEGS 02A
Etc.
Candidate Council/Commissioner District File Structure: In a primary there is one file per party for each of the 16 counties that have this form of a breakdown, with one file per county in the general. The files are named County_Name_Local_Legislative_Districts_party_year_primary.csv. In a primary election the data fields are:
Candidate Name
Office Name
Party
Office District
Name
Winner
CONC 001 (Election Night total for Councilmanic or Commissioner District)
COCN 002
Etc.
For a general election they are named County_Name_Local_Legislative_Districts_year_general.csv and the format is:
Vote Type (1 = For, 2 = Against – only appellate judges have type 2 records)
Candidate Name
Office Name
Party
Office District
Name
Winner
Write-In?
CONC 001 (Election Night total for Councilmanic or Commissioner District)
COCN 002
Etc.
Candidate County File Structure: At the county level, there are vote counts for both of the absentee vote counts and for provisional votes, along with election night votes and a total. Because of difference in the elections, the files for a primary and for the general are quite different.
For a primary the file is named County_Name_party_year_primary.csv and contains:
Candidate Name
Party
Office Name
Office District
Winner (a Y if the candidate is a winner)
Election Night Votes
Absentee Votes
Provisional Votes
2nd Absentee Votes
Total Votes
For a general election the file is named County_Name_party_year_general.csv and contains:
Candidate Name
Party
Office Name
Office District
Winner (a Y if the candidate is a winner)
Write-In? (a Y if the candidate is a write-in)
Election Night Votes For
Election Night Votes Against
Absentee Votes For
Absentee Votes Against
Provisional Votes For
Provisional Votes Against
2nd Absentee Votes For
2nd Absentee Votes Against
Total Votes For
Total Votes Against
Question Reports: Questions are only on the ballot in general elections. A question always has two choices, usually For and Against. In those rare cases where the language of the question is worded with two For clauses, the second clause will be considered an against clause. An example of this is the 2006 Question A in Queen Anne’s County where the two clauses were “For a Board of Education elected by the voters of Queen Anne’s County” and “For a Board of Education appointed by the governor.”
Question Precinct Level Reporting: At the precinct level there is a file for each county named County_Name_Questions_Precinct_year.csv, containing the following information:
County
Election District
Election Precinct
Question Number
How it Runs?
Winner
Election Night Votes
Election Night Votes Against
Questions by State Legislative District: This single file has all state and county question by legislative district. Those doing analysis should note that due to multiple counties in some legislative districts, there may be multiple county questions with the same Question Number. Analysis should only be done by county and question, never by Question Number alone. The file is named Questions_State_Legislative_Districts_year.csv, and contains:
Vote Type (1 = For, 2 = Against)
County (See translation table in Appendix A)
Question Number
How It Runs?
Winner
LEGS 01A (Vote count for each Legislative District or Subdistrict)
LEGS 01B
LEGS 01C
LEGS 02A
Etc.
Questions by County Council/Commissioner Districts: For each county there is one file named County_Name_Questions_Local_Legislative_Districts_year.csv with the following items:
Vote Type (1 = For, 2 = Against)
Question Number
How It Runs?
Winner
CONC 001 (Election Night total for Councilmanic or Commissioner District)
COCN 002
Etc.
Questions by County: At the county level, details are available about the additional vote counts. Files are named County_Name_Questions_County_year.csv.
County Indicator (00 for State questions)
Question Number
How it Runs?
Winner
Election Night Votes
Election Night Votes Against
Absentee Votes
Absentee Votes Against
Provisional Votes
Provisional Votes Against
2nd Absentee Votes
2nd Absentee Votes Against
Appendix A
County Lookup Table
County Indicator |
County Name |
00 |
State Level |
01 |
Allegany County |
02 |
Anne Arundel County |
03 |
Baltimore City |
04 |
Baltimore County |
05 |
Calvert County |
06 |
Caroline County |
07 |
Carroll County |
08 |
Cecil County |
09 |
Charles County |
10 |
Dorchester County |
11 |
Frederick County |
12 |
Garrett County |
13 |
Harford County |
14 |
Howard County |
15 |
Kent County |
16 |
Montgomery County |
17 |
Prince George's County |
18 |
Queen Anne's County |
19 |
St. Mary's County |
20 |
Somerset County |
21 |
Talbot County |
22 |
Washington County |
23 |
Wicomico County |
24 |
Worcester County |