Sunday, August 24, 2014

Cost of Living


Recently, someone posted a map of the cost of living for states in the US.  The issue was that the state level is way too high to look at that.  I decided to do it at the county level.

First I had to find a data source for the cost of living at the county level.  I found this site, which seems to have good county level data.  I wrote a script to scrape that data, and then had a csv with the cost of living and fips code for every county.

For plotting I followed this R tutorial.  It was easy enough to follow/adapt, but I noticed the result looked odd.  It was much more random than I would have expected, and some spot checking confirmed the plot was wrong.  It took me quite a while to figure out there were a few counties that are out of order in the maps package.  This still doesn't make sense as I used a match command so they should all be matched up.  Either way, I finally got an R script that plotted the data correctly.

The code and data are up on github.


Saturday, August 23, 2014

Droughts

After hearing about this California drought nonstop, I made this quick perl script to make a gif from the pngs on this site.

I made one for the whole CONUS and uploaded it to Gfycat because the original is 14 MB.

http://gfycat.com/OnlyEasyHagfish

Thursday, August 7, 2014

Learn X in Y minutes

http://learnxinyminutes.com/

This site is a great reference for people that already know how to program but switch between languages frequently, and get caught up on the subtle syntax differences between them.