MyNixOS website logo
Description

Join Gridded Weather Data to Event Tables.

High-level tools to attach gridded weather data from the NASA POWER Project to event-based datasets. The package plans efficient spatio-temporal API calls via the 'nasapower' R package, caches downloaded segments locally, and joins weather variables back to the input table using exact or rolling joins. This package is not affiliated with or endorsed by NASA.

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.

Metadata

Version

0.2.2

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows