<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by pj4533 on Medium]]></title>
        <description><![CDATA[Stories by pj4533 on Medium]]></description>
        <link>https://medium.com/@pj4533?source=rss-3f06a9a10756------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*owUqn1VbIt7oC4X5FYAGYw.jpeg</url>
            <title>Stories by pj4533 on Medium</title>
            <link>https://medium.com/@pj4533?source=rss-3f06a9a10756------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 06:03:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pj4533/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dutchess County 2017 Local Election Infographic]]></title>
            <link>https://medium.com/@pj4533/dutchess-county-2017-local-election-infographic-94b11abda9e2?source=rss-3f06a9a10756------2</link>
            <guid isPermaLink="false">https://medium.com/p/94b11abda9e2</guid>
            <category><![CDATA[infographics]]></category>
            <category><![CDATA[dutchess-county]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[elections]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[pj4533]]></dc:creator>
            <pubDate>Sun, 14 Apr 2019 16:13:47 GMT</pubDate>
            <atom:updated>2019-04-14T16:13:47.776Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*D1fv6itQIjv0fW9cBVRvfw.png" /></figure><p>2019 is a local election year. Get involved, help your local towns, and make sure to vote!</p><p>Voter turnout data: <a href="https://medium.com/@pj4533/small-town-politics-loading-board-of-elections-data-656887b5d6e2">source</a></p><p>Dutchess County election results data: <a href="http://www.dutchesselections.com/Election_Results/2017/Election%20Results/GE17/Official%20Certification%20ED%20Level%20Results%20GE17.pdf">source</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94b11abda9e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Public Property Tax Records To Increase Voter Registration]]></title>
            <link>https://medium.com/@pj4533/using-public-property-tax-records-to-increase-voter-registration-bf967f0063d9?source=rss-3f06a9a10756------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf967f0063d9</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[elections]]></category>
            <category><![CDATA[hudson-valley]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[dutchess-county]]></category>
            <dc:creator><![CDATA[pj4533]]></dc:creator>
            <pubDate>Sat, 13 Apr 2019 16:17:21 GMT</pubDate>
            <atom:updated>2019-04-13T16:17:21.218Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CyFGw9mUXs3YvafOn9L1kg.png" /></figure><p>In this article I will build upon my <a href="https://medium.com/@pj4533/small-town-politics-loading-board-of-elections-data-656887b5d6e2">previous</a> <a href="https://medium.com/@pj4533/identifying-pambunt-voters-presidential-and-mid-terms-but-unfortunately-not-town-board-d49afb47730c">articles</a> and show how to use public property tax records to identify unregistered voters. In addition, New York State allows voters with second homes (or students in school) to register in <a href="http://votewhereitcounts.org/">either location</a>. Your vote might not have a huge impact in New York City, but can mean much more in the rural counties of the state. Public tax records can help identify these second home owners as well. Outreach efforts can then use these lists to get more people registered in areas where they can make the biggest impact.</p><p>First, we need to get the public tax roll. For Dutchess County, the tax rolls are available <a href="https://www.dutchessny.gov/Departments/Real-Property-Tax/assessment-rolls.htm">online</a> in PDF format. Initially, I tried converting these files to a machine readable format. It did not go well. Each file is laid out spatially in columns, with the most important information being the parcel address (the address being taxed), and the primary owner address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*89J8MycChesJSigG45gt8g.png" /><figcaption>Tax Roll PDF</figcaption></figure><p>The closest I got was by using <a href="https://tabula.technology/">Tabula</a>. Tabula is a open source tool for “liberating data tables locked inside PDF files”. Unfortunately, due to the layout of our PDF, the resulting CSV was not ideal and needed quite a bit of processing. Some lines were formatted such that extracting the information was difficult or inaccurate. Through trial and error, I was able to extract the information I needed, but I knew there had to be a better way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPPjAusrv3QKGrpL43GQ6g.png" /><figcaption>A Mess Of A CSV</figcaption></figure><p>I contacted the Dutchess County Real Property Tax Service Agency via email and inquired about getting the data in a machine readable format. They responded that custom reports are available in Excel format, but for a fee.</p><p>After sending off my check (check?!), I received a zip file with 2 Excel files that included all the records for Dutchess County. Loading the data into our <a href="https://medium.com/@pj4533/small-town-politics-loading-board-of-elections-data-656887b5d6e2">database</a> was simply a matter of importing into Excel (or Numbers on a Mac), and then exporting as a CSV file. This file can be imported to a new table using SequelPro, or whatever MySQL client you prefer.</p><h4>Unregistered Voters</h4><p>The basic idea is to match the parcel address from the tax records to the address in the voter registration data. If there is no match, then that parcel address potentially has unregistered voters. Obviously, this is error prone, but can be a good starting point for identifying lists of voters for outreach purposes.</p><p>With our tax data imported, after much trial and error, I found the best approach was to make a custom address field in the voter registration data table that most closely resembles the address in the property tax table. This is done by taking the address number field and concatenating it with the street name field:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b98c3419ee511e023871569f1a108ae/href">https://medium.com/media/5b98c3419ee511e023871569f1a108ae/href</a></iframe><p>After creating this new custom field (and indexing on it!), we can run a query to join the two tables. I run a RIGHT JOIN looking only for cases without a county voter number, meaning non-matches. In addition, only including residential property classes, and I filter out obvious cases of owners that are not individuals (LLCs etc).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/669bbdbc03bc59060c836b9a5e5e7924/href">https://medium.com/media/669bbdbc03bc59060c836b9a5e5e7924/href</a></iframe><p>With this simple query, I identified 16,903 potentially unregistered voters in Dutchess County. It is a rough approximation, but a good starting point for outreach efforts.</p><h4>Second Home Owners</h4><p>By slightly modifying our above query we can identify second home owners. Here we want to use the tax records to find cases where the parcel address does not match the primary owner address. This can be done most simplistically by just adding one line to our query.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1449641479fa16c60ec9b518da0e246d/href">https://medium.com/media/1449641479fa16c60ec9b518da0e246d/href</a></iframe><p>The above query identifies 8,933 potential second home owners who are not registered to vote at their second home address. However, matching addresses using strings is inherently error prone. Typos, multi-address properties &amp; other cases are common. We can help clean up some of the error cases by using the Levenshtein distance between the parcel address and the owner address. Levenshtein distance is simply the number of differing characters between the two strings.</p><p>First, I added a function to my database following the tutorial <a href="https://www.lucidar.me/en/web-dev/levenshtein-distance-in-mysql/">here</a>. Then, with the function in place, I altered the above query to the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4c3edc62edae602c5cd04a81d8418a34/href">https://medium.com/media/4c3edc62edae602c5cd04a81d8418a34/href</a></iframe><p>This gives 7,105 potential second home owners, unregistered in Dutchess County. I used a Levenshtein of greater than 4, which seemed to be a sweet spot of catching most cases, without introducing more error. The query is much slower, but I didn’t spend much time optimizing, and could probably be improved with appropriate indexing.</p><p>It is important to note that this process is not exact. Using these techniques is a merely a starting point.</p><h4>Next Steps</h4><p>The biggest issue with these techniques is the error inherent in matching street addresses from differing sources by comparing strings. The Levenshtein Distance was able to help for comparing the parcel address to the owner address because we knew that those two address would be very different, if they were different at all. However, when matching an address from tax records to voter registration records, the difference might be only one character, yet be a valid difference.</p><p>One way to approach this problem would be to geocode all the addresses, then compare the resulting latitude and longitude coordinates. Essentially this would offload the street address resolution to the geocoding service. Perhaps in a future article I will explore the improvement we can gain by using this technique.</p><p>For now, if anyone reading is involved with groups that might benefit from this data, please let me know! (Especially groups in Dutchess County, as I already have the data ready). The data is the easy part, the difficult &amp; time consuming part is the outreach efforts that use the data. That might be printing labels for existing mailers, using a service like <a href="https://lob.com/">lob.com</a> to automate sending, or just old fashioned door to door outreach.</p><p>Whatever outreach work is done, having a good foundation of data is key, and while large campaigns already have databases, many smaller groups &amp; campaigns can benefit from a grassroots approach.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf967f0063d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Identifying PAMBUNT Voters: Presidential And Mid-terms, But Unfortunately Not Town board]]></title>
            <link>https://medium.com/@pj4533/identifying-pambunt-voters-presidential-and-mid-terms-but-unfortunately-not-town-board-d49afb47730c?source=rss-3f06a9a10756------2</link>
            <guid isPermaLink="false">https://medium.com/p/d49afb47730c</guid>
            <category><![CDATA[hudson-valley]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[new-york]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[pj4533]]></dc:creator>
            <pubDate>Fri, 12 Apr 2019 10:47:58 GMT</pubDate>
            <atom:updated>2019-04-12T12:33:34.017Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THpvf2hJ6ppIwm2Om2rpMw.png" /><figcaption>Swift code for the nysboetool</figcaption></figure><p>In a previous <a href="https://medium.com/@pj4533/small-town-politics-loading-board-of-elections-data-656887b5d6e2">article</a>, I wrote about how to setup a database and load it with the Board of Elections voter registration data. In this article I will describe how to clean and use one of the more useful fields of that data, the voter history, specifically to identify voters who vote in major elections, but skip local elections. To borrow a concept from the development world (LYBUNT/SYBUNT), I’ll call these voters PAMBUNTs: Presidential and Mid-terms, But Unfortunately Not Town board.</p><p>The voter history field describes which elections each registered voter has voted in, but not how they voted. This is extremely useful for identifying voters for canvasing based on the frequency of their voting (or non-voting). Identifying PAMBUNT voters is simply creating a list of people who voted in 2016 and 2018, but not in 2017. This work requires no fancy data science, machine learning or artifical intelligence!</p><p>In my small town in New York’s Hudson Valley, out of the 2,451 registered voters (all affiliations), 532 of them did not vote in the 2017 local election, but did vote in both the 2016 and 2018 elections. Meanwhile, our 2017 town board supervisor election was decided by a margin of only <a href="http://www.dutchesselections.com/Election_Results/2017/Election%20Results/GE17/Official%20Certification%20ED%20Level%20Results%20GE17.pdf">41 votes</a>. Even in a larger town, such as the Town of Poughkeepsie, local elections can be extremely close. The Town of Poughkeepsie has 26,510 total registered voters, with 5,893 that voted in 2016 and 2018, but not in the 2017 local election. Yet, the Poughkeepsie town board supervisor position was decided by a margin of <a href="http://www.dutchesselections.com/Election_Results/2017/Election%20Results/GE17/Official%20Certification%20ED%20Level%20Results%20GE17.pdf">54 votes</a>. Further, while it breaks my PAMBUNT acronym, the same trend holds for city councilmember elections. In the City of Poughkeepsie, the councilmember at large election was decided by a margin of <a href="http://www.dutchesselections.com/Election_Results/2017/Election%20Results/GE17/Official%20Certification%20ED%20Level%20Results%20GE17.pdf">226 votes</a>, while there are a total of 3006 PAMBUNT voters. For these elections, being able to identify voters that are active, but don’t usually participate in local elections is very important.</p><p>Before we can easily and accurately create lists like the above we need to examine the voter history field. Unfortunately, in New York State at least, this field is not very clean, and will need some processing. Lets start by exporting the voter history field, along with the county voter number field (so we can reassociate the cleaned data properly). Using SequelPro, here is the query I used:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dee805c6b32274e6c6793d5f9d37e927/href">https://medium.com/media/dee805c6b32274e6c6793d5f9d37e927/href</a></iframe><p>Note that I also only export voters with a status of ‘ACTIVE’. The dataset includes all voters, even if they are currently inactive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*uVtq6uV3TOM3N-t21OWKNA.png" /><figcaption>Choosing export in SequelPro</figcaption></figure><p>The primary problem with the voter history field is that a given election might be described by several different strings. There is no standardization. This makes it very difficult to do a search to capture, for example, everyone who voted in the 2016 general election.</p><p>This is shown below using a <a href="https://github.com/pj4533/nysboetool">tool</a> I wrote:</p><pre>~/projects/nysboetool ] .build/debug/nysboetool --showuniques state_boe_active.csv | grep 2016</pre><pre>2016 General Election<br>2016 Presidential Primary<br>2016 Federal Primary Election<br>2016 Primary Election<br>PRESIDENTIAL PRIMARY ELECTION 2016<br>Pres Primary Election 2016<br>2016 PRESIDENTIAL PRIMARY<br>General Election 2016<br>2016 GENERAL ELECTION<br>GENERAL 2016<br>GENERAL ELECTION 2016<br>PRESIDENTIAL PRIMARY 2016<br>General Election, 2016<br>20161108 GE<br>20160419 PP<br>20160628 PR<br>Presidential Primary Election 2016<br>20160913 PR<br>GE 20161108</pre><p>The above list is only for elections in 2016, a similar problem exists for all years. You will notice that sometimes the year is first, sometimes last, sometimes the words are capitalized, etc. In order to fix this problem, we are going to standardize the election description, and then adjust each raw election string to match the corresponding standardized election string. Once adjusted, this data will be output to a new field, and we will load it into our database. This will allow the original data to be used (should we need it), but also allow us to do easy searches based on the cleaned up voter history data.</p><p>Cleaning up the data is an iterative process of examining the output and replacing strings such that an input string (left side of the arrow in my debug output) falls into the proper bucket (right side of the arrow). Each bucket is our standardized election. We want to standardize on GE for general elections (PP and PE for primary elections), followed by a two digit number for year (GE16, GE18 etc).</p><p>Looking only at 2016, let’s first capitalize each string, remove whitespace, remove punctuation, and make sure all letters come at the beginning:</p><pre>~/projects/nysboetool ] .build/debug/nysboetool --debug -c state_boe_active.csv | grep 2016</pre><pre>2016 General Election --&gt; GENERALELECTION2016<br>2016 Presidential Primary --&gt; PRESIDENTIALPRIMARY2016<br>2016 Federal Primary Election --&gt; FEDERALPRIMARYELECTION2016<br>2016 Primary Election --&gt; PRIMARYELECTION2016<br>PRESIDENTIAL PRIMARY ELECTION 2016 --&gt; PRESIDENTIALPRIMARYELECTION2016<br>Pres Primary Election 2016 --&gt; PRESPRIMARYELECTION2016<br>GENERAL 2016 --&gt; GENERAL2016<br>20161108 GE --&gt; GE20161108<br>20160419 PP --&gt; PP20160419<br>20160628 PR --&gt; PR20160628<br>20160913 PR --&gt; PR20160913</pre><p>You’ll notice that already the number of unique elections (ie: buckets) is already shrinking. Lets replace ‘GENERALELECTION’ and ‘GENERAL’ with ‘GE’:</p><pre>~/projects/nysboetool ] .build/debug/nysboetool --debug -c state_boe_active.csv | grep 2016</pre><pre>2016 General Election --&gt; GE2016<br>2016 Presidential Primary --&gt; PRESIDENTIALPRIMARY2016<br>2016 Federal Primary Election --&gt; FEDERALPRIMARYELECTION2016<br>2016 Primary Election --&gt; PRIMARYELECTION2016<br>PRESIDENTIAL PRIMARY ELECTION 2016 --&gt; PRESIDENTIALPRIMARYELECTION2016<br>Pres Primary Election 2016 --&gt; PRESPRIMARYELECTION2016<br>20161108 GE --&gt; GE20161108<br>20160419 PP --&gt; PP20160419<br>20160628 PR --&gt; PR20160628<br>20160913 PR --&gt; PR20160913</pre><p>Replacing other strings using the same iterative process results in the correct number of election buckets:</p><pre>~/projects/nysboetool ] .build/debug/nysboetool --debug -c state_boe_active.csv | grep 2016</pre><pre>2016 General Election --&gt; GE2016<br>2016 Presidential Primary --&gt; PP2016<br>2016 Federal Primary Election --&gt; PE2016</pre><p>I am not sure if I should bucket together the federal primary and the presidential primary, but most of my searches have been focused on the general elections, so it really doesn’t matter for our purposes. Lastly, we will remove the ‘20’ from the year:</p><pre>~/projects/nysboetool ] .build/debug/nysboetool --debug -c state_boe_active.csv | grep 2016</pre><pre>2016 General Election --&gt; GE16<br>2016 Presidential Primary --&gt; PP16<br>2016 Federal Primary Election --&gt; PE16</pre><p>Now, lets remove the debug output option to generate the SQL code necessary to update our database. This will result in lines like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8db12c55e8613f1c094c92375ba1b7a/href">https://medium.com/media/b8db12c55e8613f1c094c92375ba1b7a/href</a></iframe><p>Redirecting this output to a file will allow it to be imported into SequelPro:</p><pre>~/projects/nysboetool ] .build/debug/nysboetool -c state_boe_active.csv &gt; update_voter_history.sql</pre><p>Then, we duplicate the ‘VOTER_HISTORY’ field in SequelPro, naming the new field ‘CLEANED_VOTER_HISTORY’, and import the file we just created. With that, we can do much more accurate queries based on voter history. For example, this is the query for finding PAMBUNTs:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31b9bd720a8234bf76c1e4ba4f89f2b6/href">https://medium.com/media/31b9bd720a8234bf76c1e4ba4f89f2b6/href</a></iframe><p>I have shared my code on <a href="https://github.com/pj4533/nysboetool">Github</a>. The entire process of cleaning the voter history field is very brittle, so modifications may be necessary for other datasets. The code I have written should be a good starting point. If anyone reading this has done similar work, I’d love to hear from you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d49afb47730c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Small Town Politics: Loading Board of Elections Data]]></title>
            <link>https://medium.com/@pj4533/small-town-politics-loading-board-of-elections-data-656887b5d6e2?source=rss-3f06a9a10756------2</link>
            <guid isPermaLink="false">https://medium.com/p/656887b5d6e2</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[new-york]]></category>
            <category><![CDATA[hudson-valley]]></category>
            <dc:creator><![CDATA[pj4533]]></dc:creator>
            <pubDate>Wed, 10 Apr 2019 20:08:49 GMT</pubDate>
            <atom:updated>2019-04-10T20:08:49.441Z</atom:updated>
            <content:encoded><![CDATA[<h3>Small Town Politics: Loading Board Of Elections Data</h3><p>In this article I describe the steps for obtaining and loading New York State Board of Elections data into an Amazon RDS MySQL instance. Loading this data into a relational database enables easy analysis of voter registration and turnout trends, and provides the opportunity for data driven insights into election results. The process could probably be adjusted for other states, but I haven’t looked into how the data differs state to state.</p><p>The Board of Elections public dataset includes all registered voters, their registered affiliation, and their voting history (what elections they voted in, not how they voted), as well as other data points. Larger campaigns that have access to more resources probably don’t need to start from this point, however, I wanted to pitch in and help in my small town election where voter registration &amp; turnout efforts were based on spreadsheets (when they used data at all).</p><p>In New York, obtaining the Board of Elections data requires a FOIL request. Luckily, this process can be done <a href="https://www.elections.ny.gov/FoilRequests.html">online</a> on the New York State Board of Elections website. (Look under ‘How to Request Access to Public Records).</p><p>Then, waiting. A couple weeks later, I received a disc in the mail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uI7GR4M2g86Iko1lOsxQAw.png" /><figcaption>Snail Mail Data</figcaption></figure><p>The data was provided in a comma-separated text file. Included was a PDF describing the fields, which is also provided <a href="https://www.elections.ny.gov/NYSBOE/Forms/FOIL_VOTER_LIST_LAYOUT.pdf">online</a>.</p><p>Creating the Amazon RDS instance is the most intimidating part of this process, partially due to the extreme number of online tutorials, each of which is slightly different. But, just be aware, if you have some technical background, it really isn’t difficult.</p><p>From the Amazon RDS dashboard in AWS, choose ‘Create Database’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2SIPjgDvftOF_ixgEYLJCw.png" /><figcaption>Create It!</figcaption></figure><p>The next screen we are going to select the database engine. Any of them could be used (depending on your skillset), but I am most familar with MySQL (it is also free).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y86rIUp6IlSCuaLFg4x3Hw.png" /><figcaption>Engine Selection</figcaption></figure><p>I also ticked the box ‘only free tier’ options, since this isn’t a production-ready application database, but rather only for doing queries &amp; pulling lists, we don’t need the more complicated options.</p><p>The next step is to specify the database details. I kept everything the default, and just filled in the instance name, username and password. The process is quick, so you can always delete the instance and re-create it with a different name later.</p><p>Next is the Advanced settings. The main option here to change is to enable public access. This doesn’t mean anyone can get access (there is still a password), but it does mean the instance is provided an IP address such that we can connect to it from our home computer (rather than only another server in AWS as the case would be for a normal web application).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L5_tacXUqn-RlkSF1n746Q.png" /><figcaption>Advanced Settings</figcaption></figure><p>Then, click ‘Create Database’ and wait a few minutes. You can click to view the instance details while you wait. Once the instance is created, on the summary page you’ll see the address listed under ‘endpoint’. This is what you are going to use to connect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xQQLest4tSKBqovSgRo9sA.png" /><figcaption>Endpoint Details</figcaption></figure><p>I prefer to use the tool <a href="https://www.sequelpro.com/">SequelPro</a> for MySQL work, but any MySQL client tool will work. Simply enter the endpoint above, and the username &amp; password you provided. One note is that, by default, AWS will use a secure method of reading your IP address and limiting connections to only that IP. So if you know you will be connecting from another IP, you’ll need to modify your security group. Keeping a database publically accessible like this is not good practice, even if it is password protected. However, we are only processing public data anyway, so its not a huge problem.</p><p>Now that we have the database created, lets get the data imported! Initially I went through an iterative process of importing, it failing, then tweaking the MySQL table structure, and retrying. I figured out something that worked eventually, but a MySQL expert could probably have done it much faster. To speed things up (and if you are in NY), you can use this SQL file <a href="https://gist.github.com/pj4533/508bf24aeeefc3811aa5328e788f758c">here</a> to create your table. Other states might need to tweak the file for their specific case, but it should be easy to change.</p><p>From SequelPro, choose ‘Import’, format ‘SQL’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDNXKwSiJRlCMaVqEOb6kg.png" /><figcaption>Importing the table structure</figcaption></figure><p>Now, we have a table created, in the correct format for our data, let’s import the content! Again, do a ‘Import’, format ‘CSV’. The NY State BOE data doesn’t include column headings in the data file, so I unticked that box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dupBW1JX4mHZkZw3k_FhRw.png" /><figcaption>Selecting the data file</figcaption></figure><p>Next we will get options for mapping the columns to our table structure. If you are in NY state, this should be already setup based on my table structure, but may need some tweaking for other datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MNJxM7LkkNj7GHJeUg7K6A.png" /><figcaption>Mapping fields</figcaption></figure><p>Once you click ‘Import’ the data will start flowing. If you had to tweak the table structure you might get some errors, so keep an eye on the progress. As I said, initially it was an iterative process.</p><p>With that, the data should be imported and now you can begin running MySQL queries to pull lists to help canvasing efforts. Some interesting ideas:</p><ul><li>Registered voters who haven’t voted recently</li><li>Registered voters who only vote in major elections</li><li>Registered voters by geographic area</li><li>Political breakdown of your town (by district?)</li><li>Comparing to public tax rolls to find unregistered voters (or in NYS, second home owners who could register in your county)</li></ul><p>In a future article I will cover some of those ideas and how to interpret the data included.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=656887b5d6e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>