Stream: python-questions
Topic: Windrose Plot on JupyterHub
Brendan Myers (Dec 29 2021 at 22:42):
Hey everyone!
I was curious if anyone is familiar with plotting data using a windrose on the Glade JupyterHub? This is my first time trying to plot a windrose and the only function that I have seen used in examples is from the "windrose" library (https://windrose.readthedocs.io/en/latest/index.html), but when I try importing this library in Jupyter it seems to not recognize it. I have tried to download this library on JupyterHub as well although it seems that did not do the trick either, so I figured I'd hop on here and see if anyone has run into this before and knows how to make "windrose" work or if there is a better way to plot a windrose on JupyterHub?
Best,
Brendan
Jared Baker (Jan 03 2022 at 23:50):
This will depend on what kernel you're using on JupyterHub and if the library has been installed. The default slim Python kernel doens't have this library, but the NPL might (I haven't looked). Alternatively, you could create your own environment via conda
or tool of choice.
Brendan Myers (Jan 05 2022 at 18:12):
Thanks for all the tips Jared! That makes sense, I've been using the CMIP6 kernel and just checked the NPL kernel and none of the kernels I've tried seem to have "windrose" installed... Any tips and tricks on creating my own kernel in JupyterHub or any resources that you know of that I can use to figure it out?
Jared Baker (Jan 07 2022 at 03:19):
@Brendan Myers Here are my steps to clone a NPL conda environment and install windrose into it (I'm a bash user):
ml conda
. $(dirname $(which conda))/../etc/profile.d/conda.sh
conda env list
conda env create -n my-npl --clone npl-2201
conda create -n my-npl --clone npl-2201
conda activate my-npl
conda search -c conda-forge windrose
conda install -c conda-forge windrose
python -c 'import windrose'
Brendan Myers (Jan 13 2022 at 22:42):
Wow great! That worked! Sorry for the slow response but thank you so much for the help, I really appreciate it!
Last updated: Jan 30 2022 at 12:01 UTC