Skip to content

Instantly share code, notes, and snippets.

@mrflip
Created August 21, 2012 15:30
Show Gist options
  • Save mrflip/3416606 to your computer and use it in GitHub Desktop.
Save mrflip/3416606 to your computer and use it in GitHub Desktop.
require 'configliere' ; Settings.use :commandline
require 'gorillib'
require 'gorillib/data_munging'
require 'pry'
Settings.define :data_root, default: 's3n://bigdata.chimpy.us', description: "directory root for data to process"
Settings.resolve!
Pathname.register_paths(
data: Settings.data_root,
)
#
# put this in same directory as your scripts; put rake_helper at examples/munging
#
require_relative('../rake_helper')
Pathname.register_paths(
raw_weather: [:data, 'geo/weather_daily'],
raw_wstn_history: [:weather, 'ish_history.txt'], # plz correct
raw_observations: [:weather, '2008'],
#
fixd_weather: [:data, 'fixd/geo/weather_daily'],
wstn_history: [:fixd_weather, 'wstn_history']
)
namespace :weather do
namespace :parse do
desc 'parse the weather station history file'
task(:wstn_history) do
sh "wukong", "--run", Pathname.path_to(:raw_wstn_history), Pathname.path_to(:fixd_wstn_history)
end
end
end
task :default => [
'weather:parse:wstn_history'
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment