Skip to content

Instantly share code, notes, and snippets.

View OliverWS's full-sized avatar

Oliver Saunders Wilder OliverWS

View GitHub Profile
var venn = function(opts) {
var w = opts.w || 500,
h = opts.h || 500,
div = opts.div || "#venn";
var labels = opts.labels || ["1","2","3"];
var melabel = opts.melabel || "{ME}";
var svg = d3.select(div).append("svg:svg")
.attr("width", w)
.attr("height", h);
@OliverWS
OliverWS / index.html
Last active December 10, 2015 07:58
Simple Globe
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.graticule {
fill: none;
stroke: #777;
}
.boundary {
@OliverWS
OliverWS / index.html
Created January 23, 2013 04:08
Boxplot
<html>
<head>
<script src="https://raw.github.com/sjkaliski/numbers.js/master/src/numbers.js"></script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
</head>
<body>
@OliverWS
OliverWS / index.html
Last active December 11, 2015 13:08
Study Diagrams
<!DOCTYPE html>
<meta charset="utf-8">
<style>
rect.box {
stroke: black;
stroke-width: 2;
fill: none;
}
</style>
<html>
<body>
<iframe width="720" height="437" src="http://www.ustream.tv/embed/12527097?v=3&amp;wmode=direct" scrolling="no" frameborder="0" style="border: 0px none transparent;"> </iframe>
<br /><a href="http://www.ustream.tv/producer" style="padding: 2px 0px 4px; width: 400px; background: #ffffff; display: block; color: #000000; font-weight: normal; font-size: 10px; text-decoration: underline; text-align: center;" target="_blank">Free desktop streaming application by Ustream</a>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OliverWS
OliverWS / gist:1baa3fb549fd6931250e
Created May 9, 2014 19:52
Grab frame from ISS HD feed
ffmpeg -i http://bit.ly/ISS_HDEV -o frame.png
@OliverWS
OliverWS / 10m.json
Last active November 9, 2016 18:42 — forked from rveciana/README.md
Basic map with new d3js 4.0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OliverWS
OliverWS / .block
Last active November 9, 2016 19:43
Google Search Volume for "Canadian Immigration" on November 9th, 2016
license: gpl-3.0
height: 600
border: no
@OliverWS
OliverWS / get_tweets.R
Created February 1, 2017 13:49
Example R script for downloading twitter data
install.packages("rtweet") # Only necessary the first time, to install the rtweet package
library(rtweet)
#See here for info on creating access token: https://cran.r-project.org/web/packages/rtweet/vignettes/auth.html
twitter_token <- create_token(app = "rtweet-ows", # whatever you named app
consumer_key = "<CONSUMER_KEY_HERE>",
consumer_secret = "<CONSUMER_SECRET_HERE>")
tweets <- get_timeline("realDonaldTrump", n = 5000) # Can also use search terms and the like here, or increase number of tweets to load
View(tweets)