Skip to content

Instantly share code, notes, and snippets.

View savannahniles's full-sized avatar

Savannah Niles savannahniles

View GitHub Profile
@savannahniles
savannahniles / flare.json
Last active December 25, 2015 00:09
Trouble appending multiple svg elements to a force-directed tree graph in D3.js
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},
@savannahniles
savannahniles / serialPort.rb
Created December 10, 2013 23:05
A Simple Ruby Program to Read Arduino serial over bluetooth and send an email, (say, to use IFTTT).
#simplest ruby program to read from arduino serial,
#using the SerialPort gem
#(http://rubygems.org/gems/serialport)
require "serialport"
require "pony"
#params for serial port
port_str = "/dev/tty.supershoesBT1-SPP" #may be different for you
#port_str = "/dev/tty.usbmodemfd121" #may be different for you
@savannahniles
savannahniles / D3-timeline-example.js
Last active August 29, 2015 13:56
a super simple example using D3.js to create a scalabale/scrollable/zoomable timeline
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="http://mbostock.github.io/d3/talk/20111018/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.io/d3/talk/20111018/d3/d3.csv.js"></script>
<script type="text/javascript" src="http://mbostock.github.io/d3/talk/20111018/d3/d3.time.js"></script>
<style type="text/css">
svg {
@savannahniles
savannahniles / bubble.html
Created August 11, 2014 15:01
D3 Bubble Chart: Visualizing News Browsing
<meta charset="utf-8">
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- <link href="css/style.css" media="screen" rel="stylesheet" type="text/css" /> -->
</head>
<body>