Electoral Maps

Early on in 2017 I had two conversations that set me on the path of learning about maps. One was with Mike Gaughan, who suggested that it might be possible to identify neighborhoods in Kansas with larger-than-normal numbers of unregistered voters. The other was with Paul Davis, who suggested that it might be possible to identify Kansas state legislature districts that could be flipped with targeted outreach to just a few neighborhoods.

I knew that one of the big issues affecting election outcomes was how the maps get drawn for political districts: state legislative districts, congressional districts, etc. But how did those political district boundaries correspond to the votes that are cast? No one seemed to have a map that could show me, for any given district, how the votes in that district for a given election correspond to streets and addresses. Or how did a particular neighborhood vote from one election to the next. State elections can often be decided by dozens of votes, so knowing how a particular neighborhood votes (or fails to vote), from year to year, could be a significant datum to understand.

I realized that it was hard to take a research and data-driven approach to a geographic problem without good geographic data. And none of the Democrats I spoke with seemed to have that data. So I decided I was going to create a map-oriented research tool for elections over time.

The Map Is Not The Territory

One fact in particular made the map data hard to acquire and use. Election results are reported to the Kansas Secretary of State at the county level. Each county clerk tallies up the votes (a process called certifying an election) and sends those numbers to the SoS office. Kansas has 105 counties. If you look at a map of Kansas counties, one thing you will quickly realize is that they are all mostly the same size and shape. That’s because the county boundaries were drawn very early in the state’s history without regard to where people lived and without knowing where they would settle a century later. County boundaries ignore population and they do not change over time.

Political district boundaries, however, are entirely about population and they change over time based on relative movements in the population. The idea around equal representation is that each district has roughly the same number of people, not the same number of acres. This is what gives political map drawing its power, because the political district boundaries could be drawn in carefully constructed ways to maximize a particular kind of voter in a given district.

So elections are reported by counties. Counties are about land size and don’t change. Districts are about population and change frequently. To borrow a math metaphor, what is the least common denominator?

The Precinct

The precinct is a geographic boundary that aligns with a political boundary. Every county is made up of one (often dozens) or more precincts. Every ten years the county clerk’s office divides the county into territorial entities in order for the federal government to count all the people in the census. Those territorial entities are called census tracts. Everyone gets counted in exactly one (we hope). Each census tract is also a voting district, or precinct. (It gets more complicated in the ten years between census takings. Read on for more.)

Most significantly, political district boundaries align with precinct boundaries. In your precinct, you belong in exactly one state house district, one state senate district, one congressional district. A political district is, in other words, the sum of its precincts. (Precincts are also vital to how political parties work, which will be the subject of another post.)

So if I wanted a map that would show, over time, how Kansans in specific neighborhoods vote, or if there were neighborhoods with a predictably low voter registration or turnout record, I would need reliable precinct-level election data, voter registration data, and I would need precinct-level map coordinates in the form of shapefiles.

Seemed straightforward enough at the time, I thought. I just need to look around on the internet and between the SoS website and the census.gov website, I’m sure I’ll find everything I need.

Oh foolish, silly, naive man. I look back on you now and chuckle at your enthusiasm. Of course, if I had known how hard it was to acquire those data and make sense of them over time, I might not have started in the first place. Deceptively simple problems get a lot of yaks shaved.

Fortunately, I quickly stumbled upon other people who were thinking the same things about maps and precincts, and other people who had been working hard at the precinct election data problem for a long time. I was able to follow in their footsteps.

In my next post I’ll dive into the nitty gritty of the challenges I encountered building the map.

Talking to Democrats

I am not particularly attached to the Democratic Party. Until 2017 I wasn’t registered as a Democrat. (And I only registered as one because the KDP, reasonably, wouldn’t let me help with their data otherwise.) My personal politics are more green/socialist. I just saw the Democratic party as the group best positioned to swing state races in 2018 and defeat 45 in 2020.

So in 2017 I reached out to my state and county parties and started cold-calling people. Would they meet me for coffee and talk about politics and technology? Yes they would!

I asked everyone three questions:

  • could technology have changed the outcome of the 2016 election?
  • if yes, what could someone like me do to help for 2018 and 2020?
  • who else should I talk to?

