Skip to content

Instantly share code, notes, and snippets.

@mgold
mgold / .block
Last active June 14, 2017 06:37
Wheat Plot
license: mit
@mgold
mgold / .block
Last active March 5, 2017 01:40
valv
license: mit
@mgold
mgold / .block
Last active January 5, 2017 06:05
Zukei Puzzle Solver
license: mit
@mgold
mgold / .block
Last active December 2, 2016 06:31
Ellipse Interpolation
license: mit
@mgold
mgold / .block
Created July 22, 2016 04:12
Basis Vectors
license: gpl-3.0
@mgold
mgold / README.md
Last active April 17, 2016 22:04
Brady Campaign vs. the NRA on Senators

This scatterplot shows how the pro-gun NRA and the pro-gun-control Brady Campaign rank U.S. senators. The size of the dot is proportional to the number of senators; hover over to see them. Not surprisingly, there's a strong negative correlation.

Each scatter dot is actually a pie chart, but I am saved from the wrath of the datavis gods by political polarization: there are no Democrats and Republicans that share a stance.

The data were surpringly hard to come by but were sourced from VoteSmart (Brady) and The Washington Post (NRA).

Built with blockbuilder.org.

@mgold
mgold / elmpackager.rb
Created March 24, 2016 20:37
A script to help installing elm packages.
require "json"
require "net/http"
require "uri"
def download(name)
puts "Installing " + name
`elm package install #{name} --yes`
end
def prompt(instructions)
@mgold
mgold / Main.elm
Created February 22, 2016 16:54
Toggle in Elm
module Main (..) where
import Color
import Date exposing (Date)
import Task exposing (Task)
import Json.Decode
import Html exposing (Html, div, tr, td, th)
import Html.Attributes as Attrs exposing (class)
import Html.Events exposing (onClick, on)
import StartApp exposing (start)
@mgold
mgold / SuperTimer.elm
Created February 12, 2016 14:40 — forked from shamrin/SuperTimer.elm
Restartable timer
module SuperTimer where
import Html exposing (..)
import Html.Events exposing (onClick)
import Time exposing (Time)
import Signal exposing (Address)
type Action = Tick Time | Toggle Bool | NoOp
type alias Model = { running: Bool, count: Float}
@mgold
mgold / .block
Last active May 26, 2018 20:53
65 Years
license: mit