Recent Posts

Minneapolis to Duluth


This was taken on a bicycle trip Sara and I took from Minneapolis to Duluth (and back) over the course of five days starting August 19th. We saw some great sites, got some great photos, and most importantly saw a giant rubber duck.

Find Minimum Distance Between List of Points


This is a neat little call I whipped up that returns the two x and y points from a list which have the shortest distance. It also returns the distance between those two points.

Pretty weird solution right? Seems to work though!

Reddit Account Ages

This is the data which resulted from scraping the top 1,000 “hot” posts from various subreddits. As you can see, the_donald posts originate heavily from new accounts. You could explain the discrepancy as “political season”, but SandersForPresident doesn’t seem to have that issue. Reddit was predominately left beforehand, but then you have to wonder why people are starting to gravitate toward reddit for their pro-trump discussions.

Seems like something is up. An explanation given by a pro-trump person was “conservatives get banned”, but they sure don’t get banned from the_donald, and it is against policy to create new accounts to access subreddits you have been banned from. Heck, when the_donald banned me they explicitly stated that. Anyhow, enjoy.

The Gas Tax Myth

ODOT Revenue

Whipped this up based on the 2011-2013 ODOT data because someone was complaining about cyclists not paying the gas tax where they lived (Portland). Whelp, taking into account the damage (1/9,600 the damage of a car, and roads cost a pretty penny to repair) and that many cyclists have cars if not at least a license, (89%) it is clear that cyclists subsidize motorists. Oh yeah, pollution. It is 2016, can we stop hating cyclists?

Flatten Data in R by Column Values


Not sure if this will help anyone, but I recently wrote a script that will let you flatten/widen a data set based on a dynamically set column name.

Animal Instances Instances Instances Instances
Puppy 47 77 97 25
Puppy 26 6 14 98
Kitten 38 50 5 73
Puppy 83 61 43 4
Kitten 78 30 57 8

…would turn into this

V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12
Puppy 47 77 97 25 26 6 14 98 83 61 43 4
Kitten 38 50 5 73 78 30 57 8

Using Police Data to Track Citizens


While looking for city data to keep up with my data analysis and visualization skills I found a disturbing data set.

The Minneapolis Police Department uses automatic license plate recognition to help aid in solving crimes in real-time. They also maintain this data about innocent citizens for months after it was collected. These data were obtained legally, via the Minnesota Government Data Practices Act. They have been pre-processed and deidentified. This file contains over 800k plate readings. –

I decided to check it out, and see what a limited exploratory analysis could determine from the top 20 license plate hits, I will start with the biggest issue (in my opinion),

Determine When a Person is Home

Here is a map of the top 20 license plates and the data points for when the police scanner ran their plate.

License Plates Aggregated
License Plates Aggregated

Now if we look at a time where people are most likely at work (say 11am) we can grab the hashes of the license plates that work at specific locations.

License Plates at 11am
License Plates at 11am

You can see above that the purple person is almost always SE of the cities, The lat/long is 44.935696,-93.38466 which corresponds to the Home Choice Parking lot in Hopkins, MN. Where will they be 12 hours from then?

License Plates at 11pm
License Plates at 11pm

Above you can see they pretty much always return to Dinkytown, Minneapolis. Using this method you could potentially

  • Determine whether or not a person is likely to be home at a certain time
  • Determine where someone likely lives
  • Determine where someone likely works
  • Determine if your employee took their car out when they called in sick (two data points already known)
  • Determine what someone is up to on their time off (if work and home locations known)

Obviously with more data points the more reliable the data becomes, and this was only run for a few months with much of the data tagged with a 0/0 for longitude and latitude.

Using Police Data to Track Targeted Neighborhoods

Using the same data it is also possible to track which neighborhoods are targeted by these scans

Plate Counts
Plate Counts