{ "metadata": { "name": "", "signature": "sha256:e5387372529b3db054de83c3a319e9e7f9b9785b0a00eafe34878df882ace5d9" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "import matplotlib.dates as mdates\n", "import numpy as np" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "!head '../data/paris_weather.dat'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "# Searching for GHCND series nr FR000007150\r\n", "# coordinates: 48.82N, 2.34E, 75.0m; GHCN-D station code: FR000007150 PARIS-14E_PARC_MONTSOURIS France\r\n", "# WMO station 7156\r\n", "# TMAX GHCN-D V2.0 data with QC in [Celsius] \r\n", "# The non-U.S. data cannot be redistributed within or outside of the U.S. for any commercial activities.\r\n", " 1900 1 1 10.10\r\n", " 1900 1 2 12.00\r\n", " 1900 1 3 9.30\r\n", " 1900 1 4 8.30\r\n", " 1900 1 5 6.00\r\n" ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "temperatures = np.loadtxt('../data/paris_weather.dat', \n", " dtype=[('year', 'i8'),\n", " ('month', 'i8'),\n", " ('day', 'i8'),\n", " ('temp', 'f8')])" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "from goodies import as_table" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "as_table(temperatures)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
year | month | day | temp |
---|---|---|---|
1900 | 1 | 1 | 10.1 |
1900 | 1 | 2 | 12.0 |
1900 | 1 | 3 | 9.3 |
1900 | 1 | 4 | 8.3 |
1900 | 1 | 5 | 6.0 |
1900 | 1 | 6 | 3.3 |
1900 | 1 | 7 | 6.1 |
1900 | 1 | 8 | 8.5 |
1900 | 1 | 9 | 9.3 |
1900 | 1 | 10 | 7.4 |