Skip to content

Instantly share code, notes, and snippets.

@patchdynamics
Last active August 27, 2015 21:01
Show Gist options
  • Save patchdynamics/ea714bba129b0b768dc8 to your computer and use it in GitHub Desktop.
Save patchdynamics/ea714bba129b0b768dc8 to your computer and use it in GitHub Desktop.
Processing NCDC PDSI data for CT River Macrosystem
# VIM regex commands
# Get ride of anything not from 2010 - 2015
g!/\(.*\)\(201[0-5]\) /d
# Get ride of all areas not relevant to our study area
g!/^0601\|^0602\|^1901\|^1902\|^2701\|^2702\|^4301\|^4302\|^4303/d
# Split region code from year, get ride of variable code
%s/\(.*\)05\(201[0-5]\) /\1 \2/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment