Skip to content

clim4health

Post-Processing of Climate Data for Health Applications

v0.1.0 · Jun 30, 2026 · AGPL (>= 3)

Description

Obtain, transform and export climate data including reanalyses, (seasonal) forecasts and hindcasts, and weather stations for their use in epidemiological analyses. It is organised in three sequential blocks, input (download and load data), transform (downscaling, verification, spatiotemporal aggregation and threshold-based indicators) and output (visualising and exporting data). Downscaling methods include those described in Duzenli et al. (2026) <doi:10.1038/s41598-026-45067-2> and verification methods are based on those in Manubens et al. (2018) <doi:10.1016/j.envsoft.2018.01.018>.

Downloads

CRAN

39

Last 30 days

24212th

39

Last 90 days

39

Last year

CRAN Check Status

2 ERROR
9 OK
Show all 11 flavors
Flavor Status
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 ERROR
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 ERROR
r-release-windows-x86_64 OK
Check details (2 non-OK)
ERROR r-oldrel-macos-x86_64

tests

Running ‘testthat.R’ [64s/85s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(clim4health)
  > 
  > test_check("clim4health")
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  'crs' is not provided. Assuming WGS 84 (EPSG:4326) for gridded data.
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  'crs' is not provided. Assuming WGS 84 (EPSG:4326) for gridded data.
  Linking to GEOS 3.14.1, GDAL 3.8.5, PROJ 9.5.1; sf_use_s2() is TRUE
  terra 1.9.34
  
  Attach
...[truncated]...
══════════════════════════════════════════════════════
  • On CRAN (8): 'test-c4h_downscale.R:255:3', 'test-c4h_downscale.R:277:3',
    'test-c4h_downscale.R:300:3', 'test-c4h_downscale.R:311:3',
    'test-c4h_downscale.R:347:3', 'test-c4h_downscale.R:384:3',
    'test-utils-load.R:654:3', 'test-utils-load.R:792:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-c4h_time.R:54:3'): Time examples run without problems ────────
  Expected `{ ... }` not to throw any errors.
  Actually got a <expectation_failure> with message:
    Expected `dim(stat_month$data)[["sdate"]]` to equal 3.
    Differences:
      `actual`: 6.0
    `expected`: 3.0
    
  ── Failure ('test-c4h_time.R:101:3'): Time examples run without problems ───────
  Expected `dim(stat_daily$data)[["time"]]` to equal 1116.
  Differences:
    `actual`: 1147.0
  `expected`: 1116.0
  
  
  [ FAIL 2 | WARN 37 | SKIP 8 | PASS 543 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-release-macos-x86_64

tests

Running ‘testthat.R’ [63s/81s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(clim4health)
  > 
  > test_check("clim4health")
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  'crs' is not provided. Assuming WGS 84 (EPSG:4326) for gridded data.
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  Variables found in 'path' are: 't2m'. Requested variables are: 't2m'.
  'crs' is not provided. Assuming WGS 84 (EPSG:4326) for gridded data.
  Linking to GEOS 3.14.1, GDAL 3.8.5, PROJ 9.5.1; sf_use_s2() is TRUE
  terra 1.9.34
  
  Attach
...[truncated]...
══════════════════════════════════════════════════════
  • On CRAN (8): 'test-c4h_downscale.R:255:3', 'test-c4h_downscale.R:277:3',
    'test-c4h_downscale.R:300:3', 'test-c4h_downscale.R:311:3',
    'test-c4h_downscale.R:347:3', 'test-c4h_downscale.R:384:3',
    'test-utils-load.R:654:3', 'test-utils-load.R:792:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-c4h_time.R:54:3'): Time examples run without problems ────────
  Expected `{ ... }` not to throw any errors.
  Actually got a <expectation_failure> with message:
    Expected `dim(stat_month$data)[["sdate"]]` to equal 3.
    Differences:
      `actual`: 6.0
    `expected`: 3.0
    
  ── Failure ('test-c4h_time.R:101:3'): Time examples run without problems ───────
  Expected `dim(stat_daily$data)[["time"]]` to equal 1116.
  Differences:
    `actual`: 1147.0
  `expected`: 1116.0
  
  
  [ FAIL 2 | WARN 37 | SKIP 8 | PASS 543 ]
  Error:
  ! Test failures.
  Execution halted

Check History

ERROR 5 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jul 1, 2026
ERROR r-oldrel-macos-x86_64

tests

Running ‘testthat.R’ [56s/59s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional 
...[truncated]...
 examples run without problems ───────
  Expected `dim(stat_daily$data)[["time"]]` to equal 1116.
  Differences:
    `actual`: 1147.0
  `expected`: 1116.0
  
  
  [ FAIL 2 | WARN 37 | SKIP 8 | PASS 543 ]
  Error:
  ! Test failures.
  Execution halted

Code

Structure

Lines of code

16,457

Files

117

Compiled share

0%

Has compiled src

No

Language breakdown

R 7,773 (47.2%)Tests 5,295 (32.2%)Docs 1,476 (9%)Vignettes 1,913 (11.6%)

API

Exported functions

14

Internal functions

35

Recent export changes

v0.1.0+14 c4h_collapse, c4h_convert, c4h_convert_units +11 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.68

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

64.3%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

3

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

System requirements

4

C++ standard

License

AGPL (>= 3)

License flags

SPDX valid, OSI approved

History

Versions

1

First release

2026-06-30

Latest release

2026-06-30

Avg cadence

Cold removal rate

Dep drift

0

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies CSTools ecmwfr ggplot2 GHRexplore lubridate s2dv sf stars terra data.table units CSDownscale ncdf4 ggpattern startR +1 more dependencies clim4health

Version History

1 tracked
new 0.1.0 Jun 30, 2026