Skip to content

Instantly share code, notes, and snippets.

View jthomassie's full-sized avatar

Juan Thomassie jthomassie

View GitHub Profile
@jthomassie
jthomassie / grantee-map-snippet.html
Created February 25, 2024 18:20
grantee map snippet
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><link rel="stylesheet" href="https://projects.data-visual.net/firelight/_next/static/css/ed46f39d8c96a53f.css" crossorigin="" data-precedence="next" /><link rel="stylesheet" href="https://projects.data-visual.net/firelight/_next/static/css/494038633ee55e22.css" crossorigin="" data-precedence="next" /><link rel="preload" as="script" fetchPriority="low" href="https://projects.data-visual.net/firelight/_next/static/chunks/webpack-776a2fc15c7d2004.js" crossorigin="" /><script src="https://projects.data-visual.net/firelight/_next/static/chunks/fd9d1056-278f759219ca9de7.js" async="" crossorigin="" ></script><script src="https://projects.data-visual.net/firelight/_next/static/chunks/69-1d2561e4e151cf08.js" async="" crossorigin="" ></script><script src="https://projects.data-visual.net/firelight/_next/static/chunks/main-app-b938a3bd9f777a1e.js" async="" crossorigin="" ></script><script sr
// Implementation of perlin noise, ported from https://gist.github.com/Flafla2/f0260a861be0ebdeef76 to js.
var repeat = -1;
var setRepeat = function(repeat) {
this.repeat = repeat;
};
/**
@jthomassie
jthomassie / README.md
Created February 26, 2016 17:42
Streamgraph Chart
@jthomassie
jthomassie / README.md
Created February 25, 2016 23:53
fresh block
@jthomassie
jthomassie / index.js
Last active August 29, 2015 14:07
requirebin sketch
var d3 = require('d3');
var _ = require('underscore');
var insertCSS = require("insert-css");
insertCSS("body {font-family: sans-serif; font-size: 10px; color: #555;} .list {width: 100px; margin: 0} .item {width: 100px; height: 12px; margin: 1px 0px 0px 1px;} .chip {width: 30px; height: 12px; position: relative; float: left;} .text {width: 60px; position: relative; float: left; margin: 0px 0px 0px 3px}");
var brandcolors = [
'#006555',//dkgreen
'#95c73d',//ltgreen
'#2d448e',//dkprurp
@jthomassie
jthomassie / index.js
Created October 1, 2014 16:42
requirebin sketch
// require something
var d3 = require('d3');
var _ = require('underscore');
var insertCSS = require("insert-css");
insertCSS(".list {width: 20px; margin: 4px 0px 0px 4px} .rect {width: 20px; height: 20px; margin: 4px 0px 0px 0px}");
var data = [
'#006555',//dkgreen
'#95c73d',//ltgreen
@jthomassie
jthomassie / histogram.js
Last active August 29, 2015 13:58
new histogram.js
define(function (require) {
'use strict';
var tooltip = require('bower_components/K4D3/src/tooltip'),
d3 = require('d3');
return function (elem, args) {
var chart = {},
elemWidth = parseInt(d3.select(elem.parentNode).style('width'), 10),
// zero injection
var testdata = {
"columns": [
{
"label": "Top 5 _type",
"rows": [
{
"label": "Top 5 response",
"xAxisLabel": "Daily @timestamp",
"yAxisLabel": "Count",
@jthomassie
jthomassie / elasticsearch.js
Last active August 27, 2019 07:23
elasticsearch.js + aggregations + d3
/*! elasticsearch - v1.5.9 - 2014-02-26
* http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html
* Copyright (c) 2014 Elasticsearch BV; Licensed Apache 2.0 */
!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.elasticsearch=e():"undefined"!=typeof global?global.elasticsearch=e():"undefined"!=typeof self&&(self.elasticsearch=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
},{}],2:[function(require,module,exports){
//
// The shims in this fil
@jthomassie
jthomassie / arc-places.json
Last active June 13, 2023 20:25
d3 globe arcs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.