Skip to content

Instantly share code, notes, and snippets.

View briantjacobs's full-sized avatar

Brian Jacobs briantjacobs

View GitHub Profile
@briantjacobs
briantjacobs / eol-scrape-01.js
Last active December 13, 2015 18:08
Node.io triple query to the Encyclopedia of Life for taxonomy entries based on species names
var nodeio = require('node.io'), options = {timeout: 10};
exports.job = new nodeio.Job(options, {
input: 'data/haeckel-plates.csv',
run: function(input) {
var self = this;
if (!input.type) {
var values = this.parseValues(input);
var keyword = values[2]; // hardcoded csv column
@briantjacobs
briantjacobs / license.txt
Last active August 29, 2015 13:57
Styled maps in Matlab
Copyright (c) 2010-2013, Zohar Bar-Yehuda
Copyright (c) 2010, Val Schmidt
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
@briantjacobs
briantjacobs / gist:11049190
Last active August 29, 2015 14:00
Geo Tools OSX
@briantjacobs
briantjacobs / CivicMediaLinks2014.md
Last active August 29, 2015 14:03
Links and projects overheard at the MIT Civic Media Conference 2014
@briantjacobs
briantjacobs / structured-wikipedia.md
Last active May 14, 2022 15:36
Structured Wikipedia data resources
@briantjacobs
briantjacobs / SRCCON-climate.md
Last active August 29, 2015 14:04
SRCCON - Interactives and Climate Change Resources
# 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 && \
@briantjacobs
briantjacobs / l8get
Last active August 29, 2015 14:06 — forked from dwtkns/l8get
# 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/