Skip to content

Instantly share code, notes, and snippets.

@hankroark
hankroark / interp_urdf.R
Created October 21, 2019 20:04
This R function helps to interpret the output of the urca::ur.df function
############################################################################################
# This R function helps to interpret the output of the urca::ur.df function.
# The rules are based on https://stats.stackexchange.com/questions/24072/interpreting-rs-ur-df-dickey-fuller-unit-root-test-results
#
# urdf is the output of the urca::ur.df function
# level is one of c("1pct", "5pct", "10pct")
#
# Author: Hank Roark
# Date: October 2019
############################################################################################
@hankroark
hankroark / bq-r-map.R
Last active March 23, 2019 20:31
Map of Water-to_Land Ratio by Zip Code (within 50km of Seattle) - BigQuery, R, choroplethr
# Do this first time
# install.packages('devtools')
# devtools::install_github("rstats-db/bigrquery", ref = "master")
library(tidyverse)
# Use your project ID here
project <- "bqbbq-235416" # put your project ID here
# Your sql here
@hankroark
hankroark / bigquery-r-example.R
Created March 23, 2019 19:48
An example of querying geospatial data from BigQuery using R
# Do this first time
# install.packages('devtools')
# devtools::install_github("rstats-db/bigrquery", ref = "master")
# Use your project ID here
project <- "your project id here" # put your Google Cloud project ID here, it will be something like project-123456
# Your sql here
# This use public data sets to get water-land ratio by zip code within
# 10 km of Seattle (zip code 98104)
@hankroark
hankroark / ipython_notebook+spark.md
Created April 29, 2016 21:08 — forked from tommycarpi/ipython_notebook+spark.md
Link Apache Spark with IPython Notebook

How to link Apache Spark 1.6.0 with IPython notebook (Mac OS X)

Tested with

Python 2.7, OS X 10.11.3 El Capitan, Apache Spark 1.6.0 & Hadoop 2.6

Download Apache Spark & Build it

Download Apache Spark and build it or download the pre-built version.