Skip to content

❗ This is a read-only mirror of the CRAN R package repository. weatherjoin — Join Gridded Weather Data to Event Tables. Homepage: https://github.com/hauae/weatherjoin Report bugs for this package: https://github.com/hauae/weatherjoin/issues

License

Notifications You must be signed in to change notification settings

cran/weatherjoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weatherjoin

weatherjoin is an R package for attaching gridded weather data to event-based datasets using efficient spatio-temporal planning and local caching.

The package is designed for workflows where weather variables need to be matched to many observations across space and time, while minimising repeated data downloads.

Currently, weather data are retrieved from the NASA POWER project via the nasapower R package.

This package is not affiliated with or endorsed by NASA.

Features

  • Attach daily or hourly gridded weather data to event tables
  • Automatic planning of efficient spatio-temporal API calls
  • Local caching of downloaded weather segments for reuse
  • Exact or rolling joins for hourly data
  • Flexible handling of multiple locations (spatial clustering, grouped sites, or exact points)

Installation

The package can be installed from GitHub:

remotes::install_github("hauae/weatherjoin")

Example

library(weatherjoin)

out <- join_weather(
  x = events,
  params = c("T2M", "PRECTOTCORR"),
  time = "event_time",
  lat_col = "lat",
  lon_col = "lon"
)

Caching

Downloaded weather data are cached locally and reused across calls. By default, the cache is stored in a user-specific directory obtained via tools::R_user_dir(). The cache can be inspected and managed using:

wj_cache_list()
wj_cache_clear()

Author and affiliation

Developed by Przemek Dolowy, Harper Adams University.

License

MIT License.

About

❗ This is a read-only mirror of the CRAN R package repository. weatherjoin — Join Gridded Weather Data to Event Tables. Homepage: https://github.com/hauae/weatherjoin Report bugs for this package: https://github.com/hauae/weatherjoin/issues

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages