Monthly Archives: March 2017

Ohio Purge Watch Gets a Facelift, “The Owl” Gets Retired

Published / by Scott Dahlstrom / Leave a Comment

I stopped developing, artistically speaking, somewhere around age 10 or 11. Maybe that’s because by the time I was 12 I was diving into the BASIC programming language on my Atari 400 home computer (yeah, I’m that old) and rewiring my brain to predominantly work with logical structures as opposed to creating things that were more oriented toward aesthetics. No matter the reason, whatever biological or psychological trait one needs to look at a blank page and see what could be, I don’t have it.

Ohio + binoculars = owl

Case in point: When I originally set out to come up with some sort of logo for Ohio Purge Watch, I thought I’d just take an image of Ohio and combine it with binoculars.  The result was something resembling the face of an owl.  Sadly, it was the best I could come up with at the time, and the owl was allowed to perch at the top of my site for several weeks.

Today, however, thanks to the generosity of artists who publish their work for the public to use freely,  I am pleased to announce the retirement of the owl.  May this blog post be its final public viewing.  Now, onto the owl’s replacement…

This before and after image gives you a full view of the transformation:

Old site header vs. the new design. Say goodbye to the owl!

Like I said, I’m rather bad at this “making things look pretty” part of web site development, so anytime I’m able to actually overcome my artistic challenges and create something that falls more on the non-hideous side of the spectrum, it’s grounds for a happy dance.  Excuse me while I go privately put my white-boy rhythm on display!

 

Millersburg – Where More Voters Have the Same Name than Any Other Zipcode in Ohio

Published / by Scott Dahlstrom / Leave a Comment

While working on my Ohio Purge Watch project, I wanted to determine an efficient way for someone to search for their voter registration record without having to type in too much information. The goal was to find a field combination of hopefully no more than 3 fields (2 of those of course being first and last name) that would provide few enough results so they could be displayed on a single page.

I opted to try a zip code, last name, and first name combination, but needed to find out if this would get the number of search results down to a manageable 1-page selection. Running a query which counted voters grouped in such a way, I discovered there is one zip code in Ohio, 44654, which currently has 24 men named David Miller who are registered to vote.

One would assume this anomaly would occur in one of the more highly-populated urban areas of the state, but you’d be wrong. Millersburg, located in Eastern Ohio, has a population of around 3,100 people.

Odds are, if you visit Millersburg and ask any of the residents if they know David Miller, they’ll answer “yes”!

Working with Ohio Voter Data (A Preview of My Latest Project)

Published / by Scott Dahlstrom / Leave a Comment

This line chart, showing the number of weekly purged and added voters to Ohio’s voter roles, is one of many stats available at ohiovoterstats.webscott.com.

My latest project is a public information site which displays data regarding purged voters in my home state of Ohio.

The data is derived using the downloadable voter files available on the Ohio Secretary of State’s website.  The files are updated weekly, and by comparing the voter data in the files for the current week with the ones from the previous week, new and removed voters can be identified.  The simplicity of this concept didn’t exactly equate into a simple implementation as I had initially estimated.  However, the project so far has been as rewarding as it has been challenging and educational.

Challenges of Building the Stats Page

The statistics page (currently the only page available at the time this post was written) shows summaries of all the collected data for the year in various chart and table data formats.  Chart data can be updated to show either statewide data, or specific to a particular county or political district.

The first challenge involved getting the data into a database.  First of all, the files are too big to simply upload through phpMyAdmin.  PHP code was written to handle the insertion.  Second of all, even though this data was being provided by the state, I quickly discovered that the data had some “irregularities”, things like extra quotation marks and backslashes that were causing fields to be improperly parsed when read as csv data.  Additional PHP scripts needed to be written to clean up the data before it could be used.  I should note that much of these irregularities have been corrected in the most recent data downloads offered by the state, so the IT gurus in Columbus have apparently done a little cleanup.

Once I had all the voter data stored in a database, the next challenge was figuring out how to display it.  I’d never built a site with dynamic charts before, and settled on using Chart.js for my first go at it.  I’m still second guessing that decision.  I love the way you can remove sections of a chart.  This feature works great for getting a visual of small slices of a pie chart that are too insignificant to display otherwise.  However, I’d like to have percentages displayed over each slice, rather than just total numbers displayed on a mouseover of each slice, and I’ve not yet figured out a way to do that with Chart.js.  Perhaps a migration to Google charts or some other chart library will be a future upgrade.

Dynamically updating the charts proved to be a fairly painless experience, thanks to some decent documentation by the Chart.js folks, and 1 or 2 supplemental youtube videos.  However, doing so quickly was a bit more problematic.  Querying the data from the database for each chart update, despite my best efforts at optimization, proved to be a method that almost guaranteed sluggish performance.  I had one advantage though, and that was that I had a finite number of sql queries that needed to be run to generate the chart data for all counties and districts.  I decided to run all those queries in a batch process, and store the results in json files.  When a user selects a county or district, the appropriate json file is retrieved, and the database is left out of the process.

The next improvement on the to-do list for the stats page will be a better user interface.  Currently, the charts are updated by clicking on one of the counties or districts located in the tables below the chart.  In other words, the user interface is located on a separate portion of the page than the data results.  I need to create something in the chart area that will give this functionality without the need to scroll down the page. 

Update 3/20: The user interface has been implemented!

Further features planned for this project include a “purge alert” service, where Ohio voters can sign up for an email alert in the event they are purged from the voter rolls.  Once that’s developed, I’ll need to create a regular home page, contact page, maybe some faq’s, a nav menu to link them all together, and in the end I should have a real website!