I’m very grateful for everyone who explained how precincts work, how county and state parties work, how the voter file works, how campaigns work, how campaign technology works (and doesn’t work). I spent several months meeting all sorts of Democrats, in Kansas and elsewhere (thanks to the wonders of the internet) and listening to their answers to my three questions. It turns out I knew very little about how elections work. Everything else I have been doing since then stems from something I discovered while talking to the Democrats that year who were so generous with their time and knowledge.

Follow a Bill

After the election, reading was how I spent my free time in November and December of 2016. That, and talking to my brilliant partner about all I was learning about political machinery. As it happens, she is a professor who teaches social policy and takes her students on field trips to the state capital in Topeka. She suggested that if the state legislature was so important, I should learn how it actually works: find a bill and follow it through the legislative process.

So I went to the Kansas legislature website and tried to figure out how to follow a bill. I found I could search bill text and find bills if I knew their number, but I could not find a feature that would send me email whenever the status of the bill changed: when it was going to be discussed in committee, or voted on, etc. I knew from using the federal congress.gov site that it was possible to get alerts on federal legislation emailed to me if I created an account. The same kind of follow-the-bill alerts feature did not seem to exist for the Kansas legislature.

I figured that someone must have solved this problem already. The closest I found was openstates.org which did not have the alerts feature but did have an API that I could use. After touching base with the OpenStates developers to see if the alerts feature was planned (it was but without a timeline), I decided to see how quickly I could prototype the legislative alerts feature myself. A classic yak shaving exercise. I had three design goals:

  • The minimally viable product should take no more than a single weekend;
  • Send alert emails for a single bill or a saved search (like a Google alert);
  • Store the minimum amount of user account information possible.

Since I had been doing a lot of Ruby on Rails development for my day job, I decided to use that tool to meet goal number one. Goal number three was made possible thanks to the wonders of OAuth: I could let users log in using an existing account (Google, Twitter, GitHub, but not Facebook since I did not (yet) have a Facebook account). Goal number two proved to be the trickiest but that was where all the fun was. I found an existing Ruby client for the OpenStates API and after some experimentation, hit on a data model that did most of what I wanted. The end result seemed good enough to me that I decided to go ahead and register a domain name and set up a GitHub organization and a Twitter account. I figured I would use it, at least, and since it could search all US states, maybe others would find it useful.

What I did not know yet was what bill I should follow. This is what yak shaving can lead to: lots of energy spent working on the thing you think you need in order to do the thing you want to do, and then sort of forgetting about the thing that got you shaving that yak to begin with. (I did eventually find a bill to follow: my own.)

Each year since then I have updated the site to reflect changes to the OpenStates API and to make small improvements. But basically the site is as it was three years ago. It does one thing and it tries to do it well. I’m told that the OpenStates.org site itself will soon offer the same kind of functionality. When it does I’ll be glad to shut down legalerts.us and treat it as a learning exercise that helped me experience how a bill becomes a law.

How I Spent My Fall Vacation

In 2016 I could not have imagined I would come to know my way around the Kansas Statehouse, and yet two years later I was the one guiding my fellow members of the new governor’s transition team through the entry with the metal detectors and into the limestone catacombs. It’s funny how you find yourself places.

I am starting an accounting of what I was up to between Election Day 2016 and Inauguration Day 2019, and what I have learned the last few years as an accidental activist, things that went well and things that did not. A retrospective of one.

Election Day 2016

It would be too simple to say that the results of the 2016 American presidential election pushed me into politics. There were really a lot of factors that got me off the couch. But certainly I was angry and unmoored on Wednesday, November 9. Not because my candidate lost. My candidate wasn’t on the ballot. I gritted my teeth and voted Democratic on Tuesday, like a lot of people. I felt a lot like I did after the 2004 election. I was not enthusiastic about the Democratic candidate, but the Republican candidate was so obviously a poor choice that I just could not understand why so many of my fellow Americans voted for them. In this case, my primary fear was about the critical issue of the climate. We only get one planet, and science shows that the human species is pretty well screwing it up for ourselves and all the other species. The GOP candidate was going to ignore and belittle the science at a critical moment in history when decisive political action is needed by the world’s biggest economy and carbon producer. That was just unconscionable and unacceptable to me.

