## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, fig.width = 8, fig.height = 4, comment = "#>" ) ## ----setup-------------------------------------------------------------------- library(CDSimX) ## ----------------------------------------------------------------------------- stations <- create_stations( n = 3, seed = 123 ) stations ## ----------------------------------------------------------------------------- time_index <- generate_time_index( start_date = "2019-01-01", end_date = "2024-12-31", frequency = "day" ) head(time_index) ## ----------------------------------------------------------------------------- climate <- simulate_climate( stations = stations, time_index = time_index, seed = 123 ) head(climate) ## ----------------------------------------------------------------------------- plot_station_timeseries( climate, station = "Station_1", var = "Tmax" ) ## ----------------------------------------------------------------------------- forecast_result <- forecasting_ml( climate_data = climate, target = "Rainfall", forecast_horizon = 12, method = "rf" ) forecast_result$model_performance ## ----------------------------------------------------------------------------- head(forecast_result$forecast_data) ## ----------------------------------------------------------------------------- validation <- validate_climate(climate) validation ## ----------------------------------------------------------------------------- export_csv( climate, file = "simulated_climate.csv" ) ## ----------------------------------------------------------------------------- export_netcdf( climate, file = "simulated_climate.nc" )