Now with county-level results for Early Voting and Absentee / Provisional Voting and precinct-level results for Anne Arundel's County Executive race
Available online on The Baltimore Sun's website in a November 9, 2018 story titled "Maryland governor precinct-by-precinct: Where Hogan and Jealous got their votes".
This repository may be updated with additional data processing code.
If you're looking for processed precinct-level results for Maryland's 2018 gubernatorial election, you'll find them in the results
folder under output/results_processed.csv
. The file contains the following columns:
ID
: unique precinct ID assigned by the stateNAME
: name of the precinctcounty
: county in Maryland where the precinct is locatedghost
: = 1 if the precinct is a ghost precinctrep_voters
: number of active, qualified Republican voters as of the close of registrationdem_voters
: number of active, qualified Democratic voters as of the close of registrationlib_voters
: number of active, qualified Libertarian voters as of the close of registrationgreen_voters
: number of active, qualified Green voters as of the close of registrationuna_voters
: number of active, qualified voters registered as Unaffiliated (aka independent) as of the close of registrationother_voters
: number of active, qualified voters registered with Other parties as of the close of registrationactive_qualified_total
: total number of active, qualified voters as of the close of registrationhogan
: number of votes received by Larry Hogan and Boyd K. Rutherfordjealous
: number of votes received by Ben Jealous and Susan Turnbullquinn
: number of votes received by Shawn Quinn and Christina Smithschlakman
: number of votes received by Ian Schlakman and Annie Chamberswrite_in
: number of votes received by all Write-In candidatestotal_votes
: total number of votes receivedperc_hogan
: percentage of votes received by Larry Hogan and Boyd K. Rutherfordperc_jealous
: percentage of votes received by Ben Jealous and Susan Turnbullperc_quinn
: percentage of votes received by Shawn Quinn and Christina Smithperc_schlakman
: percentage of votes received by Ian Schlakman and Annie Chambersperc_write_in
: percentage of votes received by all Write-In candidateswinner
: winner in precinctperc_winner
: percentage of votes received by winner in precinctarea
: area in square meters calculated under projection EPSG:4326 - WGS 84area_mi
: area in square milesdensity
: total number of votes received per square milezipcode
: zipcodes corresponding to each precinct
The raw results file is saved in the results
folder under input/results_raw.csv
. These were obtained from the Maryland state Board of Elections Election Day Precinct Results feed. Gubernatorial results were extracted and processed using the state's MetaData feed.
We also made a precinct-level map of the Anne Arundel County Executive race for a November 15, 2018 story in The Capital by Chase Cook titled "Pittman rode early voting to victory, flipped precincts Schuh won easily in 2014" (print headline: "Dissecting Pittman's upset win over Schuh").
If you're looking for the precinct-level results that power the map, you'll find them in the results
folder under output/results_processed_annearundel_exec.csv
. The column names mostly follow the ones listed for the governor's race, except that the Anne Arundel County Executive candidates are Dem. Steuart Pittman and Rep. Steve Schuh.
The computer code used to process the raw results is saved in the code
folder under code/anne_arundel.ipynb
(note: viewable on desktop).
Precinct level results, and the roll-up of such data into districts based on what districts the precinct participates in, is limited by Maryland Election Law to election-day voting. Early Voting, Absentee and Provisional vote counts are not reported at the precinct level, so those counts are only included in the county level files.
Source: Maryland state Board of Elections
If you're looking for county-level results for Maryland's 2018 gubernatorial election, you'll find them in the results
folder under output/results_ev_absentee.csv
. The file structure follows the layout on the state Board of Elections results page.
If you're looking for Maryland precinct shapefiles, you'll find them in the shapefiles
folder under md_all.zip
. The ID
field corresponds to the ID
column in the results file.
Shapefiles for most counties were obtained from the Florida Election Science Team (also posted on GitHub). For counties whose precinct boundaries have changed since 2016, the shapefiles were obtained directly from the counties. Shapefiles were combined using QGIS and the ID
field was generated to match the unique ID
column in the results file.
There are many ways to present election results (see References / Inspiration below).
Have questions or contributions? Send us a pull request or contact us on Twitter @baltsundata or via email. You can also fork your own copy of this repo to your account.
"California's most detailed election result map EVER" by the Los Angeles Times Data Viz team. Story by Jon Schleuss, Joe Fox and Priya Krishnakumar.
"There Are Many Ways to Map Election Results. We've Tried Most of Them." by Alicia Parlapiano at the New York Times.
All code in this repository is available under the MIT License. The data files are available under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.