The Morning After

The first thing I did after Election Day was read a lot of the morning-after analysis and second-guessing. As an engineer, I was most interested in understanding the tactical and logistical reasons the election had ended the way it had, and what could be done to change the outcome next time. Setting aside the whole mess of presidential candidate narratives, and what campaigns and foreign governments did or failed to do, I took away a few things.

  • The maps are skewed. Republicans had systematically targeted state legislatures around the country, won control of many of them, and used the power of district boundary drawing after the 2010 census to gerrymander their way to control of the US House. It was really ingenious. Hats off to them for the strategy and the execution.
  • The state legislature is where the action is. Having wrestled away power at the state level, the Republican party was able to set the policy agenda and define the terms of political debate. Taxes, schools, roads, budgets, redistricting. This was very evident in Kansas where I live. Since the moment we moved here in 2013, my daily newspaper was filled with budget crises, Supreme Court suits over school funding, concealed carry gun rights expansion. All because the legislature and the governor’s office were controlled by conservative Republicans determined to starve the state government till it was small enough to drown in the bathtub.
  • The Democratic party, during the glamour years of the Obama administration, failed to invest in state and local parties, in campaign infrastructure, and in building a bench of local elected officials who could compete in federal races. School boards, county commissions, water boards, city councils: these local elected offices are where people learn the mechanics of campaigning and governing. Any professional sports fan knows most players don’t jump from high school to the pros. The senior teams develop and groom a pipeline of qualified players who can compete, and the best get promoted. The Democratic party had failed to do that.

I learned all that by reading: the New Yorker, the New York Times, the Atlantic, the Washington Post, the great raft of internet pundits, my local public library. We had recently acquired a new chair at my house, and I settled into what became known as my “nest” by our unlit fireplace, books and magazines stacked on the brick hearth.

I spent an unhealthy amount of time on Twitter. I created my first Facebook account so I could start to understand how people could be so affected by that product. I joined every email list for every nascent group committed to resisting the new administration. (I have since unsubscribed from nearly all of them.) And I got ready to get to work.

This is the first in a series of posts. The title of this one comes from one of my favorite songs. I didn’t want to be “just sitting at home, growing tenser with the times.”

I’m Just a Bill, Until I’m More

When Representative Miller introduced me to Governor Colyer at the bill signing ceremony, he made note of the fact that it was unusual for an ordinary citizen to initiate a bill, testify at a committee and see the bill signed into law. The Governor gave me a signing pen and shook my hand.

I think it’s regrettable that more ordinary folks do not get involved in the legislative process, but I certainly had no idea why I would want to or how to go about it, until I did. This is the story of what happened and what I learned.

Election Results Data

In the autumn of 2017, when I was struggling to find good data to make my election results map, I realized that the Kansas Secretary of State’s office had stopped publishing precinct level results on its website after 2012. When I called (multiple times), emailed and finally tweeted at the Secretary’s office to release the data, I received a combination of Excel files and PDFs, for some but not all races. When I suggested via email that it might be easier in the future if the office simply published those files on its website as it used to, I was met with silence.

I talked with several people that autumn about the issue, including a county clerk (the elected official who administers elections in Kansas), and a state representative (not my own but a friend of a friend). Everyone said it was a legitimate thing to require the SoS office to publish those results.

So in January of 2018, just after the start of the legislative session, I emailed my state House representative, Boog Highberger, and pitched him the idea. He responded immediately, and we chatted on the phone. He reached out to Vic Miller, the ranking Democrat on the House Elections committee and pitched the idea to him. Miller said he would bring it to the committee chair and try and get it on the agenda at the next meeting.

Here’s where things went quiet from my perspective. A couple of weeks passed. I’d never done this before, so I didn’t know what to expect. I knew that a bill might be drafted, and a committee would discuss and vote on it, and then (hopefully) the whole House would vote on it. I also knew the same process needed to happen on the Senate side. I mean, I watched School House Rock as a kid. I had a general understanding of how this worked.

