Skip to content

Instantly share code, notes, and snippets.

@akbstone
akbstone / .block
Last active February 6, 2018 14:37 — forked from mbostock/.block
Closest Point on Path
license: gpl-3.0
@akbstone
akbstone / bounds.js
Created June 7, 2016 16:43 — forked from mapsense-examples/bounds.js
Drag & drop csv to map
// Hat tip Mike Bostock: https://github.com/mbostock/polymaps/blob/master/examples/bounds/bounds.js
function bounds(features) {
var i = -1,
n = features.length,
geometry,
bounds = [{lon: Infinity, lat: Infinity}, {lon: -Infinity, lat: -Infinity}];
while (++i < n) {
//geometry = features[i].data.geometry;
geometry = features[i].geometry;
@akbstone
akbstone / README.md
Last active February 15, 2016 23:25 — forked from calvinmetcalf/README.md
Reprojected Raster Tiles
@akbstone
akbstone / README.markdown
Last active February 10, 2016 16:51 — forked from bewest/README.markdown
d3 several time scales ~bewest

-- Fix reference to raw git files

Time scales

This demo several time scales. src

full screen demo

D3's time axis does magic things. I expected to modify the x axis such that I could mostly re-use D3's date formatting tricks, but exercise

@akbstone
akbstone / README.md
Last active February 8, 2016 23:38
Leaflet + D3 using D3 geo to project

Use D3 to project points rather than leaflet (or OL)

@akbstone
akbstone / README.md
Last active July 18, 2016 23:05 — forked from tmcw/README.md
Line Chart w/ Regresions
@akbstone
akbstone / README.md
Last active August 29, 2015 14:25
OL3 + Proj4JS
@akbstone
akbstone / index.html
Created October 16, 2013 22:11 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
background: #fcfcfa;
}
</style>
<body>
@akbstone
akbstone / OpenLayers.D3.js
Last active December 23, 2015 22:29
Openlayers2 + Proj4js + D3js.hexbin
OpenLayers.Layer.D3 = OpenLayers.Class(OpenLayers.Layer.Vector, {
d3FeaturesNodeClass:'d3features',
d3Features:[],
afterAdd:function(){
var self = this;
if(this.renderer.CLASS_NAME.match(/SVG$/)){
this.d3InitSVG();
this.events.register('moveend',this,this.onMoveEnd);