Skip to content
Precinct-level results for the 2018 gubernatorial general election in Maryland https://www.baltimoresun.com/news/maryland/politics/bs-md-governor-election-precinct-map-20181107-htmlstory.html
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
code
input
output
shapefiles
.gitignore
readme.md

readme.md

Precinct-level results for Maryland's 2018 gubernatorial general election

Now with county-level results for Early Voting and Absentee / Provisional Voting and precinct-level results for Anne Arundel's County Executive race

By Christine Zhang

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.

Precinct results for the governor's race (Election Day vote only)

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 state
  • NAME: name of the precinct
  • county: county in Maryland where the precinct is located
  • ghost: = 1 if the precinct is a ghost precinct
  • rep_voters: number of active, qualified Republican voters as of the close of registration
  • dem_voters: number of active, qualified Democratic voters as of the close of registration
  • lib_voters: number of active, qualified Libertarian voters as of the close of registration
  • green_voters: number of active, qualified Green voters as of the close of registration
  • una_voters: number of active, qualified voters registered as Unaffiliated (aka independent) as of the close of registration
  • other_voters: number of active, qualified voters registered with Other parties as of the close of registration
  • active_qualified_total: total number of active, qualified voters as of the close of registration
  • hogan: number of votes received by Larry Hogan and Boyd K. Rutherford
  • jealous: number of votes received by Ben Jealous and Susan Turnbull
  • quinn: number of votes received by Shawn Quinn and Christina Smith
  • schlakman: number of votes received by Ian Schlakman and Annie Chambers
  • write_in: number of votes received by all Write-In candidates
  • total_votes: total number of votes received
  • perc_hogan: percentage of votes received by Larry Hogan and Boyd K. Rutherford
  • perc_jealous: percentage of votes received by Ben Jealous and Susan Turnbull
  • perc_quinn: percentage of votes received by Shawn Quinn and Christina Smith
  • perc_schlakman: percentage of votes received by Ian Schlakman and Annie Chambers
  • perc_write_in: percentage of votes received by all Write-In candidates
  • winner: winner in precinct
  • perc_winner: percentage of votes received by winner in precinct
  • area: area in square meters calculated under projection EPSG:4326 - WGS 84
  • area_mi: area in square miles
  • density: total number of votes received per square mile
  • zipcode: 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.

Precinct results for the Anne Arundel County Executive race (Election Day vote only)

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).

Why do precinct-level results only include votes cast on Election Day?

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

Early Voting and Absentee results for the governor's race (by county)

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.

Shapefiles

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.

Community Contributions

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.

References / Inspiration

"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.

Licensing

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.

You can’t perform that action at this time.