Skip to content

Instantly share code, notes, and snippets.

View phobson's full-sized avatar

Paul Hobson phobson

View GitHub Profile
@phobson
phobson / wind_rose.ipynb
Last active March 3, 2024 07:17
Making a wind rose in pandas/matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Starting at the beginning:

Let's just assume you're using an Ubuntu-ish distro of Linux. In some ways that makes this a little more complicated, but on the other hand, it lets me assume you have experience with other package managers. So the big thing here is that conda is it's own little scientific apt-get (python packages, GIS tools, R + R packages, gcc, etc) that goes off and builds sandboxes contained in individual rooms. Then there's pip. Pip is specifically for python packages only and in my opinion, should only be used when the conda package isn't available.

Back to conda: conda is a package manager that depends on python, but is not per se an installation of python. So:

@phobson
phobson / ShiftedColorMap.ipynb
Last active May 26, 2022 03:13
One way to shift (recenter) a colormap in matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / js-d.ipynb
Created December 17, 2018 16:34
json-based dockside
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / flow.py
Last active November 16, 2020 18:09
Arcpy vs Geopandas
import sys
import geopandas
from helpers import width, peak_flow
def flow_column_name(return_period):
return "Q{:d}".format(int(float(return_period) * 10))
@phobson
phobson / Lognormref.ipynb
Last active September 17, 2020 16:35
Lognormal python ref
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / horizon.ipynb
Last active June 21, 2019 22:24
Implementing cubism.js horizon charts in python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.