Skip to content

Commit

Permalink
Merge pull request #692 from adokter/fix_sort_as.vpts
Browse files Browse the repository at this point in the history
add datetime and height sorting to as.vpts()
  • Loading branch information
adokter authored Jan 10, 2025
2 parents b39c870 + 9062ea9 commit ec53dc1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
18 changes: 10 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# bioRad 0.8.1.9000

* correct units specified in plot label for quantity VIR (#674)
* Correct units specified in plot label for quantity VIR (#674).

* discard profiles with misspecified altitude bins in `as.vpts()` and `read_vpts()` (#684)
* Discard profiles with misspecified altitude bins in `as.vpts()` and `read_vpts()` (#684).

* new argument `zoomin` for function `bioRad::map()` to increase basemap resolution (#689)
* New argument `zoomin` for function `bioRad::map()` to increase basemap resolution (#689).

* correct type of gap field in vpts objects for profiles stored in ODIM HDF5 format (.h5) (#635, #691)
* Correct type of gap field in vpts objects for profiles stored in ODIM HDF5 format (.h5) (#635, #691).

* interpret NA values in field DBZH in integrate_to_ppi() as pixels that were not irradiated (#658)
* Interpret NA values in field DBZH in `integrate_to_ppi()` as pixels that were not irradiated (#658).

* Fixes a bug that prevented a data.frame to be converted to a vpts object with as.vpts() when profiles are not sorted in datetime and height (#692).

# bioRad 0.8.1

## bugfixes

* dbz_all field in VPTS CSV files is now correctly mapped to DBZH field (#661)
* dbz_all field in VPTS CSV files is now correctly mapped to DBZH field (#661).

* non-standard data fields are now retained in vpts objects produced with as.vpts() (#661)
* Non-standard data fields are now retained in vpts objects produced with as.vpts() (#661).

* corrected the type of gap field in vpts objects to logical (#635)
* Corrected the type of gap field in vpts objects to logical (#635).

# bioRad 0.8.0

Expand Down
5 changes: 4 additions & 1 deletion R/as.vpts.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ as.vpts <- function(data) {
data <- data %>%
dplyr::rename(DBZH = "dbz_all")
}

validate_vpts(data)

# sort by datetime and height
data <- dplyr::arrange(data, datetime, height)

height <- datetime <- source_file <- radar <- NULL

# Throw error if nrows per height are not identical
Expand Down

0 comments on commit ec53dc1

Please sign in to comment.