Skip to content

Instantly share code, notes, and snippets.

View jennifer-shehane's full-sized avatar

Jennifer Shehane jennifer-shehane

View GitHub Profile

Data Munging

Adapted from CodeKata.

Last month, James showed us how to parse CSV. Here's a chance to practice, and to try something more like a real-world programming problem. You'll want to check out the CSV class in Ruby's standard library to help you.

Part One: Weather Data

In weather.csv you’ll find daily weather data for Morristown, NJ for June 2002. Download this file, then write a program to output the day number with the smallest temperature spread. The day number is in a column labeled Dy, the max temperature is MxT and the min temperature is MnT.

@etrepat
etrepat / FIle.sublime-settings.json
Created October 15, 2011 18:44
Sublime Text 2 - My Settings
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overriden in the platform
// specific settings file, for example, "Base File (Linux).sublime-settings".
// Because of this, setting them here will have no effect: you must set them
// in your User File Preferences.
"font_face": "Monaco",
"font_size": 12,