<jupyter_start><jupyter_text>Add a time-series widgetThe time series widget enables you to display animated data (by aggregation) over a specified date or numeric field. Time series widgets provide a status bar of the animation, controls to play or pause, and the ability to filter on a range of values.To see available parameters run `help(time_series_widget)`.In the example below, collisions in Seattle are animated by the date they occured. The number of incidents over time are shown in the time series widget bars.<jupyter_code>from cartoframes.auth import set_default_credentials
from cartoframes.viz import Map, Layer

set_default_credentials('cartoframes')
from cartoframes.viz.widgets import time_series_widget

Map(
    Layer(
        'seattle_collisions',
        'filter: animation($incdate, 20, fade(0.5,0.5))',
        widgets=[
            time_series_widget(
                value='incdate',
                title='Number of Collisions by Date',
                description= 'Play, pause, or select a range for the animation'
            )]
    )
)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06666666666666667, 'fraction_numerical': 0.005479452054794521, 'mean_word_length': 3.6050420168067228, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '552095', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 301, 'n_tokens_neox': 286, 'n_words': 118, 'path': 'examples/widgets/time_series_widget.ipynb', 'repo_name': 'jorisvandenbossche/cartoframes', 'size': '1095'}