Skip to content

Instantly share code, notes, and snippets.

View hepplerj's full-sized avatar
💭
building the history web

Jason Heppler hepplerj

💭
building the history web
View GitHub Profile
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@hepplerj
hepplerj / edgeslist.csv
Last active August 29, 2015 14:14
Token Arc
source target
I F
I F
F s
I F
d I
I F
I s
d I
I F
@hepplerj
hepplerj / index.html
Last active August 29, 2015 14:15
TokenArc
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Token Arcs</title>
<meta charset="utf-8" />
</head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://d3js.org/queue.v1.min.js"></script>
<script src="visualization.js"></script>
<style>
@hepplerj
hepplerj / index.html
Last active August 29, 2015 14:17
Wordtree 2
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node circle {
fill: #fff;
stroke: steelblue;
stroke-width: 1.5px;
}
@hepplerj
hepplerj / choro.R
Last active August 29, 2015 14:18
Problem with `fortify` giving me a fatal error.
library(ggmap)
library(rgdal)
library(tidyr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
# Read data
# The shapefile comes from NHGIS, modified to include only California census tracts.
tract_1960_shp <- readOGR("/Users/jheppler/data/census-transformed/1960-census/", "1960-ca-tracts")
> tract_1960_df <- fortify(tract_1960_shp, region = "GISJOIN")
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘proj4string’ for signature ‘"NULL"’
@hepplerj
hepplerj / bootstrap.min.css
Last active August 29, 2015 14:20
Parallel coordinate z-score with table
/*!
* Bootstrap v3.3.2 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box
@hepplerj
hepplerj / data.json
Last active August 29, 2015 14:21
Arc Diagram
{
"nodes":[
{
"name": "Julie",
"gender": "female"
},
{
"name": "Matt",
"gender": "male"
},
@hepplerj
hepplerj / index.html
Last active August 29, 2015 14:21
Chinese Text
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Chinese Input</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link href="./bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="style.css">
@hepplerj
hepplerj / index.html
Created September 12, 2015 23:29
Mapbox GL
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Mapbox GL</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.7.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.7.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }