Skip to content

Instantly share code, notes, and snippets.

View miketahani's full-sized avatar

Mike Tahani miketahani

View GitHub Profile

Storytelling from Space: Tools/Resources

This list of resources is all about acquring and processing aerial imagery. It's generally broken up in three ways: how to go about this in Photoshop/GIMP, using command-line tools, or in GIS software, depending what's most comfortable to you. Often these tools can be used in conjunction with each other.

Acquiring Landsat & MODIS

Web Interface

  • Landsat archive
@miketahani
miketahani / pubkey
Created March 10, 2015 02:13
PGP Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: GPGTools - https://gpgtools.org
mQINBFT7YJMBEACrntzHlanB1qEG/NDRAobbu9IcBz1C1qoDrt1LDTa0gb5ocj7P
4BSv2Aw5DdqWVAniEnGaa/0EGVSJCbOshj1XvKqz3MdEUq2aoN6GV2M0BqpTS3Wf
0bNpjS0DtcXzVPoR/nyK7FzKvW6SUYMiX8gWKPT8Td75szjj3orf5S3ohjTyXiEf
CNJciL5J3FzyYKoxWz0bxFM6IMfaDSYMR8OfhABQBxXsrMfOcSRCtyd3UI90Uihg
0U/RC1+DEwek5wSZg3yPj1yHQdv63GZbTbzoY3IP39TgJPrQVez0mezyW2ci4OJz
UY06nolMmzE+/O31QbnMP7ch2jqJLMeMw1O3L7G2MBxe1Prgj+YpQk2XKN7USHAc
ZIpv2Vctc/cqKm57uqTi1LYJal7Ai7UI9LDj7QGKxc9xAmI+OEFZ0GzbrSwZnIGf

A simple div-based data grid, which could be enhanced by adding similar functionlity to SlickGrid, such as virtual rendering.

Basic usage

var grid = d3.divgrid();

d3.csv('cars.csv', function(data) {
  d3.select('#grid')
 .datum(data)
// This is the core Javascript code for http://windhistory.com/
// I haven't done a full open source release, but I figured I'd put the most important
// D3 code out there for people to learn from. --nelson@monkey.org
/** Common wind rose code **/
// Function to draw a single arc for the wind rose
// Input: Drawing options object containing
// width: degrees of width to draw (ie 5 or 15)
// from: integer, inner radius
# some convenience functions here, nothing new
'''
# usage:
from easypipe import easy_pipeline
from easypipe import print_metrics
data_folder = "data-hold/20news"
p = easy_pipeline()
print_metrics(p, data_folder)
'''
var request = require('request');
var express = require('express');
var app = express();
app.get('/goofy', function(req, res) {
request('http://images1.wikia.nocookie.net/__cb20120715102950/disney/images/a/a5/Disneygoofy2012.jpeg').pipe(res);
});
app.get('/loop', function(req, res) {
res.render('mypage');
@miketahani
miketahani / mapbox-studio-tiles.md
Last active August 29, 2015 14:19
grab mapbox studio tiles

apparently mapbox no longer lets you export mbtiles locally like tilemill used to. this can be a problem when you just spent an hour creating a tileset and suddenly realize that you need to fork over a monthly fee to get your tiles out.

this is the general structure of mapbox studio local tile urls (for styles): http://localhost:3000/style/<z>/<x>/<y>.<ext>?id=tmstyle://<file path>/<style name>.tm2&<autogenerated id>.

after selecting a project, View > Toggle Developer Tools, Network tab, copy the url for a tile, replace the part that corresponds to <z>/<x>/<y> above with {z}/{x}/{y} and you have a template url.

you can use the url to put together a custom provider in tilestache (have to do it yourself, since the proxy provider doesn't seem to support querystring arguments with urls) or if you're doing some rapid prototyping like i was, use this simple script to cache the tiles while you're working on other aspects of the map in the browser.

NOTE: you shou

@miketahani
miketahani / load-noisejs
Created April 30, 2015 01:51
load noise.js from the console
(function(){var e=document.createElement("script");e.async=!0,e.src="https://rawgit.com/josephg/noisejs/master/perlin.js",e.charset="utf-8",document.body.appendChild(e)})();
@miketahani
miketahani / README.md
Last active November 9, 2015 23:54
d3.unconf ticket

hacky web audio api + d3.

instructions

allow mic access, talk at computer.

view here

@miketahani
miketahani / index.html
Last active April 15, 2016 17:58
faded circles
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<style>
* {
box-sizing: border-box;
}
body,