liveBook · Manning

Sequence

As explained in Build Python Web Apps with Streamlit

A time series is an ordered sequence of observations associated with time points, such as dates and corresponding values.

A time series pairs dates or times with corresponding values, ordered to show how a metric changes. It can help reveal trends, seasonality, and outliers. section 6.5.1

+------------+-------+
|   Date     | Sales |
+------------+-------+
| 2024-01-01 |  120  |
| 2024-01-02 |  135  |
| 2024-01-03 |  142  |
| 2024-01-04 |  130  |
| 2024-01-05 |  155  |
+------------+-------+

Each row pairs a date with a sales value, illustrating a simple time series. section 6.5.1

Summarize daily sales

For a dashboard, group filtered records by day and sum sales across products and other dimensions. In the California example, the two product rows for 2024-08-01 become one daily total: 2,800. Plot daily values as a line chart. section 6.5.1

How Build Python Web Apps with Streamlit covers it

How deep it goes
Defines date-value sequences, then works through daily aggregation and chart construction.
Examples
Uses daily sales records, California-filtered product rows, and a dashboard line chart.
What it assumes
Starts with a DataFrame containing day and metric fields, then teaches grouping records by day.
What you can do after
Apply it via pandas groupby and Plotly to turn filtered metric data into a daily chart displayed in Streamlit.
How it connects
Connects time series to pandas DataFrames, data aggregation, Plotly, and Streamlit.

Also explained in

Compare how 22 books explain sequence →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Python Web Apps with Streamlit. The section links point to the parts of the book it draws on.