Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rhhackett on github.
  • I am rhhackett (https://keybase.io/rhhackett) on keybase.
  • I have a public key whose fingerprint is B145 4B49 582E 5B01 DF86 5D6D 6D41 8506 CF93 08F0

To claim this, I am signing this object:

@rhhackett
rhhackett / dcmap_final
Created December 18, 2013 20:11
Data II Final
library(ggplot2)
dc = read.csv("bob.csv")
library(mapproj)
library(maps)
library(maptools)
plot(dc$lon,dc$lat,pch='.')
# turn on ggmap and ggplot2 in "Packages" (lower right box of R Studio)
qmplot(lon,lat,data=dc)
# can't figure out how to get open street maps rather than google maps to work
# qmplot(lon,lat,data=dc,source="osm")
@rhhackett
rhhackett / gist:7328934
Last active December 27, 2015 12:49
Program to sample randomly from White House visits
# Below is a tool Julie and I (Bob) created to randomly select
# a group of visitors of some specified size from the some
# subset of visitors
randomvisit = function(data,lo=5,hi=10){
# lo represents the low value; hi represents the high value.
# So, above we are looking at groups ranging from 5-10 visitors.
u = table(data$UIN)