Publications by PirateGrunt

24 Days of R: Day 5

05.12.2013

Some time back, I started a project on GitHub wherein I would explore the efficacy of financial literacy efforts in the area where I live. This is done with the support of a local non-profit organization. As a first step, I tried to draw a picture of the area at a relatively fine level of detail. This relies on the UScensus suite of packages that...

2706 sym R (5168 sym/9 pcs) 16 img

24 Days of R: Day 6

06.12.2013

I've finally had some success at munging some HTML. For quite some time, I've wanted to render a county level choropleth for US presidential election results. The numbers are all there on Politico.com, but attempts to use readHTMLTable never returned the full set of data. It still doesn't, but I have sorted out how to get all of the results I wan...

1807 sym R (2662 sym/7 pcs) 6 img

24 Days of R: Day 7

07.12.2013

Carrying on from the last post, I'm going to take a closer look at election results for the 2012 US presidential election in North Carolina. This state's 15 electoral votes went to the Republican, Mitt Romney. On the US electoral college map, that means the state shows up as red. As I write this, I'm living in Durham, North Carolina- which is a c...

2266 sym R (3337 sym/5 pcs) 8 img

24 Days of R: Day 8

07.12.2013

I saved the data from the last post which shows the percentage of Republican voters in each county. In addition to that column, I also have figures from the 2010 census. This will show things like age, ethnicity, urbanization and home ownership. Those census figures show actual population counts, so they'll need to be altered to relative numbers ...

3331 sym R (6602 sym/11 pcs) 16 img

24 Days of R: Day 9

09.12.2013

This will be the third time I've tried to write this post. I had started out presuming that I would uncover something fascinating about applying Bayesian inference to a low-frequency claims generation process. That isn't at all what I got and I ought to have known better when I started. I started by doing very basic curve fitting presuming that I...

4352 sym Python (2437 sym/7 pcs) 12 img

24 Days of R: Day 10

10.12.2013

How often is someone nominated for an academy award? Who has been nominated most often? Is there a difference between leading and supporting roles? Important questions. To answer them, I'm making use of a list of academy award nominees and winners. I've obtained the data from aggdata.com which has a few sets of free data. We'll open the file, do ...

2145 sym R (3428 sym/6 pcs) 8 img

24 Days of R: Day 11

11.12.2013

I don't know how often Michael Caine appeared in a Shakespearean work, but I'm sure that he has and I'm sure that he was excellent. A bit pressed for time today, so just a simple word cloud featuring the full text of King Lear. I found the text at a website that I presume is associated with a university in Cambridge. http://shakespeare.mit.edu/le...

1519 sym R (1742 sym/3 pcs) 6 img

24 Days of R: Day 12

12.12.2013

Today, I'm going to finally dip my toe in the water of something I've wanted to do for a long time. I'd wanted to do this with Michael Caine film appearances- and I may yet- but tonight, it'll be a bit simpler. I'm going to draw a network graph, showing the relationship between band members of the Grateful Dead and a couple of their solo and non-...

1622 sym R (2333 sym/4 pcs) 6 img

24 Days of R: Day 13

13.12.2013

In this post, I'll look at a very quick way to look at the relationships in a database. I had a bit of fun with my first network graph and plotting the connections between tables and views seems like a natural extension. Here, I'm going to create a bare bones insurance database. We have a defined business segment, which contains one or more accou...

2650 sym R (1949 sym/4 pcs) 6 img

24 Days of R: Day 14

14.12.2013

I've had a statistical question that I've wanted to answer for more than 20 years. In college, I often played the strategy game “Axis & Allies” with friends. (Hi Brad, Rob, Brady and Marty!) The game is a crude simulation of the second world war, with various military units available to the player. The player chooses which units to utilize ba...

4245 sym R (2848 sym/5 pcs) 4 img