  We apply persistent homology, the dominant tool from the field of topological
data analysis, to study electoral redistricting. Our method combines the
geographic information from a political districting plan with election data to
produce a persistence diagram. We are then able to visualize and analyze large
ensembles of computer-generated districting plans of the type commonly used in
modern redistricting research (and court challenges). We set out three
applications: zoning a state at each scale of districting, comparing elections,
and seeking signals of gerrymandering. Our case studies focus on redistricting
in Pennsylvania and North Carolina, two states whose legal challenges to
enacted plans have raised considerable public interest in the last few years.
  To address the question of robustness of the persistence diagrams to
perturbations in vote data and in district boundaries, we translate the
classical stability theorem of Cohen--Steiner et al. into our setting and find
that it can be phrased in a manner that is easy to interpret. We accompany the
theoretical bound with an empirical demonstration to illustrate diagram
stability in practice.