I had one big fear about turning this idea over to the legislative process, and that was that if the language of any resulting law wasn’t specific enough about how the results were published, then the SoS office could create a bunch of PDF files (maybe even from scans of printed paper) and post those to its website, and thus satisfy the legal requirement without actually being very useful at all to anyone who wanted to handle the raw data electronically. I had seen what the SoS office had sent me already, and I knew that PDFs were a real threat. I also knew they could produce Excel spreadsheets since that had been done in the past. I had specifically mentioned “machine-readable documents” in my proposal, but as anyone who has tried to pull meaningful data out of a PDF knows, just because a document is electronic does not mean it is machine-readable.

So I checked the Elections committee web page every day to find out what was happening. Nothing appeared on the agenda. I could check minutes of each meeting, but those minutes aren’t published until a couple of weeks after each meeting. I wanted some input into the language in the bill, to appease my fear of the PDF Issue. I knew my modest little idea could easily fall through the cracks, since there were a lot more high-stakes election issues being argued over in the legislature, like voter id, proof of citizenship, Crosscheck, campaign finance, etc. I also knew that legislators were very busy people. How was I going to find out if/when my idea became a bill and when it would be discussed in committee? Could I have input into the language? And would it all happen before the end of the five-month-long session?

I admit I struggled to understand the process from the outside. I read the committee web page but I didn’t really know what I was looking for. The committee agenda seemed to appear just before the meeting on the site so it felt like little advanced warning. The site has recorded audio files of each meeting, but I wanted to have input before the meeting where the idea was discussed.

Resources

Thankfully, I had a few things going for me.

I had the Legislative Alerts website. I set up a daily alert for “elections AND state:KS” and then tried to be patient. Then one morning in late January I got an alert mentioning a precinct results bill and I knew progress had been made.

I had a partner who knew this process, and our dear friend Annie McKay, who is a registered lobbyist in Topeka. They both patiently explained what I needed to do:

  • Identify others on the Elections committee that might be in favor of the idea.
  • Had I contacted my Senator and started the process on the Senate side? I had not.
  • Write to the legislative assistant for the Elections committee and ask for guidance on how to provide testimony at the committee hearing.

Most importantly, I had the privileges of time and money to do all this research, writing and communication.

So I stayed busy. I wrote to Senator Miller with specific suggestions on changes to the bill language. I had recently heard Representative Brett Parker announce a couple of bills expanding voting rights and saw that he was on the committee. I wrote to him, introduced myself and included the same list of suggestions on the bill text.

I wrote to my Senator, Marci Francisco, pitching the same idea, explaining about the House bill, and asking about the process on the Senate side. She very graciously explained to me that it was too late to introduce new legislation to Senate committees, but that hope was not lost. The “turnaround deadline” of the legislature was February 22, and if the bill passed in the House before then it would be sent to the Senate leadership for consideration.

Another week passed. Then Senator Miller emailed with a date for the committee hearing and asking if I wanted to provide testimony. Boy did I ever. Annie helpfully suggested I remove the snark from my first version. I wrote it up and sent it in, and published it for the world.

Annie also suggested I should present in person to the committee, especially if there were questions. This turned out to be a very good idea. She volunteered to walk me over to the statehouse in Topeka, where I had never been before, and make sure I got to the right place on time.

At the Capitol

I was early. I sat in the back. I was nervous to be sure, mostly that I would make some faux pas in such a public and official space. But I was very confident in what I had to say, because it was directly from two decades of lived experience with technology. That helped a lot.

Bryan Caskey, who is the Kansas Director of Elections in the SoS office, sat down next to me, which turned out to be quite lucky for me. He was the person who had given me the election results months earlier and I had never met him in person. He also testified at the committee hearing, at the request of the committee, since his office would be most directly affected by the bill.

Rep Parker had his phone out and, I found out later, was re-reading the email I had sent him weeks before. During discussion of the bill, he raised one of the issues I was going to make in my testimony, so I made a mental note to skip that part.

When called I got up and read from my prepared testimony, making mention of the fact that Rep Parker had already voiced one point. There were questions about the format of the election results. The Chair, Keith Esau, asked if Open Office format would be acceptable. How lovely to hear an elected official speak about an open source product!

