<jupyter_start><jupyter_text>Test `time_series_plots` ModuleRender figure object produced by the `nowcast.figures.research.time_series_plots` module.Set-up and function call replicates as nearly as possible what is done in the `nowcast.workers.make_plots` workerto help ensure that the module will work in the nowcast production context. Notebooks like this should be developed in a[Nowcast Figures Development Environment](https://salishsea-nowcast.readthedocs.io/en/latest/figures/fig_dev_env.html)so that all of the necessary dependency packages are installed.The development has to be done on a workstation that has the Salish Sea Nowcast system `/results/` parition mounted.<jupyter_code># reload lets us pull in changes from modules that we edit
from importlib import reload
# imports from the top of the make_plots worker
from pathlib import Path
from types import SimpleNamespace

import netCDF4 as nc
import xarray as xr
import arrow

from salishsea_tools import places

import nowcast.figures.website_theme

from nowcast.figures.research import time_series_plots
# some extra imports that we need to simulate how the nowcast system works
import io

import yaml
# render figure objects in the notebook
%matplotlib inline<jupyter_output><empty_output><jupyter_text>Simulate Dataset Loading in `_prep_nowcast_green_research_fig_functions()`<jupyter_code>place = 'S3'

left_variable = 'nitrate'
right_variable = 'diatoms'

xr_dataset = xr.open_dataset('https://salishsea.eos.ubc.ca/erddap/griddap/ubcSSg3DBiologyFields1hV18-06')<jupyter_output><empty_output><jupyter_text>Render the FigureThe `%%timeit` cell magic lets us keep an eye on how log the figure takes to process.Setting `-n1 -r1` prevents it from processing the figure more than onceas it might try to do to generate better statistics.The `reload()` calls reload imported modules so that any edits you have made will take effect here.The `make_figure()` call should be the same as goes in the `make_plots` worker module.<jupyter_code>%%timeit -n1 -r1

reload(nowcast.figures.website_theme)
reload(time_series_plots)

fig = time_series_plots.make_figure(
    xr_dataset, left_variable, right_variable, place
)<jupyter_output>1min 12s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)
{'fraction_non_alphanumeric': 0.06335844040762073, 'fraction_numerical': 0.007975188303057155, 'mean_word_length': 5.92638036809816, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '552922', 'license': 'Apache-2.0', 'n_tokens_mistral': 701, 'n_tokens_neox': 658, 'n_words': 256, 'path': 'notebooks/figures/research/TestTimeSeriesPlots.ipynb', 'repo_name': 'SalishSeaCast/SalishSeaNowcast', 'size': '2257'}