Skip to content

Instantly share code, notes, and snippets.

View walkerjeffd's full-sized avatar

Jeff Walker walkerjeffd

View GitHub Profile
@walkerjeffd
walkerjeffd / setup.sh
Last active August 29, 2015 14:02
Raspberry Pi Set Up
# Raspberry Pi Set Up Shell Script
# By Jeff Walker
# I created this to make it easier to re-install/re-configure my pi in case I need to start from scratch.
# Assumes Occidentalis v0.2 is being used.
# Run an update
# sudo apt-get update
# Adafruit WebIDE
@walkerjeffd
walkerjeffd / r-for-engineers.md
Last active August 29, 2015 14:02
R Programming for Environmental Engineers

R Programming for Environmental Engineers

Jeff Walker, PhD

This document provides some suggestions and resources for environmental engineers using R. This information is based on my own personal experience of learning and using R.

Software

@walkerjeffd
walkerjeffd / LOGGER00.csv
Last active August 29, 2015 14:04
Riffle-ito Script for DHT22
DATETIME RTC_TEMP_C TEMP_C HUMIDITY_PCT BATTERY_LEVEL
2014-07-15 21:05:29 25.50 25.70 70.40 5.15
2014-07-15 21:05:35 25.50 25.70 70.30 5.14
2014-07-15 21:05:40 25.50 25.70 70.30 5.14
2014-07-15 21:05:45 25.50 25.70 70.30 5.14
2014-07-15 21:05:51 25.50 25.70 70.30 5.14
2014-07-15 21:05:56 25.50 25.60 70.19 5.14
2014-07-15 21:06:02 25.50 25.60 70.30 5.14
2014-07-15 21:06:07 25.50 25.70 70.30 5.14
2014-07-15 21:06:12 25.50 25.60 70.30 5.14
@walkerjeffd
walkerjeffd / README.md
Last active September 16, 2015 21:57
hello-d3-block-builder
@walkerjeffd
walkerjeffd / README.md
Last active September 17, 2015 00:10
Epicyclic Gearing Quickly

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

forked from mbostock's block: Epicyclic Gearing

Used Block Builder to fork and make it go fast!

@walkerjeffd
walkerjeffd / README.md
Last active September 29, 2015 20:08
Bar Chart
@walkerjeffd
walkerjeffd / README.md
Created November 17, 2015 01:18
timeseries-uncertainty
@walkerjeffd
walkerjeffd / README.md
Last active November 17, 2015 02:09
timeseries-uncertainty
@walkerjeffd
walkerjeffd / ggplot2.calendar
Last active December 20, 2015 02:29
Calendar Plot using ggplot2
require(lubridate)
require(plyr)
require(ggplot2)
theme_set(theme_bw())
# create random dataset
df <- data.frame(DATETIME = ymd("2000-01-01") + ddays(runif(100)*365*5))
# compute day/month columns
df <- mutate(df,
@walkerjeffd
walkerjeffd / zoo_regular.R
Created August 7, 2013 23:02
R function for creating a regular and continuous zoo object from two vectors of dates/datetimes and values with optional fill values
zoo.regular <- function(dates, values, by="hour", fill=NA) {
# convert time series to regular zoo object
require(zoo)
z <- zoo(values, dates)
z <- merge(z, zoo(, seq(floor_date(start(z), 'day'),
ceiling_date(end(z), 'day'),
by)),
fill=fill)
z <- z[1:(length(z)-1)]
return(z)