Skip to content

Instantly share code, notes, and snippets.

@peterklipfel
Created February 2, 2014 19:27
Show Gist options
  • Save peterklipfel/8773454 to your computer and use it in GitHub Desktop.
Save peterklipfel/8773454 to your computer and use it in GitHub Desktop.
require 'csv'
require 'time'
CSV.open("costa_rica_int_timestamps.csv", "wb") do |csv|
CSV.foreach("/path/to/costa_rica_geo.csv.txt") do |row|
time = row[1]
if time != "Timestamp"
time = Time.parse(row[1]).to_i
end
csv << [row[0], time, row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13]]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment