Learn R Programming

aelab (version 1.1.0)

process_weather_month: process_weather_month

Description

Import and tidy a monthly weather CSV file downloaded from a Taiwan Central Weather Administration station. Column selection is done via regex so minor header changes are handled gracefully.

Usage

process_weather_month(file_path, month, year = 2024, zone)

Value

A data frame with columns day, pressure_hpa,

temp, humidity_percent, wind_ms, rain_mm,

daylight_hr, radiation, date, and zone.

Arguments

file_path

Path to the monthly CSV file.

month

Month number (1–12) covered by the file.

year

Four-digit year. Default 2024.

zone

Character label for the weather station / region.

Examples

Run this code
if (FALSE) {
df <- process_weather_month("path/to/2024-01.csv", month = 1, year = 2024,
                            zone = "site_A")
}

Run the code above in your browser using DataLab