Skip to content

Instantly share code, notes, and snippets.

gistup
@tophtucker
tophtucker / multi-line-chart.js
Last active December 13, 2016 22:27
time-series-chart.js (d3 v4)
function multiLineChart() {
var margin = {top: 20, right: 20, bottom: 20, left: 20},
width = 760,
height = 120,
xValue = function(d) { return d[0]; },
yValue = function(d) { return d[1]; },
zValue = function(d) { return d; },
xScale = d3.scaleTime(),
yScale = d3.scaleLinear(),
xAxis = d3.axisBottom().scale(xScale).tickSize(6, 0),
@tophtucker
tophtucker / index.html
Last active November 4, 2022 18:26
Batterymap
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Batterymap</title>
<style>
html, body {
height: 100%;
margin: 0;
@tophtucker
tophtucker / .block
Last active September 6, 2016 04:56
Elastic collisions
license: mit
@tophtucker
tophtucker / .block
Last active September 5, 2016 19:13 — forked from mbostock/.block
Trump support vs. distance from sea
license: gpl-3.0
@tophtucker
tophtucker / d3.v4.js
Last active September 6, 2016 05:01
White on White
// https://d3js.org Version 4.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
}(this, function (exports) { 'use strict';
var version = "4.0.0";
function ascending(a, b) {
@tophtucker
tophtucker / .block
Last active September 6, 2016 04:54
The Continuity of Parks
scrolling: yes
@tophtucker
tophtucker / .block
Last active July 21, 2016 11:30
A clock of Toph’s summer
license: gpl-3.0
@tophtucker
tophtucker / feedback.md
Last active June 6, 2019 07:32
Typeset gyro

USER TESTING: John

  • Too much going on when page loads!!!
  • He loaded it lying down on his back; either do gyro relative to initial position or communicate the neutral position better
  • Doesn't get the 'record' metaphor; feels more like a play/stop situation
  • Text wrapping confuses the linear tape recording metaphor
  • Can't tell if toggles are on or off
  • Wants toggles to be hooked up 'live' to visualize the relevant gyro axis
  • Confusing to have three gyro and one accelerometer button
  • Text should scroll with cursor
@tophtucker
tophtucker / index.html
Last active January 4, 2020 18:26
Inferring device position from acceleration
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
box-sizing: border-box;
}