One of the most important points came up during Mr. Caskey’s testimony, when he said that one reason that the SoS office stopped publishing results in 2014 was that the largest 4 counties had gotten new ballot machines that would only output PDF files and so that was the only format available to the SoS office. There was some discussion of whether it was possible that the machines could output some other format, and about the fact that new ballot machines were possibly going to be in play for the 2018 election because of the national attention being paid to election interference.

After the hearing was over, Representative Esau came over to where Mr. Caskey and I were sitting and the three of us had a very lively chat about the mechanics of elections.

The next day I wrote to Reps Esau and Mill and Mr Caskey:

I took to heart Bryan Caskey’s comments about the difficulty his office has getting machine-readable documents from some counties, and the potential resource burden that creates in converting those counties’ data to a spreadsheet. There’s a bigger technical issue at work there with the voting machine apparatus, and as Bryan noted in our conversation after the hearing yesterday, the process is undergoing rapid and as-yet-unknown changes this year.

I recognize that my request for an open data format is an ideal that most states do not yet live up to. I’m not interested in letting the perfect become the enemy of the good.

I still think getting timely publication of the best data the office has available serves Kansans’ interests in open and transparent elections. I’d rather see a mix of PDF and XLS files on the website within 30 days, than the current situation of zero published data. XLS files for 100 counties and PDFs for 5 counties is a decent trade-off, in my opinion.

Not publishing the data, even in its mixed formats, creates a resource drain on Bryan’s office for every KORA request that comes in. In the spirit of the FOIA “release to one, release to all” policy, let’s get them published preemptively and allow the public at large the chance to turn the data into whatever format is most helpful.

The committee schedule called for the bill to be voted on the next week, so I was pleased when it came up for a vote and passed out of the committee unanimously with my suggested amendments.

Then it was on to a full House vote the following week, where again it passed.

Waiting

Then I had to wait for the bill to make its way to the Senate elections committee for a hearing on that side of the building. I reached out to the election committee administrator, asking to be added to her email list for agenda announcements. She also gave me instructions on submitting testimony to the Senate committee. I submitted written testimony in favor of the bill. It passed out of committee on the Senate side and then was assigned to the conference committee.

This is where things got dicey, because we were running out of time in the session. If it didn’t get a Senate vote, we’d have to start all over again next year. The conference committee is where bills get reconciled between House and Senate versions so that both sides of the building vote on identical language. Six weeks later my bill passed out of conference committee and then a full Senate vote. Along the way it got merged with a bunch of other election-related bills into a single conference committee report for a Senate vote, which is apparently a common practice, especially near the end of the session, because it can save the time and overhead of separate votes. I really appreciated Vicki Schmidt, then a Senator on the committee, who went out of her way to clarify with me in several email exchanges, that the bill had in fact been included, voted on, and passed.

So there I was, four months after I first proposed the idea, with a bill on the Governor’s desk ready to be signed into law. I again reached out to Rep Miller to ask about when it might be signed, and at the urging of my partner, to find out if I could attend. Rep Miller graciously set me up with details and passed on instructions for attending the following week.

In the Governor’s Office

This was my second trip to to the Statehouse but my first to the Governor’s office. There were two other bills being signed into law that day. Mine was last on the agenda. I chatted with both Rep Miller and Rep Esau, who were both gracious and happy I was there. I have to admit, it was pretty cool to be a part of government for-and-by-the-people in a ceremony like that.

The best part of the process? Now you can get precinct-level election data on the SoS site again! Even if it sometimes takes some nudging.

Things I Learned

  • Time is short. There’s only four weeks after the session starts to get new legislation introduced. The “turnaround” deadline is only seven weeks after the session starts. If you want to see things done, you must queue things up before the session starts and get out of the gate immediately.
  • Pick ideas that are easy to sell. Elected folks want to say yes, so find something they can say yes to.
  • Embrace what’s possible, then ask for a little more.
  • Make friends with the committee administrators. They are the church secretaries of the legislative process.
  • Policy is like anything else. There is always more to learn, more work to do, and it’s good to make friends while you do it.