443 search results for "knitr"

Tim Hortons Density

Tim Hortons Density

Tim Hortons Density Inspired by this post, I wanted to examine the locations and density of Tim Hortons restaurants in Canada. Using Stats Canada data, each census tract is queried on Foursquare for Tims locations. Setup options(stringsAsFactors = F) require(timmysDensity) require(plyr) require(maps) require(ggplot2) require(geosphere) Statistics Canada Census Data The actual Statistics Canada data at the dissemination block level can be downloaded from here. You will want to...

Read more »

24 Days of R: Day 8

December 7, 2013
By
24 Days of R: Day 8

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

Read more »

24 Days of R: Day 7

December 7, 2013
By
24 Days of R: Day 7

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

Read more »

24 Days of R: Day 6

December 6, 2013
By
24 Days of R: Day 6

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

Read more »

24 Days of R: Day 5

December 5, 2013
By
24 Days of R: Day 5

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

Read more »

24 Days of R: Day 4

December 4, 2013
By
24 Days of R: Day 4

So my first attempt to sort out the career of Michael Caine via parsing of HTML data was a wash. I'm going to try this again, using Wikipedia. They've got a nice, easy list of his films in an HTML table. Reading an HTML table into R is incredibly easy. The XML library has a

Read more »

24 Days of R: Day 3

December 3, 2013
By
24 Days of R: Day 3

This is the post where we begin to talk about Michael Caine. There's no strong reason for this. It's not as though I have a great fascination with him. Don't get me wrong, I think he's a fine actor. Michael Caine happened to cross my mind a couple weeks ago when I was listening to

Read more »

24 Days of R: Day 2

December 2, 2013
By
24 Days of R: Day 2

Need a Hanukkah or Christmas gift for an R analyst? You could do loads worse than Applied Spatial Data Analysis with R by Bivand, Pebesma and Gomez-Rubio. I don't have my copy yet- I'm still working through all of the other books I've bought this year- but I'll likely pick it up sometime early in

Read more »

24 Days of R: Day 1

December 1, 2013
By
24 Days of R: Day 1

Last year, the good people at is.R() spent December publishing an R advent calendar. This meant that for 24 days, every day, there was an interesting post featuring analysis and some excellent visualizations in R. I think it's an interesting (if very challenging) exercise and I'm going to try to do it myself this year.

Read more »

Getting Started with Mixed Effect Models in R

November 25, 2013
By

Getting Started with Multilevel Modeling in R Getting Started with Multilevel Modeling in R Jared E. Knowles Introduction Analysts dealing with grouped data and complex hierarchical structures in their data ranging from measurements nested within participants, to counties nested within states or students nested within classrooms often find themselves...

Read more »