Learning to create a reusable chart function for a scatter plot, following Mike Bostock's "Towards Reusable Charts." Also includes a random data generator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apt-get installs | |
sudo apt-get install synaptic | |
sudo apt-get install mercurial | |
sudo apt-get install libssl-dev | |
sudo apt-get install dconf-editor | |
sudo apt-get install pdftk | |
sudo apt-get install ubuntu-restricted-extras | |
sudo apt-get install gm-notify | |
sudo apt-get install unity-tweak-tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd /home/lmullen/acad/research/wiki && /home/lmullen/.cabal/bin/gitit -f my.conf > /dev/null 2>&1 & | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tifs_to_project = FileList["*.tif"].exclude(/epsg3857/).ext(".epsg3857.tif") | |
desc "Reproject all geotiffs into EPSG:3857" | |
multitask :default => tifs_to_project | |
rule( /\.epsg3857\.tif$/ => [ | |
proc {|task_name| task_name.sub(/\.epsg3857\.tif$/, '.tif') } | |
]) do |t| | |
system "gdalwarp -t_srs EPSG:3857 -s_srs EPSG:4326 #{t.source} #{t.name}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Download the WPA Slave Narratives using wget" | |
task :wget_wpa do | |
system %{wget --wait 1 --limit-rate=200k -A .jpg,.png,.gif,.txt,.tif,.pdf --no-parent --background --mirror http://memory.loc.gov/mss/mesn/} | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tifs_to_project = FileList["*.tif"].exclude(/epsg3857/).ext(".epsg3857.tif") | |
desc "Reproject all geotiffs into EPSG:3857" | |
multitask :default => tifs_to_project | |
rule( /\.epsg3857\.tif$/ => [ | |
proc {|task_name| task_name.sub(/\.epsg3857\.tif$/, '.tif') } | |
]) do |t| | |
system "gdalwarp -t_srs EPSG:3857 -s_srs EPSG:4326 #{t.source} #{t.name}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Convert pandoc buffer to HTML and copy to system clipboard | |
autocmd FileType pandoc nnoremap <buffer> <C-S-x> :write \| let @+ = system("pandoc -t html " . shellescape(expand("%:p")))<CR> |
A quicksort algorithm to demonstrate recursion. Adapted from Norman Matloff, The Art of R Programming (San Francisco: No Starch Press, 2011), 176.
An attribution function for R. Borrowed from Kieran Healy's code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.1.1/css/normalize.min.css"> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.1.1/css/foundation.min.css"> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style> | |
p { | |
font-size: 18px; |
OlderNewer