<jupyter_start><jupyter_text>CMDA Services Portal for Jupyter<jupyter_code>from cmda import ServiceViewer
import panel as pn
pn.extension()
app = ServiceViewer()
app.view()<jupyter_output><empty_output><jupyter_text>Accessing the output data directlyThe data generated from the CMDA service all can be accessed directly as an `xarray.Dataset` object using the `.ds` accessor for each individual service.To see the list of services:<jupyter_code>app.service_names<jupyter_output><empty_output><jupyter_text>Then, to directly access the dataset object for that service:<jupyter_code>ds = app.open_url.ds.copy()
ds<jupyter_output><empty_output><jupyter_text>As an example, let's smooth the time series by applying a moving average filter.<jupyter_code>ds_mean = ds.rolling(time=12, center=True).mean()
ds_mean.hvplot.line(x='time', y='variable', by='Dataset', width=1000, height=500)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1010989010989011, 'fraction_numerical': 0.00989010989010989, 'mean_word_length': 8.489583333333334, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '58920', 'license': 'Apache-2.0', 'n_tokens_mistral': 308, 'n_tokens_neox': 300, 'n_words': 79, 'path': 'cmda.ipynb', 'repo_name': 'cmda-jpl/cmda_notebooks', 'size': '910'}