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
{"vehicle":[{"id":"1406","lon":"-122.467552","routeTag":"N","predictable":"true","speedKmHr":"6","dirTag":"N____I_E30","heading":"75","lat":"37.762127","secsSinceReport":"47"},{"id":"8737","lon":"-122.43219","routeTag":"43","predictable":"true","speedKmHr":"0","dirTag":"43___O_F00","heading":"103","lat":"37.805126","secsSinceReport":"11"},{"id":"52","lon":"-122.397339","routeTag":"C","predictable":"true","speedKmHr":"0","dirTag":"C____O_F00","heading":"218","lat":"37.793591","secsSinceReport":"36"},{"id":"8830","lon":"-122.391975","routeTag":"54","predictable":"true","speedKmHr":"21","dirTag":"54___I_F00","heading":"180","lat":"37.755085","secsSinceReport":"36"},{"id":"5605","lon":"-122.492912","routeTag":"1","predictable":"true","speedKmHr":"0","dirTag":"1____I_E00","heading":"269","lat":"37.77985","secsSinceReport":"47"},{"id":"6729","lon":"-122.39817","routeTag":"38R","predictable":"true","speedKmHr":"0","dirTag":"38R__O_F00","heading":"316","lat":"37.791473","secsSinceReport":"36"},{"id":"8202","lon":"-12
@john-guerra
john-guerra / d3-force.js
Created May 5, 2018 16:12
d3-force with force 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;
@john-guerra
john-guerra / .block
Last active April 18, 2018 22:01
d3.geoPath + Canvas + Zoom + Panning
license: gpl-3.0
height: 600
border: no
@john-guerra
john-guerra / .block
Created April 15, 2018 00:08
d3.forceBoundary
license: mit
@john-guerra
john-guerra / .block
Last active April 23, 2019 14:06
d3.forceBoundary
license: mit
@john-guerra
john-guerra / .block
Last active April 18, 2018 22:04
d3.forceBoundary Forces with Border
license: mit
@john-guerra
john-guerra / .block
Last active April 18, 2018 22:07
d3.forceBoundary Forces no Border
license: mit
@john-guerra
john-guerra / .block
Last active April 12, 2018 23:29
2017 US Federal Budget Template
license: mit
@john-guerra
john-guerra / .block
Last active March 23, 2018 17:17
US States Small Multiples With forEach
license: mit
{
"links": [
{
"source": 0,
"target": 1,
"value": 3
},
{
"source": 2,
"target": 3,