Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #205 +/- ##
==========================================
- Coverage 92.55% 92.22% -0.33%
==========================================
Files 32 32
Lines 2647 2561 -86
==========================================
- Hits 2450 2362 -88
- Misses 197 199 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Here is a quick example of a max composite ppi of the lowest scan, using local data if available and opera ord data when there is no national data. devtools::load_all("~/getRad")
require(dplyr)
require(sf)
require(raster)
require(bioRad)
get_weather_radars() |> filter(status == 1) -> radars
time <- Sys.Date() |> as.POSIXct()
base_raster <- radars |>
st_buffer(units::set_units(100, 'km')) |>
raster(resolution = .025)
require(purrr)
require(mirai)
mirai::daemons(6)
grds <- purrr::map(
radars$radar,
in_parallel(
\(radar) {
pvol <- try(getRad::get_pvol(radar, time))
if (!inherits(pvol, "try-error")) {
pvol <- pvol |>
dplyr::select(any_of(c("DBZH", "dbzh", "dbz")))
pvol$scans <- pvol$scans[purrr::map_lgl(
pvol$scans,
~ length(.x$params)
)]
scn <- bioRad::get_scan(pvol, 0)
base_raster_cropped <- raster::crop(
base_raster,
raster::extent(sf::st_bbox(sf::st_buffer(
radars$geometry[radars$radar == radar],
units::set_units(300, 'km')
)))
)
raster::raster(
bioRad::project_as_ppi(scn, raster = base_raster_cropped)$data
)
} else {
NULL
}
},
time = time,
radars = radars,
base_raster = base_raster
)
)
dbz_map <- calc(
stack(purrr::map(grds[!purrr::map_lgl(grds, is.null)], extend, base_raster)),
max,
na.rm = T
)
#> Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning -Inf
#> Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning -Inf
#> Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning -Inf
#> Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning -Inf
#> Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning -Inf
plot(dbz_map)
plot(
rnaturalearth::ne_countries(scale = 50) |>
st_cast("MULTILINESTRING") |>
st_geometry(),
add = T
)Created on 2026-06-30 with reprex v2.1.1 Standard output and standard error-- nothing to show -- |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Removed unused code related to the 'opera' data source and cleaned up the included countries data.
|
It seems the Essen radar is down causing the tests to fail (unrelated to pull request). The coverage is not complete as some tests might not be hit but are there so some sanity checking in the merging process. Data from the ORD is far from perfect, for Spain the range start is for example strange and conflicting in the meta data. |


Uh oh!
There was an error while loading. Please reload this page.