{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Query and plot ASOS data\n\nThis example shows how to plot timeseries of ASOS data from\nChicago O'Hare airport.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from datetime import datetime\n\nimport matplotlib.pyplot as plt\n\nimport act\n\ntime_window = [datetime(2020, 2, 4, 2, 0), datetime(2020, 2, 10, 10, 0)]\nmy_asoses = act.discovery.get_asos_data(time_window, station='ORD', regions='IL')\n\ndisplay = act.plotting.TimeSeriesDisplay(my_asoses['ORD'], subplot_shape=(2,), figsize=(15, 10))\ndisplay.plot('temp', subplot_index=(0,))\ndisplay.plot_barbs_from_u_v(u_field='u', v_field='v', subplot_index=(1,))\ndisplay.axes[1].set_ylim([0, 2])\nplt.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.14.3" } }, "nbformat": 4, "nbformat_minor": 0 }