Learn R Programming

CDSim (version 0.1.1)

plot_station_timeseries: Plot Station Time Series with Seasonal Detection

Description

Creates a time-series plot for climate variables with automatic hemisphere-based season detection.

Usage

plot_station_timeseries(
  df,
  station,
  var = "Avg.Tn",
  smooth = TRUE,
  theme_dark = FALSE
)

Value

A ggplot object.

Arguments

df

A tidy dataset containing columns: Station, Date, LAT, and variables.

station

Station name.

var

Climate variable to plot.

smooth

Add LOESS smoothing line.

theme_dark

Use dark theme.

Examples

Run this code
stations <- create_stations(n = 3)
sim <- simulate_climate_series(stations)
plot_station_timeseries(sim, station = "Station_1", var = "Avg.Tn")

Run the code above in your browser using DataLab