Skip to content

Instantly share code, notes, and snippets.

View willium's full-sized avatar
🫡

William Wolf willium

🫡
View GitHub Profile
@willium
willium / analysis.R
Last active November 19, 2015 21:12
###############################################
# SETUP
###############################################
# set working directory
setwd("/Users/willium/Documents/School/uw/2015-2016/Quarter 1/Stat 311/assignments/group-2")
# load data.csv into variable d
d <- read.csv("raw_data.csv", header=TRUE, as.is=TRUE, na.strings=c("", "NA")) # d is data
@willium
willium / vega.json
Created December 24, 2015 06:12
"labels" on bars
{
"width": 400,
"height": 400,
"padding": {"top": 10, "left": 30, "bottom": 20, "right": 10},
"data": [
{
"name": "table",
"values": [
{"category":"A", "amount":28},
{"category":"B", "amount":55},
@willium
willium / index.html
Created December 26, 2015 00:12
labels VL, will/bar-lebel
<!DOCTYPE html>
<meta charset="utf-8">
<script src="../../d3/d3.min.js"></script>
<script src="../../vega/vega.js"></script>
<script src="../../vega-lite/vega-lite.js"></script>
<div id="vis"></div>
<script type="text/javascript">
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html {
width: 200px;
height: 600px;
margin: 0;
padding: 0;
@willium
willium / filtered_line.json
Last active May 10, 2016 07:35
vega label specs
{
"width": 1,
"height": 1,
"padding": "auto",
"data": [
{
"name": "source",
"url": "data/stocks.csv",
"format": {
"type": "csv",
@willium
willium / research.md
Last active April 15, 2016 08:42
Tooltip research

Semantic Position

left, right, top left, top right, bottom left, bottom right, center?middle, top center, top middle

  • jQuery UI
  • qtip2
  • hint.css
  • opentip
  • tipped
  • tooltipster
  • bootstrap
{
"description": "A simple bar chart with embedded data.",
"layers": [
{
"name": "myBar",
"mark": "bar",
"data": {
"values": [
{"a": "A","b": 28},
{"a": "B","b": 55},

Keybase proof

I hereby claim:

  • I am willium on github.
  • I am willium (https://keybase.io/willium) on keybase.
  • I have a public key ASDc-DfC9a3McM4pn02gdFslk-CxpGQWbFd-T-P0iQ7HLQo

To claim this, I am signing this object:

@willium
willium / bar.vg.json
Created September 26, 2016 02:22
Vega Gist
{
"width": 400,
"height": 200,
"padding": {"top": 10, "left": 30, "bottom": 30, "right": 10},
"data": [
{
"name": "table",
"values": [
{"x": 1, "y": 28}, {"x": 2, "y": 55},
{"x": 3, "y": 43}, {"x": 4, "y": 91},
def memoize(fn):
cache = dict()
def closure(*args):
if args not in cache:
cache[args] = fn(*args)
return cache[args]
return closure