imd_rainfall_geojson: Download and process IMD rainfall data for a GeoJSON region

View source: R/imd_core.R

IMDRainfallGeojsonR Documentation

Download and process IMD rainfall data for a GeoJSON region

Description

Download and process IMD rainfall data for a GeoJSON region

Usage

IMDRainfallGeojson(...)

imd_rainfall_geojson(
  request_id,
  start_year,
  end_year,
  geojson_file,
  resolution = 0.25,
  frequency = "daily",
  save_raw = FALSE,
  output_dir = tempdir(),
  use_cache = TRUE
)

Arguments

...

Arguments that the aliases send to the primary function.

request_id

Unique identifier for the request.

start_year

Start year (1901-2025).

end_year

End year (1901-2025).

geojson_file

Path to the GeoJSON file.

resolution

Spatial resolution: 0.25 or 1.0 degrees (default: 0.25).

frequency

Temporal frequency (default: "daily").

save_raw

If TRUE, keep the raw files (default: FALSE).

output_dir

Directory for the output files (default: tempdir()).

use_cache

If TRUE, use the cached data when it is available (default: TRUE).

Value

A data.frame with columns date, latitude, longitude and rainfall (mm), restricted to the requested region and aggregated to frequency.

Examples


region <- system.file("extdata", "region.geojson", package = "varunayan")
data <- imd_rainfall_geojson(
  request_id = "mh_rain", start_year = 2023, end_year = 2023,
  geojson_file = region, frequency = "monthly"
)


varunayan documentation built on Oct. 30, 2026, 1:07 a.m.