Skip to content

Instantly share code, notes, and snippets.

View john-guerra's full-sized avatar

John Alexis Guerra Gómez john-guerra

View GitHub Profile
@john-guerra
john-guerra / ieeevisNetwork.json
Last active August 22, 2018 22:31
IEEEVIS 2017 Twitter Followers Networks
{"nodes": [{"utc_offset": null, "statuses_count": 235, "screen_name": "datasketches", "friends_count": 2, "influential": true, "count_followers_in_query": 36, "profile_image_url": "http://pbs.twimg.com/profile_images/932711567451287552/nZmABbTH_normal.jpg", "original": false, "followers_count": 5074, "favourites_count": 378, "query_tweet_count": 0, "id": 744209572089323520, "listed_count": 215}, {"utc_offset": null, "statuses_count": 170, "screen_name": "observablehq", "friends_count": 6, "influential": true, "count_followers_in_query": 28, "profile_image_url": "http://pbs.twimg.com/profile_images/970805785503477760/HfTZJiZo_normal.jpg", "original": false, "followers_count": 6211, "favourites_count": 81, "query_tweet_count": 0, "id": 905255756789825536, "listed_count": 133}, {"utc_offset": null, "statuses_count": 36, "screen_name": "cnothelfer", "friends_count": 103, "influential": false, "count_followers_in_query": 11, "profile_image_url": "http://pbs.twimg.com/profile_images/1025626074124836864/8kemWS9__nor
@john-guerra
john-guerra / .block
Last active November 15, 2018 15:48
D3 Force Simulation
license: mit
@john-guerra
john-guerra / cond3.html
Created August 11, 2018 13:46
Simple D3 example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Con D3</title>
</head>
<body>
<h1>Scatterplot</h1>
<svg width=400 height=400 id="viz"></svg>
@john-guerra
john-guerra / .block
Last active August 11, 2018 01:37
Vega-Lite Bl.ocks example
license: bsd-3-clause
@john-guerra
john-guerra / .block
Last active August 11, 2018 01:10
Barchart d3v4
license: mit
@john-guerra
john-guerra / .block
Last active August 11, 2018 01:29
Scatterplot d3v4
license: mit
@john-guerra
john-guerra / .block
Created August 10, 2018 22:32
d3v4 Donut Chart
license: gpl-3.0
@john-guerra
john-guerra / .block
Created August 10, 2018 22:30
d3V4 Donut Chart
license: gpl-3.0
@john-guerra
john-guerra / outlays.csv
Created August 2, 2018 22:34
US Federal Budget 2018
We can't make this file beautiful and searchable because it's too large.
Agency Code,Agency Name,Bureau Code,Bureau Name,Account Code,Account Name,Treasury Agency Code,Subfunction Code,Subfunction Title,BEA Category,Grant/non-grant split,On- or Off- Budget,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,TQ,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022
001,Legislative Branch,00,Legislative Branch,,"Receipts, Central fiscal operations",,803,Central fiscal operations,Mandatory,Nongrant,On-budget,-628,-390,-469,-413,-410,-722,-464,-522,-439,-360,-343,-427,-539,-307,-287,-132,-429,-385,-726,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
001,Legislative Branch,00,Legislative Branch,,"Receipts, Central fiscal operations",,908,Other interest,Net interest,Nongrant,On-budget,0,0,0,-8,-7,-7,-7,-6,-6,-6,-5,-4,-4,-4,-30,-17,-104,-61,-548,0,0,0,0,0,
@john-guerra
john-guerra / d3-force.js
Created July 30, 2018 17:00
d3-force with boundary
// https://d3js.org/d3-force/ Version 1.1.0. Copyright 2018 Mike Bostock.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-quadtree'), require('d3-collection'), require('d3-dispatch'), require('d3-timer')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-collection', 'd3-dispatch', 'd3-timer'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3));
}(this, (function (exports,d3Quadtree,d3Collection,d3Dispatch,d3Timer) { 'use strict';
var center = function(x, y) {
var nodes;