Skip to content

Instantly share code, notes, and snippets.

View monkeycycle's full-sized avatar

Michael Pereira monkeycycle

View GitHub Profile
@monkeycycle
monkeycycle / data.csv
Last active April 29, 2017 19:55
D3 column chart
date value
2013-01 53
2013-02 165
2013-03 269
2013-04 344
2013-05 376
2013-06 410
2013-07 421
2013-08 405
2013-09 376
@monkeycycle
monkeycycle / data.csv
Last active April 29, 2017 19:57
Single d3 line chart
Date Close
3-31-1992 0.28
4-30-1992 0.2875
5-29-1992 0.275
6-30-1992 0.25
7-31-1992 0.25
8-31-1992 0.225
9-30-1992 0.225
10-30-1992 0.2125
11-30-1992 0.1375
@monkeycycle
monkeycycle / data.csv
Last active April 29, 2017 17:39
Graph with multiple lines and label.
date close open
1-May-12 68.13 34.12
30-Apr-12 63.98 45.56
27-Apr-12 67.00 67.89
26-Apr-12 89.70 78.54
25-Apr-12 99.00 89.23
24-Apr-12 130.28 99.23
23-Apr-12 166.70 101.34
20-Apr-12 234.98 122.34
19-Apr-12 345.44 134.56
@monkeycycle
monkeycycle / .block
Created April 4, 2017 14:16 — forked from mbostock/.block
Google Maps + D3
license: gpl-3.0
@monkeycycle
monkeycycle / index.html
Created March 31, 2017 03:51 — forked from biovisualize/index.html
Basic Reusable Slopegraph
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<script type='text/javascript' src="http://d3js.org/d3.v2.js"></script>
<script type='text/javascript' src="slopegraph.js"></script>
<style type='text/css'>
line.slope-line{
stroke:green
@monkeycycle
monkeycycle / 0_reuse_code.js
Created March 30, 2017 01:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@monkeycycle
monkeycycle / .block
Created March 5, 2017 02:26 — forked from HarryStevens/.block
Annotations with Swoopy Drag for Scatter Plot
license: gpl-3.0
@monkeycycle
monkeycycle / .block
Created March 2, 2017 16:01 — forked from palewire/.block
Load data incrementally in d3 using a sorted value
license: MIT
border: no
height: 800
@monkeycycle
monkeycycle / durhamcounty.py
Created February 24, 2017 04:13 — forked from johnhawkinson/durhamcounty.py
Durham County NYC - Inmate Population Search
#!/usr/bin/python
import mechanize
import lxml.html
BASE_URL = "http://www2.durhamcountync.gov/sheriff/ips/default.aspx"
def parse_names(root):
# finds the names and prints
names = root.xpath("//a[@class='rvsnavy-bold']")
@monkeycycle
monkeycycle / index.js
Created February 24, 2017 04:13 — forked from thomaswilburn/index.js
ASP page scraper with comments
// Built-in modules
var csv = require("csv");
var fs = require("fs");
var url = require("url");
// Loaded from NPM
var $ = require("cheerio"); // jQuery-like DOM library
var async = require("async"); // Easier concurrency utils
var request = require("request"); // Make HTTP requests simply