hexer is cool. It's a new project by Howard Butler that makes hexagon binned files out of point files.
This worked on my system (OSX 10.9, git
via homebrew
)
git clone https://github.com/hobu/hexer.git
hexer is cool. It's a new project by Howard Butler that makes hexagon binned files out of point files.
This worked on my system (OSX 10.9, git
via homebrew
)
git clone https://github.com/hobu/hexer.git
This is a very simple node-based client demonstrating how you can use the Twitter streaming API with the locations parameter specified. It uses geojson.io to map any tweets it hears within a user-specified duration.
Before running the map.coffee
script, place your app's OAuth keys in keys.json
and run npm install
to install dependencies (viz., ntwitter
and opener
).
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
""" | |
Utility functions for hex grids. | |
""" | |
from math import sqrt | |
from heapq import heappush, heappop | |
import numpy | |
import numpy.random | |
neighbours = numpy.array(((2, 0), (1, 1), (-1, 1), (-2, 0), (-1, -1), (1, -1))) |
# https://www.mapbox.com/blog/processing-landsat-8/ | |
task :landsat_2014 => :environment do | |
dirs = Dir["#{Rails.root.to_s}/db/initial/raster/*"].reject {|q| q =~ /tar\.gz/ } | |
dirs.each do |dir| | |
scene_id = dir.split("/")[-1] | |
[4,3,2].each do |band| | |
`gdalwarp -t_srs EPSG:3857 #{dir}/#{scene_id}_B#{band}.TIF #{dir}/#{scene_id}_B#{band}-projected.tif` | |
end | |
`convert -combine #{dir}/#{scene_id}_B{4,3,2}-projected.tif #{dir}/#{scene_id}_RGB-projected.tif && \ | |
convert -channel B -gamma 0.925 -channel R -gamma 1.03 -channel RGB -sigmoidal-contrast 50x16% #{dir}/#{scene_id}_RGB-projected.tif #{dir}/#{scene_id}_RGB-projected-corrected.tif && \ |
# This is Dan Allan's setting of Professor Robert Leheny's plotting style preferences. | |
# Updated October 2014 | |
# | |
# Invoke in Python matplotlib like so: | |
# | |
# import matplotlib as mpl | |
# | |
# mpl.style.use('https://gist.github.com/danielballan/be066529de85e87a5fe7/raw') | |
# | |
# This feature is only available in matplotlib version 1.4 or higher. |
# This is a shell function to quickly grab the data for a given Landsat 8 tile ID from Google's servers | |
# For example: | |
# l8get LC81690352014169LGN00 | |
# The echo at the end is to remind myself of the syntax for extracting bands 8, 4, 3, and 2. (Pansharp, Red, Green, Blue) | |
# On OSX this would go into your ~/.bash_profile file. | |
# Requires gsutil from https://developers.google.com/storage/docs/gsutil_install | |
# Most useful in conjunction with USGS' Earth Explorer: http://earthexplorer.usgs.gov/ |
#!/bin/bash | |
# | |
# _ _ __ | |
# __ _ __ _ _ __| |__ (_)/ _|_ _ | |
# / _` |/ _` | '__| '_ \| | |_| | | | | |
#| (_| | (_| | | | |_) | | _| |_| | | |
# \__, |\__,_|_| |_.__/|_|_| \__, | | |
# |___/ |___/ | |
# | |
# |