View gist:4748004
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Pull in the html | |
x <- scan("~/Dropbox/Documents/Senior Year/Spring/STAT230/YaleFacebook3.html", | |
what="", sep="\n") | |
#All the student data is within the div class='display_data' | |
data <- grep('display_data', x, fixed=TRUE) | |
#The student data is all on the next line of html. The studens variable now contains the | |
#line number of the html with all the data | |
students <- x[data+1] | |
#each student's info is contained within the div with class='student_text_container' |
View gist:5172167
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: post | |
title: "Obesity in the USA" | |
date: 2013-03-14 12:59 | |
comments: true | |
categories: | |
--- | |
<!-- Make sure to include D3 first or else the IIFEs won't work. --> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<script type="text/javascript" src="/Data/obesitystatedata.js"></script> |
View gist:5392161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################## | |
# Miles Grimshaw | |
# April 15th, 2013 | |
# Code for graphs exploring US Economy | |
# Blog Post: | |
############################## | |
getwd() | |
setwd("~/Desktop/Macro_Paper/Data/") |
View gist:5523271
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Miles Grimshaw Code For Blog Post on Personal Data | |
### May 5th 2013 | |
getwd() | |
setwd("~/Desktop/x_Final_Project") | |
library(stringr) | |
library(lubridate) | |
library(ggplot2) |
View gist:5996636
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## MILES GRIMSHAW | |
require 'mechanize' | |
require 'csv' | |
require 'open-uri' | |
require "pp" | |
require "json" | |
CSV.open("immersion.csv", "wb") do |csv| | |
csv << ["Text","Date"] |
View gist:5997603
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(stringr) | |
library(lubridate) | |
library(ggplot2) | |
library(scales) | |
getwd() | |
setwd("~/Desktop/Personal_Projects/Immersion/") | |
i <- read.csv("./immersion.csv", header=TRUE, as.is=TRUE) | |
## Only get those emails that I sent |
View convert CSV to geoJSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'json' | |
require 'pp' | |
i = 0 | |
features = [] | |
start_line = [] | |
end_line = [] | |
## Loop through each row of the data |
View openpaths data management
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Code for subsetting and formatting open paths data for Mapbox | |
## Miles Grimshaw | |
## December 26th 2013 | |
## Set working directory and load required packages | |
getwd() | |
setwd("~/Dropbox/Personal/Mapbox/OpenPaths/") | |
library(stringr) | |
library(lubridate) | |
# library(ggplot2) |
View gist:8941929
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load packages | |
library(ggplot2) | |
library(lubridate) | |
library(stringr) | |
library(scales) | |
# Set the working directory | |
getwd() | |
setwd("~/Dropbox/Personal/Projects/Evernote_Analysis/files/") |
View Geocoding Apps Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addMahZipCodez() { | |
// grab basic sheet data | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); | |
var values = rows.getValues(); | |
// init some locals for looping over each row | |
var row; |
OlderNewer