Skip to content

Instantly share code, notes, and snippets.

View troyericg's full-sized avatar

Troy Griggs troyericg

  • The New York Times
  • New York
View GitHub Profile
@palewire
palewire / LOCATING_THE_STORY.textile
Created January 30, 2012 23:59
Locating the story: The latest in mapping.

Locating the story: The latest in mapping

A collection of links for a NICAR 2012 presentation. It will suggest broad themes for the past year, and try to support them with examples from work in the field. This is a work in progress. Feel free to crap on it, or add your own ideas.

Escape from Google Maps

  • Google changed the rules of the game. There are now usage limits. Read about them here
  • TileMill, custom tiles, need examples
  • Links to ranty blog posts from Nestoria guy and others
  • One replacement is simple line maps drawn using HTML5 technologies like SVG, Canvas and VML. You saw this example a lot in election maps during the GOP primaries, like NYT, WaPo, HuffPo, LAT
@panuta
panuta / gist:1852087
Last active June 16, 2024 18:15
How to setup Django/Postgresql on OS X Mountain Lion using Homebrew

Command Line Tools for Xcode

Command line tools comes bundle with Xcode prior to 4.3 version. After 4.3, you need to install a separated command line tools yourself.

First, go to this url and login using Apple Developer account (Free to register)

https://developer.apple.com/downloads/index.action
@mbostock
mbostock / .block
Last active March 6, 2024 04:06
Gradient Along Stroke
license: gpl-3.0
brew install ffmpeg --with-libvorbis --with-nonfree --with-gpl --with-libvpx --with-pthreads --with-libx264 --with-libfaac --with-libtheora
@aboutaaron
aboutaaron / routes.rb
Created January 22, 2013 18:16
Proper routes, my boy!
ChSound::Application.routes.draw do
#get "list/index"
resources :list
#get "gallery/index"
resources :gallery
# Set List/index as root
# app can now be accessed at 0.0.0.0:3000
# instead of 0.0.0.0:3000/list/index
@troyericg
troyericg / code drop
Last active July 23, 2018 22:39
where I keep miscellaneous code snippets
<!-- to force a mobile view on a responsive site. Place in-between the header tags. -->
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
/* To correctly size elements with borders and padding */
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
@ascheink
ascheink / gitmo-splash.rb
Last active December 13, 2015 20:08
Code to quickly create a mosaic image of the faces of the detainees still in Gitmo http://i.imgur.com/tIqdGtH.jpg
require 'nokogiri'
require 'httparty'
puts "Scraping ids of detainees in custody"
ids = []
(1..10).each do |n|
response = HTTParty.get "http://projects.nytimes.com/guantanamo/detainees/held?page=#{n}"
page = Nokogiri::HTML(response)
ids += page.css('#detaineesTable a').map { |link| $1 if /detainees\/(\d+)/ =~ link['href'] }.compact
end
@aboutaaron
aboutaaron / challenge.html
Last active December 18, 2015 14:38
A div with an id of 'slideshow' contains five images, the first of which is shown and the others are hidden using a display style of none. Using Javascript, create a simple slideshow that cycles through the images, displaying each image for three seconds at a time, looping back to the first image when the end is reached. You cannot use jQuery or…
<div id="slideshow">
<img id="container" src="http://placekitten.com/400" alt="kitten" />
<img id="container" src="http://placekitten.com/250" style="display:none;" alt="kitten" />
<img id="container" src="http://placekitten.com/300" style="display:none;" alt="kitten" />
<img id="container" src="http://placekitten.com/200" style="display:none;" alt="kitten" />
<img id="container" src="http://placekitten.com/500" style="display:none;" alt="kitten" />
</div>
<script src="solution.js"></script>

This is my default career advice for people starting out in geo/GIS, especially remote sensing, adapted from a response to a letter in 2013.

I'm currently about to start a Geography degree at the University of [Redacted] at [Redacted] with a focus in GIS, and I've been finding that I have an interest in working with imagery. Obviously I should take Remote Sensing and other similar classes, but I'm the type of person who likes to self learn as well. So my question is this: What recommendations would you give to a student who is interested in working with imagery? Are there any self study paths that you could recommend?

I learned on my own and on the job, and there are a lot of important topics in GIS that I don’t know anything about, so I can’t give comprehensive advice. I haven’t arrived anywhere; I’m just ten minutes ahead in the convoy we’re both in. Take these recommendations critically.

Find interesting people. You’ll learn a lot more from a great professor (or mentor, or friend, or conference) o