Skip to content

Instantly share code, notes, and snippets.

View phobson's full-sized avatar

Paul Hobson phobson

View GitHub Profile
@phobson
phobson / cardio.ipynb
Created September 4, 2012 19:35
cardio
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / boxplot_feature_statis.md
Created September 19, 2012 05:38 — forked from dmcdougall/email.txt
Nabble boxplot email + status of implementation

Proposed features:

What I think we should (in the order I think we should do it)

  • allow users to pass in a custom function that will compute the median and conf. intervals (my idea).
    • ready for a PR/code review
    • pretty much done
    • DONE: fix docstring about conflicting options (usermedians+conf_intervals vs ci_fxn)
  • option for monochrome boxplot
    • ready for a PR/code review
  • started -- interactive tinkering indicates it's in good shape
@phobson
phobson / variable_cols.ipynb
Created September 26, 2012 00:00
reading variable number of columns with pandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / geojson
Created October 5, 2012 18:51
Workflow to convert mysql qry to geojson file
#! /usr/bin/env bash
DBHOST=$1
USER=$2
DATABASE=$3
QRYTXT=$4 #(make sure x,y are called longitude and latitude)
OUTFILE=$5
# get data
mysql -h $DBHOST -u $USER -p -e "USE $DATABASE; $QRYTXT;" > tmpfile.txt
@phobson
phobson / twinx-pandas.txt
Created November 8, 2012 20:02
Twinx/Pandas dev error
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-27f6bdaefe81> in <module>()
31
32 raints.plot(ax=ax3, alpha=0.5, lw=1, color='b')
---> 33 gwets.plot(ax=ax3, kind='line', lw=2)
34 ax3.set_title('Rain and GWE on one axes')
35
c:\Python27\lib\site-packages\pandas\tools\plotting.pyc in plot_frame(frame, x, y, subplots, sharex, sharey, use_index, figsize, grid, legend, rot, ax, style, title, xlim, ylim, logy, xticks, yticks, kind, sort_columns, fontsize, secondary_y, **kwds)
@phobson
phobson / utc_pandas.txt
Created November 16, 2012 18:18
UTC pandas errors
In [1]: import pandas
In [2]: import datetime
In [3]: import matplotlib.dates as mdates
In [4]: start = mdates.num2date(mdates.datestr2num('2012-1-1'))
In [5]: end = mdates.num2date(mdates.datestr2num('2012-6-1'))
@phobson
phobson / metar_example.ipynb
Created November 18, 2012 04:20
Weather data compilation and analysis with python-metar
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / UncrosstabDemo.ipynb
Created December 26, 2012 18:19
How to un-crosstab an excel file using pandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / so_example.ipynb
Created January 12, 2013 18:07
inline pandas styes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / find_e.ipynb
Last active December 12, 2015 06:48
Another way to compute `e`
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.