From c5914372eec465e3d675d7dc546a8df7e6dfceab Mon Sep 17 00:00:00 2001 From: Jonathan Dekermanjian Date: Sun, 19 Jan 2025 16:50:19 -0700 Subject: [PATCH] 1. Made changes in accordance to reviewer comments 2. Improved 24-hour ahead forecasts of simplest model 3. Added a section and model with how to add exogenous variables to the model --- .../case_studies/ssm_hurricane_tracking.ipynb | 631 +++++++++++++++--- .../ssm_hurricane_tracking.myst.md | 313 ++++++++- 2 files changed, 811 insertions(+), 133 deletions(-) diff --git a/examples/case_studies/ssm_hurricane_tracking.ipynb b/examples/case_studies/ssm_hurricane_tracking.ipynb index 7a48b017..fed0e7bd 100644 --- a/examples/case_studies/ssm_hurricane_tracking.ipynb +++ b/examples/case_studies/ssm_hurricane_tracking.ipynb @@ -100,24 +100,24 @@ "metadata": {}, "outputs": [], "source": [ + "# Required Extra Dependencies\n", "import plotly.graph_objects as go\n", "import plotly.io as pio\n", - "\n", - "pio.renderers.default = \"notebook\"\n", - "\n", - "# Required Extra Dependencies\n", "import polars as pl\n", "\n", - "from pymc_experimental.statespace.core.statespace import PyMCStateSpace\n", - "from pymc_experimental.statespace.models.utilities import make_default_coords\n", - "from pymc_experimental.statespace.utils.constants import (\n", + "from pymc_extras.statespace.core.statespace import PyMCStateSpace\n", + "from pymc_extras.statespace.models.utilities import make_default_coords\n", + "from pymc_extras.statespace.utils.constants import (\n", " ALL_STATE_AUX_DIM,\n", " ALL_STATE_DIM,\n", " OBS_STATE_AUX_DIM,\n", " OBS_STATE_DIM,\n", " SHOCK_AUX_DIM,\n", " SHOCK_DIM,\n", - ")" + " TIME_DIM,\n", + ")\n", + "\n", + "pio.renderers.default = \"notebook\"" ] }, { @@ -386,7 +386,12 @@ "metadata": {}, "source": [ "## Hurricane Originations\n", - "Let's plot the origination points of the hurricanes in our dataset. These are important because hurricanes curve differently due to the coriolis effect depending on where they are located. For example, hurricanes in the northern hemisphere curve to the right. Whereas, in the southern hemisphere they curve to the left. In addition, the origination point influences the strength of the hurricane and its likelihood of making landfall. For example, Hurricanes that originat in the Gulf of Mexico have little time to gather energy but are surrounded by land making it more likely for landfall. " + "Let's plot the origination points of the hurricanes in our dataset. There are a few different origination definitions when looking at the tropical cyclones within the HURDAT dataset:\n", + "- A tropical depression when the maximum sustained surface wind is $\\le$ 33.89 knots\n", + "- A tropical cyclone when the maximum sustained surface wind is $\\gt$ 33.89 knots\n", + "- A Hurricane when the maximum sustained surface wind is $\\ge$ 64.30 knots\n", + "\n", + "We are going to define the first instance of tracking data per hurricane as our origin. These are important because hurricanes curve differently, due to the coriolis effect, depending on where they are located. For example, hurricanes in the northern hemisphere curve to the right. Whereas, in the southern hemisphere they curve to the left. In addition, the origination point influences the strength of the hurricane and its likelihood of making landfall. For example, Hurricanes that originate in the Gulf of Mexico have little time to gather energy but are surrounded by land making it more likely for landfall. " ] }, { @@ -438,9 +443,9 @@ { "data": { "text/html": [ - "