Skip to content

Commit

Permalink
Merge pull request #66 from bczernecki/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
bczernecki authored Sep 17, 2021
2 parents 89746b1 + bd8bc63 commit 00a8416
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: '3.6'}
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Adding possibility to download BUFR vertical sounding dataset from `http://weather.uwyo.edu/upperair/sounding.html`; extra information with supporting example added to the `sounding_wyoming`'s documentation
* `hydro_imgw` supports now exception for current year which has no flow data until it is verified by the IMGW-PIB
* `ogimet_daily` automatically detects column names to be used for extraction in final data.frame

# climate 1.0.1

Expand Down
2 changes: 1 addition & 1 deletion R/hydro_imgw.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Hydrological data from IMGW
#'
#' Downloading hourly, daily, and monthly hydrological data from the measurement stations available in the danepubliczne.imgw.pl collection
#' Downloading daily, and monthly hydrological data from the measurement stations available in the danepubliczne.imgw.pl collection
#'
#' @param interval temporal resolution of the data ("daily" , "monthly", or "semiannual_and_annual")
#' @param year vector of years (e.g., 1966:2000)
Expand Down
2 changes: 1 addition & 1 deletion R/ogimet_daily.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ ogimet_daily = function(date = c(Sys.Date() - 30, Sys.Date()), coords = FALSE, s
test = b[1:2, ]

if (is.null(test) ) {
warning(paste0("Wrong station ID: ", station_nr, " You can check station ID at https://ogimet.com/display_stations.php?lang=en&tipo=AND&isyn=&oaci=&nombre=&estado=&Send=Send"))
warning(paste0("Wrong station ID: ", station_nr, " You can check available stations ID at https://ogimet.com/display_stations.php?lang=en&tipo=AND&isyn=&oaci=&nombre=&estado=&Send=Send"))
return(data_station)
}

Expand Down
10 changes: 6 additions & 4 deletions R/ogimet_hourly.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ ogimet_hourly = function(date = c("2019-06-01","2019-07-31"), coords = FALSE, st
data_station$hour = NULL

# other columns to numeric:
suppressWarnings(data_station[, c("TC", "TdC", "ffkmh", "Gustkmh", "P0hPa", "PseahPa", "PTnd", "Nt", "Nh",
"HKm", "InsoD1", "Viskm", "Snowcm","station_ID")] <-
as.data.frame(sapply(data_station[,c("TC", "TdC", "ffkmh", "Gustkmh", "P0hPa", "PseahPa", "PTnd", "Nt","Nh",
"HKm", "InsoD1", "Viskm", "Snowcm","station_ID")], as.numeric)))
columns = c("TC", "TdC", "ffkmh", "Gustkmh", "P0hPa", "PseahPa", "PTnd", "Nt", "Nh",
"HKm", "InsoD1", "Viskm", "Snowcm", "station_ID")
columns = colnames(data_station)[(colnames(data_station) %in% columns)]

suppressWarnings(data_station[, columns] <-
as.data.frame(sapply(data_station[,columns], as.numeric)))

# TODO:
# changing order of columns and removing blank records:
Expand Down
2 changes: 1 addition & 1 deletion man/hydro_imgw.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 00a8416

Please sign in to comment.