Time Series • Introduction to Time Series
Time Series / P1.04 Visualize a Basic Time Series

P1.04 Visualize a Basic Time Series

Practical 1 Introduction to Time Series

Plot daily average temperature for 14 days and describe the pattern in words.

Practical / Solution

P1.04 Visualize a Basic Time Series

Problem Statement

Plot daily average temperature for 14 days and describe the pattern in words.

Learning Outcomes

  • Create a time plot.
  • Read direction, variability and unusual days from the graph.

Hint

Use a line plot with dates on the x-axis. A bar chart of unsorted values would hide time order.

Theory

A time plot is the first diagnostic for a series. It shows whether values rise, fall, stay level, or jump.

Dataset / Data Source

Constructed daily mean temperatures (deg C) for 1–14 April: 28, 29, 30, 31, 30, 29, 27, 28, 30, 32, 33, 31, 30, 29.

Analysis / Program

import pandas as pd import matplotlib.pyplot as plt days = pd.date_range("2026-04-01", periods=14, freq="D") temp = [28, 29, 30, 31, 30, 29, 27, 28, 30, 32, 33, 31, 30, 29] ts = pd.Series(temp, index=days, name="mean_temp") ts.plot(marker="o", title="Daily mean temperature") plt.ylabel("deg C") plt.tight_layout() plt.show()

Expected Output

A 14-day line graph with a mid-period dip and a later peak. The vertical scale is temperature in deg C.

Result / Interpretation

The series is not a straight line. Students should mention the cooler day near 7 April and the warmer spell around 10–11 April.

Note

A time plot is not a model. It is the first look that guides later analysis.