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' |
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
# Last Updated: 2014.06.05 | |
# Gems to include | |
require 'Nokogiri' | |
require "open-uri" | |
require 'pp' | |
require 'json' | |
require 'csv' | |
# def get_default_data( default_stats, default_pricing, date_range ) |
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 'oauth' | |
require 'json' | |
require 'pp' | |
require 'csv' | |
consumer_key = 'NUM' | |
consumer_secret = 'NUM' | |
token = 'NUM' | |
token_secret = 'NUM' |
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 'nokogiri' | |
require 'pp' | |
require 'mechanize' | |
require 'open-uri' | |
require 'csv' | |
page = Nokogiri::XML(open('https://www.mindbodyonline.com/clients/feed/all.xml')) | |
items = page.css('marker') | |
CSV.open("mind_new.csv", "wb") do |csv| |
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 'rubygems' | |
require 'nokogiri' | |
require 'pp' | |
require 'mechanize' | |
require 'open-uri' | |
require 'csv' | |
key = "## YOUR KEY HERE" |
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 libraries | |
library(ggplot2) | |
# Set working directory | |
setwd("~/Dropbox (Personal)/Personal/Github/MindBody/New/") | |
# Read in the data | |
data <- read.csv('mind_new.csv', header=TRUE, as.is=TRUE) | |
# Convert everything to lower case |
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 'oauth' | |
require 'json' | |
require 'pp' | |
require 'csv' | |
consumer_key = '#YOURS' | |
consumer_secret = '#YOURS' | |
token = '#YOURS' | |
token_secret = '#YOURS' |
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
#ubergeojson, #original { | |
line-color: @road; | |
line-width: 0.5; | |
[zoom>=11] { line-width: 0.5; } | |
[zoom>=12] { line-width: 0.7; } | |
[zoom>=13] { line-width: 1; } | |
[zoom>=14] { line-width: 1.2; } | |
[zoom>=15] { line-width: 1.4; } | |
[zoom>=16] { line-width: 1.6; } | |
} |
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 geocode_all() { | |
// 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; |
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(ggplot2) | |
library(lubridate) | |
## Set the working directory | |
setwd("~/Dropbox (Personal)/Personal/Github/Citibike") | |
## Organize restaurant data | |
r <- read.csv('trips.csv', header=TRUE, as.is=TRUE) | |
head(r) |