From ab43169a12fccaf2eae6b902e62281ab7b33ce69 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Mar 2021 13:57:54 +0100 Subject: [PATCH 01/10] fix wrong colnames --- R/meteo_imgw_monthly.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/meteo_imgw_monthly.R b/R/meteo_imgw_monthly.R index 68e07ca..45f5e62 100644 --- a/R/meteo_imgw_monthly.R +++ b/R/meteo_imgw_monthly.R @@ -29,7 +29,6 @@ #' coords = TRUE, station = c("POZNAŃ","POZNAŃ-ŁAWICA")) #' } #' - meteo_imgw_monthly <- function(rank = "synop", year, status = FALSE, coords = FALSE, station = NULL, col_names = "short", ...){ #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl @@ -95,7 +94,7 @@ meteo_imgw_monthly <- function(rank = "synop", year, status = FALSE, coords = FA unzip(zipfile = temp, exdir = temp2) file1 <- paste(temp2, dir(temp2), sep = "/")[1] data1 <- read.csv(file1, header = FALSE, stringsAsFactors = FALSE, fileEncoding = "CP1250") - colnames(data1) <- meta[[1]]$parameters + colnames(data1) <- meta[[2]]$parameters if( rank != "precip"){ # w opadowkach jest tylko jeden plik file2 <- paste(temp2, dir(temp2), sep = "/")[2] From 11bba4363750c7400e71fd61579783aaab700995 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Mar 2021 14:23:54 +0100 Subject: [PATCH 02/10] backstep --- R/meteo_imgw_monthly.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/meteo_imgw_monthly.R b/R/meteo_imgw_monthly.R index ce78168..b8243f8 100644 --- a/R/meteo_imgw_monthly.R +++ b/R/meteo_imgw_monthly.R @@ -94,7 +94,7 @@ meteo_imgw_monthly <- function(rank = "synop", year, status = FALSE, coords = FA unzip(zipfile = temp, exdir = temp2) file1 <- paste(temp2, dir(temp2), sep = "/")[1] data1 <- read.csv(file1, header = FALSE, stringsAsFactors = FALSE, fileEncoding = "CP1250") - colnames(data1) <- meta[[2]]$parameters + colnames(data1) <- meta[[1]]$parameters if( rank != "precip"){ # w opadowkach jest tylko jeden plik file2 <- paste(temp2, dir(temp2), sep = "/")[2] From d0f554b56e56e2d0da89d17efee5c8de421d7c0e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Mar 2021 10:37:50 +0100 Subject: [PATCH 03/10] base_url fix --- R/clean_metadata_meteo.R | 5 +++-- R/hydro_imgw_annual.R | 2 +- R/hydro_imgw_daily.R | 2 +- R/hydro_imgw_monthly.R | 2 +- R/hydro_metadata_imgw.R | 2 +- R/meteo_imgw_daily.R | 2 +- R/meteo_imgw_hourly.R | 2 +- R/meteo_imgw_monthly.R | 2 +- R/meteo_metadata_imgw.R | 4 ++-- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/R/clean_metadata_meteo.R b/R/clean_metadata_meteo.R index bb59821..28f9924 100644 --- a/R/clean_metadata_meteo.R +++ b/R/clean_metadata_meteo.R @@ -10,12 +10,13 @@ #' #' @examples #' \donttest{ -#' my_add = paste0("https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/", +#' my_add = paste0("https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/", #' "dane_meteorologiczne/dobowe/synop/s_d_format.txt") #' climate:::clean_metadata_meteo(address = my_add, rank = "synop", interval = "hourly") #' } #' - +rank="climate" +interval="monthly" clean_metadata_meteo <- function(address, rank = "synop", interval = "hourly"){ temp = tempfile() diff --git a/R/hydro_imgw_annual.R b/R/hydro_imgw_annual.R index 0542397..59194e0 100644 --- a/R/hydro_imgw_annual.R +++ b/R/hydro_imgw_annual.R @@ -23,7 +23,7 @@ hydro_imgw_annual = function(year, coords = FALSE, value = "H", station = NULL, # options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl - base_url = "https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" + base_url = "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" interval = "semiannual_and_annual" interval_pl = "polroczne_i_roczne" diff --git a/R/hydro_imgw_daily.R b/R/hydro_imgw_daily.R index 64eed8f..2942f1b 100644 --- a/R/hydro_imgw_daily.R +++ b/R/hydro_imgw_daily.R @@ -21,7 +21,7 @@ hydro_imgw_daily = function(year, coords = FALSE, station = NULL, col_names= "short", ...){ #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl - base_url = "https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" + base_url = "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" interval = "daily" interval_pl = "dobowe" diff --git a/R/hydro_imgw_monthly.R b/R/hydro_imgw_monthly.R index 6e4f6e1..a0279d2 100644 --- a/R/hydro_imgw_monthly.R +++ b/R/hydro_imgw_monthly.R @@ -21,7 +21,7 @@ hydro_imgw_monthly <- function(year, coords = FALSE, station = NULL, col_names= #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl - base_url <- "https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" + base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" interval <- "monthly" interval_pl <- "miesieczne" diff --git a/R/hydro_metadata_imgw.R b/R/hydro_metadata_imgw.R index 9b38753..8d33e56 100644 --- a/R/hydro_metadata_imgw.R +++ b/R/hydro_metadata_imgw.R @@ -15,7 +15,7 @@ hydro_metadata_imgw <- function(interval){ - base_url <- "https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" + base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" if (interval == "daily"){ # dobowe diff --git a/R/meteo_imgw_daily.R b/R/meteo_imgw_daily.R index 5e89d67..86f35a9 100644 --- a/R/meteo_imgw_daily.R +++ b/R/meteo_imgw_daily.R @@ -24,7 +24,7 @@ meteo_imgw_daily <- function(rank = "synop", year, status = FALSE, coords = FALS #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl - base_url <- "https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/" + base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/" interval <- "daily" # to mozemy ustawic na sztywno interval_pl <- "dobowe" diff --git a/R/meteo_imgw_hourly.R b/R/meteo_imgw_hourly.R index 09d8a33..dc00c9d 100644 --- a/R/meteo_imgw_hourly.R +++ b/R/meteo_imgw_hourly.R @@ -26,7 +26,7 @@ meteo_imgw_hourly <- function(rank = "synop", year, status = FALSE, coords = FAL #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl - base_url <- "https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/" + base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/" interval <- "hourly" # to mozemy ustawic na sztywno interval_pl <- "terminowe" # to mozemy ustawic na sztywno diff --git a/R/meteo_imgw_monthly.R b/R/meteo_imgw_monthly.R index b8243f8..aea496e 100644 --- a/R/meteo_imgw_monthly.R +++ b/R/meteo_imgw_monthly.R @@ -33,7 +33,7 @@ meteo_imgw_monthly <- function(rank = "synop", year, status = FALSE, coords = FA #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl - base_url <- "https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/" + base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/" # if (httr::http_error(base_url)) { # b = stop(call. = FALSE, diff --git a/R/meteo_metadata_imgw.R b/R/meteo_metadata_imgw.R index f6dd489..81c0580 100644 --- a/R/meteo_metadata_imgw.R +++ b/R/meteo_metadata_imgw.R @@ -17,7 +17,7 @@ meteo_metadata_imgw <- function(interval, rank){ # interval moze byc: monthly, hourly, hourly b <- NULL - base_url <- "https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/" + base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/" # METADANE daily: if(interval == "daily") { # uwaga! daily maja dla climateow i synopow po 2 pliki z metadanymi!!! @@ -44,7 +44,7 @@ meteo_metadata_imgw <- function(interval, rank){ # interval moze byc: monthly, h } - # TODO: pod addressem: https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_meteorologiczne/monthly/synop/ + # TODO: pod addressem: https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_meteorologiczne/monthly/synop/ # sa 2 ranke metadanych, bo pliki monthly maja 2 ranke danych; w starej wersji paczki tylko jedna wersja jest uwzgledniana # dodatkowo inne ranke danych beda do pobrania w zaleznosci od danych SYNOP, climate, precip: if(interval == "monthly") { From c18277be8589ef3f4488714a81cbf13c547c8bae Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Mar 2021 10:42:53 +0100 Subject: [PATCH 04/10] remove trash --- R/clean_metadata_meteo.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/clean_metadata_meteo.R b/R/clean_metadata_meteo.R index 28f9924..9262c81 100644 --- a/R/clean_metadata_meteo.R +++ b/R/clean_metadata_meteo.R @@ -15,8 +15,7 @@ #' climate:::clean_metadata_meteo(address = my_add, rank = "synop", interval = "hourly") #' } #' -rank="climate" -interval="monthly" + clean_metadata_meteo <- function(address, rank = "synop", interval = "hourly"){ temp = tempfile() From 3e5f507279f25304065054492947d2cdb27c90f5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Mar 2021 11:05:09 +0100 Subject: [PATCH 05/10] add exeption for imgw climate monthly data --- R/clean_metadata_meteo.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/clean_metadata_meteo.R b/R/clean_metadata_meteo.R index 9262c81..34df2e6 100644 --- a/R/clean_metadata_meteo.R +++ b/R/clean_metadata_meteo.R @@ -20,7 +20,7 @@ clean_metadata_meteo <- function(address, rank = "synop", interval = "hourly"){ temp = tempfile() - + test_url(link = address, output = temp) a = readLines(temp, warn = FALSE) @@ -47,11 +47,13 @@ clean_metadata_meteo <- function(address, rank = "synop", interval = "hourly"){ # a <- suppressWarnings(na.omit(read.fwf(address, widths = c(1000), # fileEncoding = "CP1250", stringsAsFactors = FALSE))) + length_char <- max(nchar(a$V1), na.rm = TRUE) if(rank == "precip" && interval == "hourly") length_char <- 40 # wyjatek dla precipow if(rank == "precip" && interval == "daily") length_char <- 40 # wyjatek dla precipow dobowych if(rank == "synop" && interval == "hourly") length_char <- 60 # wyjatek dla synopow terminowych + if(rank == "climate" && interval == "monthly") length_char <- 52 # wyjatek dla synopow terminowych field <- substr(a$V1, length_char - 3, length_char) From 64c87196ddb3f515e68ad923f3654f5bc0a9c22d Mon Sep 17 00:00:00 2001 From: bczernecki Date: Wed, 31 Mar 2021 15:09:53 +0200 Subject: [PATCH 06/10] bug fixes --- R/check_locale.R | 12 ++++++++++++ R/clean_metadata_hydro.R | 8 ++++---- R/hydro_imgw.R | 4 ++-- R/hydro_imgw_annual.R | 4 +++- R/hydro_imgw_daily.R | 4 +++- R/hydro_imgw_monthly.R | 4 +++- R/hydro_metadata_imgw.R | 2 +- R/hydro_shortening_imgw.R | 2 +- R/imgw_hydro_abbrev.R | 2 +- R/imgw_hydro_stations.R | 2 +- R/imgw_meteo_abbrev.R | 2 +- R/imgw_meteo_stations.R | 2 +- R/meteo_imgw.R | 4 ++-- R/meteo_imgw_daily.R | 4 +++- R/meteo_imgw_hourly.R | 4 +++- R/meteo_imgw_monthly.R | 4 +++- R/meteo_shortening_imgw.R | 2 +- R/nearest_stations_imgw.R | 4 ++-- man/clean_metadata_meteo.Rd | 2 +- man/climate-package.Rd | 2 +- man/hydro_imgw.Rd | 4 ++-- man/hydro_imgw_annual.Rd | 2 +- man/hydro_imgw_daily.Rd | 2 +- man/hydro_imgw_monthly.Rd | 2 +- man/hydro_metadata_imgw.Rd | 2 +- man/hydro_shortening_imgw.Rd | 2 +- man/imgw_hydro_abbrev.Rd | 2 +- man/imgw_hydro_stations.Rd | 2 +- man/imgw_meteo_abbrev.Rd | 2 +- man/imgw_meteo_stations.Rd | 2 +- man/meteo_imgw.Rd | 4 ++-- man/meteo_imgw_daily.Rd | 2 +- man/meteo_imgw_hourly.Rd | 2 +- man/meteo_imgw_monthly.Rd | 2 +- man/meteo_shortening_imgw.Rd | 2 +- man/nearest_stations_imgw.Rd | 2 +- man/nearest_stations_nooa.Rd | 2 +- man/nearest_stations_ogimet.Rd | 2 +- 38 files changed, 69 insertions(+), 45 deletions(-) create mode 100644 R/check_locale.R diff --git a/R/check_locale.R b/R/check_locale.R new file mode 100644 index 0000000..6fe1646 --- /dev/null +++ b/R/check_locale.R @@ -0,0 +1,12 @@ +#' Check locale +#' +#' This is an extra check for some systems that make use of "C.UTF=8" that cannot parse properly tags used inside the Polish metservice's repository +#' @noRd + +check_locale = function(){ + if(any(strsplit(Sys.getlocale(), "/")[[1]] == "C.UTF-8")){ + message(" Your system locale contains 'C.UTF-8' which may cause trouble. + Please consider changing it manually while working with climate, e.g.: + Sys.setlocale(category = 'LC_ALL', locale = 'en_US.UTF-8') ") + } +} diff --git a/R/clean_metadata_hydro.R b/R/clean_metadata_hydro.R index 6baf30c..e03825d 100644 --- a/R/clean_metadata_hydro.R +++ b/R/clean_metadata_hydro.R @@ -7,12 +7,12 @@ #' @keywords internal clean_metadata_hydro <- function(address, interval){ #miesieczne - #address="https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/miesieczne/mies_info.txt" + #address="https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/miesieczne/mies_info.txt" #dobowe - #address="https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/dobowe/codz_info.txt" - #"https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/dobowe/zjaw_info.txt" + #address="https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/dobowe/codz_info.txt" + #"https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/dobowe/zjaw_info.txt" #polroczne_i_roczne - #address="https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/polroczne_i_roczne/polr_info.txt" + #address="https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/polroczne_i_roczne/polr_info.txt" #a <- suppressWarnings(na.omit(read.fwf(address, widths = c(1000), # fileEncoding = "CP1250", stringsAsFactors = FALSE))) diff --git a/R/hydro_imgw.R b/R/hydro_imgw.R index f4cdfa0..384d8cc 100644 --- a/R/hydro_imgw.R +++ b/R/hydro_imgw.R @@ -1,12 +1,12 @@ #' Hydrological data from IMGW #' -#' Downloading hourly, daily, and monthly hydrological data from the measurement stations available in the dane.imgw.pl collection +#' Downloading hourly, 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) #' @param coords add coordinates of the stations (logical value TRUE or FALSE) #' @param value type of data (can be: state - "H" (default), flow - "Q", or temperature - "T") -#' @param station vector of hydrological stations dane.imgw.pl; can be given as station name with CAPITAL LETTERS (character) +#' @param station vector of hydrological stations danepubliczne.imgw.pl; can be given as station name with CAPITAL LETTERS (character) #' It accepts either names (characters in CAPITAL LETTERS) or stations' IDs (numeric) #' @param col_names three types of column names possible: "short" - default, values with shorten names, "full" - full English description, "polish" - original names in the dataset #' @param ... other parameters that may be passed to the 'shortening' function that shortens column names diff --git a/R/hydro_imgw_annual.R b/R/hydro_imgw_annual.R index 59194e0..c27be26 100644 --- a/R/hydro_imgw_annual.R +++ b/R/hydro_imgw_annual.R @@ -1,7 +1,7 @@ #' Semi-annual and annual hydrological data #' #' Downloading hydrological data for the semi-annual and annual period -#' available in the dane.imgw.pl collection +#' available in the danepubliczne.imgw.pl collection #' #' @param year vector of years (e.g., 1966:2000) #' @param coords add coordinates of the stations (logical value TRUE or FALSE) @@ -22,6 +22,8 @@ hydro_imgw_annual = function(year, coords = FALSE, value = "H", station = NULL, col_names = "short", ...){ # options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl + + check_locale() base_url = "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" interval = "semiannual_and_annual" diff --git a/R/hydro_imgw_daily.R b/R/hydro_imgw_daily.R index 2942f1b..c79d9ac 100644 --- a/R/hydro_imgw_daily.R +++ b/R/hydro_imgw_daily.R @@ -1,6 +1,6 @@ #' Daily hydrological data #' -#' Downloading daily hydrological data from the dane.imgw.pl collection +#' Downloading daily hydrological data from the danepubliczne.imgw.pl collection #' #' @param year vector of years (e.g., 1966:2000) #' @param coords add coordinates of the stations (logical value TRUE or FALSE) @@ -20,6 +20,8 @@ hydro_imgw_daily = function(year, coords = FALSE, station = NULL, col_names= "short", ...){ #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl + + check_locale() base_url = "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" interval = "daily" diff --git a/R/hydro_imgw_monthly.R b/R/hydro_imgw_monthly.R index a0279d2..6d8720c 100644 --- a/R/hydro_imgw_monthly.R +++ b/R/hydro_imgw_monthly.R @@ -1,6 +1,6 @@ #' Monthly hydrological data #' -#' Downloading monthly hydrological data from the dane.imgw.pl collection +#' Downloading monthly hydrological data from the danepubliczne.imgw.pl collection #' #' @param year vector of years (e.g., 1966:2000) #' @param coords add coordinates of the stations (logical value TRUE or FALSE) @@ -20,6 +20,8 @@ hydro_imgw_monthly <- function(year, coords = FALSE, station = NULL, col_names= "short", ...){ #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl + + check_locale() base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/" interval <- "monthly" diff --git a/R/hydro_metadata_imgw.R b/R/hydro_metadata_imgw.R index 8d33e56..1973614 100644 --- a/R/hydro_metadata_imgw.R +++ b/R/hydro_metadata_imgw.R @@ -1,6 +1,6 @@ #' Hydrological metadata #' -#' Downloading the description (metadata) to hydrological data available in the dane.imgw.pl repository. +#' Downloading the description (metadata) to hydrological data available in the danepubliczne.imgw.pl repository. #' By default, the function returns a list or data frame for a selected subset #` #' @param interval temporal resolution of the data ("daily" , "monthly", or "semiannual_and_annual") diff --git a/R/hydro_shortening_imgw.R b/R/hydro_shortening_imgw.R index 7fd9189..d691e78 100644 --- a/R/hydro_shortening_imgw.R +++ b/R/hydro_shortening_imgw.R @@ -1,6 +1,6 @@ #' Shortening column names for hydrological variables #' -#' Shortening column names of hydrological parameters to improve the readability of downloaded dataset from the dane.imgw.pl collection and removing duplicated column names +#' Shortening column names of hydrological parameters to improve the readability of downloaded dataset from the danepubliczne.imgw.pl collection and removing duplicated column names #' #' @param data downloaded dataset with original column names #' @param col_names three types of column names possible: "short" - default, values with shorten names, "full" - full English description, "polish" - original names in the dataset diff --git a/R/imgw_hydro_abbrev.R b/R/imgw_hydro_abbrev.R index 63857fa..29a08bb 100644 --- a/R/imgw_hydro_abbrev.R +++ b/R/imgw_hydro_abbrev.R @@ -1,5 +1,5 @@ #' @name imgw_hydro_abbrev -#' @title Definitions of hydrological parameters used for shortening column names from the dane.imgw.pl collection +#' @title Definitions of hydrological parameters used for shortening column names from the danepubliczne.imgw.pl collection #' #' @description The object contains 3 columns that are currently used for improving readability of the downloaded dataset: #' fullname, abbr_eng, and fullname_eng diff --git a/R/imgw_hydro_stations.R b/R/imgw_hydro_stations.R index 8ebea34..fe399c4 100644 --- a/R/imgw_hydro_stations.R +++ b/R/imgw_hydro_stations.R @@ -1,5 +1,5 @@ #' @name imgw_hydro_stations -#' @title Location of the hydrological stations from the dane.imgw.pl collection +#' @title Location of the hydrological stations from the danepubliczne.imgw.pl collection #' #' @description The object contains weather stations #' coordinates, ID numbers, and elevations diff --git a/R/imgw_meteo_abbrev.R b/R/imgw_meteo_abbrev.R index 35712c4..5bb38d1 100644 --- a/R/imgw_meteo_abbrev.R +++ b/R/imgw_meteo_abbrev.R @@ -1,5 +1,5 @@ #' @name imgw_meteo_abbrev -#' @title Definitions of meteorological parameters used for shortening column names for the meteorological data from the dane.imgw.pl collection +#' @title Definitions of meteorological parameters used for shortening column names for the meteorological data from the danepubliczne.imgw.pl collection #' #' @description The object contains 3 columns that are currently used for improving readability of the downloaded dataset: #' fullname, abbr_eng, and fullname_eng diff --git a/R/imgw_meteo_stations.R b/R/imgw_meteo_stations.R index 1494b91..5b1718d 100644 --- a/R/imgw_meteo_stations.R +++ b/R/imgw_meteo_stations.R @@ -1,5 +1,5 @@ #' @name imgw_meteo_stations -#' @title Location of the meteorological stations from the dane.imgw.pl collection +#' @title Location of the meteorological stations from the danepubliczne.imgw.pl collection #' #' @description The object contains weather stations #' coordinates, ID numbers, and elevations diff --git a/R/meteo_imgw.R b/R/meteo_imgw.R index 1a553f4..21c80a3 100644 --- a/R/meteo_imgw.R +++ b/R/meteo_imgw.R @@ -1,6 +1,6 @@ #' Meteorological data from IMGW #' -#' Downloading hourly, daily, and monthly meteorological data from the SYNOP / CLIMATE / PRECIP stations available in the dane.imgw.pl collection +#' Downloading hourly, daily, and monthly meteorological data from the SYNOP / CLIMATE / PRECIP stations available in the danepubliczne.imgw.pl collection #' #' @param interval temporal resolution of the data ("hourly", "daily", "monthly") #' @param rank rank of the stations: "synop" (default), "climate" or "precip" @@ -9,7 +9,7 @@ #' @param coords add coordinates of the station (logical value TRUE or FALSE) #' @param col_names three types of column names possible: "short" - default, values with shorten names, "full" - full English description, "polish" - original names in the dataset #' @param ... other parameters that may be passed to the 'shortening' function that shortens column names -#' @param station vector of hydrological stations dane.imgw.pl can be name of station CAPITAL LETTERS(character) +#' @param station vector of hydrological stations danepubliczne.imgw.pl can be name of station CAPITAL LETTERS(character) #' It accepts names (characters in CAPITAL LETTERS) or stations' IDs (numeric) #' @export #' @return A data.frame with columns describing the meteorological parameters (e.g. temperature, wind speed, precipitation) where each row represent a measurement, diff --git a/R/meteo_imgw_daily.R b/R/meteo_imgw_daily.R index 86f35a9..ffb08de 100644 --- a/R/meteo_imgw_daily.R +++ b/R/meteo_imgw_daily.R @@ -1,6 +1,6 @@ #' Daily IMGW meteorological data #' -#' Downloading daily (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the dane.imgw.pl collection +#' Downloading daily (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the danepubliczne.imgw.pl collection #' #' @param rank rank of the stations: "synop" (default), "climate", or "precip" #' @param year vector of years (e.g., 1966:2000) @@ -24,6 +24,8 @@ meteo_imgw_daily <- function(rank = "synop", year, status = FALSE, coords = FALS #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl + check_locale() + base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/" interval <- "daily" # to mozemy ustawic na sztywno diff --git a/R/meteo_imgw_hourly.R b/R/meteo_imgw_hourly.R index dc00c9d..c628115 100644 --- a/R/meteo_imgw_hourly.R +++ b/R/meteo_imgw_hourly.R @@ -1,6 +1,6 @@ #' Hourly IMGW meteorological data #' -#' Downloading hourly (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the dane.imgw.pl collection +#' Downloading hourly (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the danepubliczne.imgw.pl collection #' #' @param rank rank of the stations: "synop" (default), "climate", or "precip" #' @param year vector of years (e.g., 1966:2000) @@ -21,6 +21,8 @@ #' meteo_imgw_hourly <- function(rank = "synop", year, status = FALSE, coords = FALSE, station = NULL, col_names = "short", ...){ + + check_locale() stopifnot(rank == "synop" | rank == "climate") # dla terminowek tylko synopy i klimaty maja dane diff --git a/R/meteo_imgw_monthly.R b/R/meteo_imgw_monthly.R index aea496e..4aa7ecc 100644 --- a/R/meteo_imgw_monthly.R +++ b/R/meteo_imgw_monthly.R @@ -1,6 +1,6 @@ #' Monthly IMGW meteorological data #' -#' Downloading monthly (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the dane.imgw.pl collection +#' Downloading monthly (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the danepubliczne.imgw.pl collection #' #' @param rank rank of the stations: "synop" (default), "climate", or "precip" #' @param year vector of years (e.g., 1966:2000) @@ -31,6 +31,8 @@ #' meteo_imgw_monthly <- function(rank = "synop", year, status = FALSE, coords = FALSE, station = NULL, col_names = "short", ...){ + check_locale() + #options(RCurlOptions = list(ssl.verifypeer = FALSE)) # required on windows for RCurl base_url <- "https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/" diff --git a/R/meteo_shortening_imgw.R b/R/meteo_shortening_imgw.R index dc7199b..9247be8 100644 --- a/R/meteo_shortening_imgw.R +++ b/R/meteo_shortening_imgw.R @@ -1,6 +1,6 @@ #' Shortening column names for meteorological variables #' -#' Shortening column names of meteorological parameters to improve the readability of downloaded dataset from the dane.imgw.pl collection and removing duplicated column names +#' Shortening column names of meteorological parameters to improve the readability of downloaded dataset from the danepubliczne.imgw.pl collection and removing duplicated column names #' #' @param data downloaded dataset with original column names #' @param col_names three types of column names possible: "short" - default, values with shorten names, "full" - full English description, "polish" - original names in the dataset diff --git a/R/nearest_stations_imgw.R b/R/nearest_stations_imgw.R index 2b0b265..8b9f8a8 100644 --- a/R/nearest_stations_imgw.R +++ b/R/nearest_stations_imgw.R @@ -44,7 +44,7 @@ nearest_stations_imgw <- function(type = "meteo", if (max(year)>=as.integer(substr(Sys.Date(),1,4))-1) { message("Data cannot be provided for this repository. Please check the available records at: \n - https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/") + https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/") } if (type == "meteo"){ @@ -57,7 +57,7 @@ nearest_stations_imgw <- function(type = "meteo", if (dim(result)[1]==0) { stop("Propobly there is no data in the downloaded object. Please check available records: - https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/") + https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/") } if (is.null(point)){ # workaround for different column names: diff --git a/man/clean_metadata_meteo.Rd b/man/clean_metadata_meteo.Rd index 662c581..74027b1 100644 --- a/man/clean_metadata_meteo.Rd +++ b/man/clean_metadata_meteo.Rd @@ -18,7 +18,7 @@ Internal function for meteorological metadata cleaning } \examples{ \donttest{ - my_add = paste0("https://dane.imgw.pl/data/dane_pomiarowo_obserwacyjne/", + my_add = paste0("https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/", "dane_meteorologiczne/dobowe/synop/s_d_format.txt") climate:::clean_metadata_meteo(address = my_add, rank = "synop", interval = "hourly") } diff --git a/man/climate-package.Rd b/man/climate-package.Rd index a00e8cf..60f0a8b 100644 --- a/man/climate-package.Rd +++ b/man/climate-package.Rd @@ -10,7 +10,7 @@ Automatize downloading of meteorological and hydrological data from publicly available repositories: OGIMET (), - University of Wyoming - atmospheric vertical profiling data (), + University of Wyoming - atmospheric vertical profiling data (), Polish Institute of Meterology and Water Management - National Research Institute (), and National Oceanic & Atmospheric Administration (NOAA). This package also allows for adding geographical coordinates for each observation. diff --git a/man/hydro_imgw.Rd b/man/hydro_imgw.Rd index 80244ec..14fb905 100644 --- a/man/hydro_imgw.Rd +++ b/man/hydro_imgw.Rd @@ -23,7 +23,7 @@ hydro_imgw( \item{value}{type of data (can be: state - "H" (default), flow - "Q", or temperature - "T")} -\item{station}{vector of hydrological stations dane.imgw.pl; can be given as station name with CAPITAL LETTERS (character) +\item{station}{vector of hydrological stations danepubliczne.imgw.pl; can be given as station name with CAPITAL LETTERS (character) It accepts either names (characters in CAPITAL LETTERS) or stations' IDs (numeric)} \item{col_names}{three types of column names possible: "short" - default, values with shorten names, "full" - full English description, "polish" - original names in the dataset} @@ -35,7 +35,7 @@ A data.frame with columns describing the hydrological parameters (e.g. flow, wat depending on the interval, at a given hour, month or year. If \code{coords = TRUE} additional two columns with geografic coordinates are added. } \description{ -Downloading hourly, daily, and monthly hydrological data from the measurement stations available in the dane.imgw.pl collection +Downloading hourly, daily, and monthly hydrological data from the measurement stations available in the danepubliczne.imgw.pl collection } \examples{ \donttest{ diff --git a/man/hydro_imgw_annual.Rd b/man/hydro_imgw_annual.Rd index 4ac806a..fd233f2 100644 --- a/man/hydro_imgw_annual.Rd +++ b/man/hydro_imgw_annual.Rd @@ -29,7 +29,7 @@ It accepts names (characters in CAPITAL LETTERS) or stations' IDs (numeric)} } \description{ Downloading hydrological data for the semi-annual and annual period -available in the dane.imgw.pl collection +available in the danepubliczne.imgw.pl collection } \examples{ \donttest{ diff --git a/man/hydro_imgw_daily.Rd b/man/hydro_imgw_daily.Rd index 3f90e51..cb6c924 100644 --- a/man/hydro_imgw_daily.Rd +++ b/man/hydro_imgw_daily.Rd @@ -25,7 +25,7 @@ It accepts names (characters in CAPITAL LETTERS) or stations' IDs (numeric)} \item{...}{other parameters that may be passed to the 'shortening' function that shortens column names} } \description{ -Downloading daily hydrological data from the dane.imgw.pl collection +Downloading daily hydrological data from the danepubliczne.imgw.pl collection } \examples{ \donttest{ diff --git a/man/hydro_imgw_monthly.Rd b/man/hydro_imgw_monthly.Rd index 9a9809e..37e3606 100644 --- a/man/hydro_imgw_monthly.Rd +++ b/man/hydro_imgw_monthly.Rd @@ -25,7 +25,7 @@ It accepts names (characters in CAPITAL LETTERS) or stations' IDs (numeric)} \item{...}{other parameters that may be passed to the 'shortening' function that shortens column names} } \description{ -Downloading monthly hydrological data from the dane.imgw.pl collection +Downloading monthly hydrological data from the danepubliczne.imgw.pl collection } \examples{ \donttest{ diff --git a/man/hydro_metadata_imgw.Rd b/man/hydro_metadata_imgw.Rd index fef49b0..5023508 100644 --- a/man/hydro_metadata_imgw.Rd +++ b/man/hydro_metadata_imgw.Rd @@ -10,7 +10,7 @@ hydro_metadata_imgw(interval) \item{interval}{temporal resolution of the data ("daily" , "monthly", or "semiannual_and_annual")} } \description{ -Downloading the description (metadata) to hydrological data available in the dane.imgw.pl repository. +Downloading the description (metadata) to hydrological data available in the danepubliczne.imgw.pl repository. By default, the function returns a list or data frame for a selected subset } \examples{ diff --git a/man/hydro_shortening_imgw.Rd b/man/hydro_shortening_imgw.Rd index c1469b1..e2ef96d 100644 --- a/man/hydro_shortening_imgw.Rd +++ b/man/hydro_shortening_imgw.Rd @@ -14,7 +14,7 @@ hydro_shortening_imgw(data, col_names = "short", remove_duplicates = TRUE) \item{remove_duplicates}{whether to remove duplicated column names (default TRUE - i.e., columns with duplicated names are deleted)} } \description{ -Shortening column names of hydrological parameters to improve the readability of downloaded dataset from the dane.imgw.pl collection and removing duplicated column names +Shortening column names of hydrological parameters to improve the readability of downloaded dataset from the danepubliczne.imgw.pl collection and removing duplicated column names } \examples{ \donttest{ diff --git a/man/imgw_hydro_abbrev.Rd b/man/imgw_hydro_abbrev.Rd index db83ad3..0c3fa42 100644 --- a/man/imgw_hydro_abbrev.Rd +++ b/man/imgw_hydro_abbrev.Rd @@ -3,7 +3,7 @@ \docType{data} \name{imgw_hydro_abbrev} \alias{imgw_hydro_abbrev} -\title{Definitions of hydrological parameters used for shortening column names from the dane.imgw.pl collection} +\title{Definitions of hydrological parameters used for shortening column names from the danepubliczne.imgw.pl collection} \format{ The data contains a data.frame with ca. 20 elements described in three ways: \itemize{ diff --git a/man/imgw_hydro_stations.Rd b/man/imgw_hydro_stations.Rd index 07ffea5..403641b 100644 --- a/man/imgw_hydro_stations.Rd +++ b/man/imgw_hydro_stations.Rd @@ -3,7 +3,7 @@ \docType{data} \name{imgw_hydro_stations} \alias{imgw_hydro_stations} -\title{Location of the hydrological stations from the dane.imgw.pl collection} +\title{Location of the hydrological stations from the danepubliczne.imgw.pl collection} \format{ The data contains a data.frame with 1304 obs. of 3 variables: \itemize{ diff --git a/man/imgw_meteo_abbrev.Rd b/man/imgw_meteo_abbrev.Rd index eb64bfa..79bbdd4 100644 --- a/man/imgw_meteo_abbrev.Rd +++ b/man/imgw_meteo_abbrev.Rd @@ -3,7 +3,7 @@ \docType{data} \name{imgw_meteo_abbrev} \alias{imgw_meteo_abbrev} -\title{Definitions of meteorological parameters used for shortening column names for the meteorological data from the dane.imgw.pl collection} +\title{Definitions of meteorological parameters used for shortening column names for the meteorological data from the danepubliczne.imgw.pl collection} \format{ The data contains a data.frame with ca. 250 elements described in three ways: \itemize{ diff --git a/man/imgw_meteo_stations.Rd b/man/imgw_meteo_stations.Rd index 62cddb8..3026193 100644 --- a/man/imgw_meteo_stations.Rd +++ b/man/imgw_meteo_stations.Rd @@ -3,7 +3,7 @@ \docType{data} \name{imgw_meteo_stations} \alias{imgw_meteo_stations} -\title{Location of the meteorological stations from the dane.imgw.pl collection} +\title{Location of the meteorological stations from the danepubliczne.imgw.pl collection} \format{ The data contains a data.frame with 1998 obs. of 3 variables: \itemize{ diff --git a/man/meteo_imgw.Rd b/man/meteo_imgw.Rd index f7e6f19..15fa0d8 100644 --- a/man/meteo_imgw.Rd +++ b/man/meteo_imgw.Rd @@ -26,7 +26,7 @@ meteo_imgw( \item{coords}{add coordinates of the station (logical value TRUE or FALSE)} -\item{station}{vector of hydrological stations dane.imgw.pl can be name of station CAPITAL LETTERS(character) +\item{station}{vector of hydrological stations danepubliczne.imgw.pl can be name of station CAPITAL LETTERS(character) It accepts names (characters in CAPITAL LETTERS) or stations' IDs (numeric)} \item{col_names}{three types of column names possible: "short" - default, values with shorten names, "full" - full English description, "polish" - original names in the dataset} @@ -38,7 +38,7 @@ A data.frame with columns describing the meteorological parameters (e.g. tempera depending on the interval, at a given hour, month or year. If \code{coords = TRUE} additional two columns with geografic coordinates are added. } \description{ -Downloading hourly, daily, and monthly meteorological data from the SYNOP / CLIMATE / PRECIP stations available in the dane.imgw.pl collection +Downloading hourly, daily, and monthly meteorological data from the SYNOP / CLIMATE / PRECIP stations available in the danepubliczne.imgw.pl collection } \examples{ \donttest{ diff --git a/man/meteo_imgw_daily.Rd b/man/meteo_imgw_daily.Rd index 5f9912e..eedaae0 100644 --- a/man/meteo_imgw_daily.Rd +++ b/man/meteo_imgw_daily.Rd @@ -31,7 +31,7 @@ It accepts names (characters in CAPITAL LETTERS); stations' IDs (numeric) are no \item{...}{other parameters that may be passed to the 'shortening' function that shortens column names} } \description{ -Downloading daily (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the dane.imgw.pl collection +Downloading daily (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the danepubliczne.imgw.pl collection } \examples{ \donttest{ diff --git a/man/meteo_imgw_hourly.Rd b/man/meteo_imgw_hourly.Rd index d932999..a4a2972 100644 --- a/man/meteo_imgw_hourly.Rd +++ b/man/meteo_imgw_hourly.Rd @@ -31,7 +31,7 @@ It accepts names (characters in CAPITAL LETTERS) or stations' IDs (numeric)} \item{...}{other parameters that may be passed to the 'shortening' function that shortens column names} } \description{ -Downloading hourly (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the dane.imgw.pl collection +Downloading hourly (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the danepubliczne.imgw.pl collection } \examples{ \donttest{ diff --git a/man/meteo_imgw_monthly.Rd b/man/meteo_imgw_monthly.Rd index b5896ad..8bddc48 100644 --- a/man/meteo_imgw_monthly.Rd +++ b/man/meteo_imgw_monthly.Rd @@ -31,7 +31,7 @@ It accepts names (characters in CAPITAL LETTERS) or stations' IDs (numeric)} \item{...}{other parameters that may be passed to the 'shortening' function that shortens column names} } \description{ -Downloading monthly (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the dane.imgw.pl collection +Downloading monthly (meteorological) data from the SYNOP / CLIMATE / PRECIP stations available in the danepubliczne.imgw.pl collection } \examples{ \donttest{ diff --git a/man/meteo_shortening_imgw.Rd b/man/meteo_shortening_imgw.Rd index 64e439d..15825bf 100644 --- a/man/meteo_shortening_imgw.Rd +++ b/man/meteo_shortening_imgw.Rd @@ -14,7 +14,7 @@ meteo_shortening_imgw(data, col_names = "short", remove_duplicates = TRUE) \item{remove_duplicates}{whether to remove duplicated column names (default TRUE - i.e., columns with duplicated names are deleted)} } \description{ -Shortening column names of meteorological parameters to improve the readability of downloaded dataset from the dane.imgw.pl collection and removing duplicated column names +Shortening column names of meteorological parameters to improve the readability of downloaded dataset from the danepubliczne.imgw.pl collection and removing duplicated column names } \examples{ \donttest{ diff --git a/man/nearest_stations_imgw.Rd b/man/nearest_stations_imgw.Rd index 0ab1f6f..0024c0d 100644 --- a/man/nearest_stations_imgw.Rd +++ b/man/nearest_stations_imgw.Rd @@ -27,7 +27,7 @@ nearest_stations_imgw( \item{no_of_stations}{how many nearest stations will be returned from the given geographical coordinates. 50 used by default} -\item{...}{extra arguments to be provided to the \code{\link[graphics:plot]{graphics::plot()}} function (only if add_map = TRUE)} +\item{...}{extra arguments to be provided to the \code{\link[graphics:plot.default]{graphics::plot()}} function (only if add_map = TRUE)} } \value{ A data.frame with a list of nearest stations. Each row represents metadata for station which collected measurements in a given year. Particular columns contain stations metadata (e.g. station ID, geographical coordinates, official name, distance from a given coordinates). diff --git a/man/nearest_stations_nooa.Rd b/man/nearest_stations_nooa.Rd index 010ee37..8cc6d0f 100644 --- a/man/nearest_stations_nooa.Rd +++ b/man/nearest_stations_nooa.Rd @@ -25,7 +25,7 @@ number of nearest stations without country classification} \item{no_of_stations}{how many nearest stations will be returned from the given geographical coordinates} -\item{...}{extra arguments to be provided to the \code{\link[graphics:plot]{graphics::plot()}} function (only if add_map = TRUE)} +\item{...}{extra arguments to be provided to the \code{\link[graphics:plot.default]{graphics::plot()}} function (only if add_map = TRUE)} } \value{ A data.frame with number of nearest station according to given point columns describing stations parameters (e.g. ID station, distance from point,geografic coordinates) where each row represent a measurement, diff --git a/man/nearest_stations_ogimet.Rd b/man/nearest_stations_ogimet.Rd index 4e9e66a..03f11e0 100644 --- a/man/nearest_stations_ogimet.Rd +++ b/man/nearest_stations_ogimet.Rd @@ -24,7 +24,7 @@ nearest_stations_ogimet( \item{no_of_stations}{how many nearest stations will be returned from the given geographical coordinates} -\item{...}{extra arguments to be provided to the \code{\link[graphics:plot]{graphics::plot()}} function (only if add_map = TRUE)} +\item{...}{extra arguments to be provided to the \code{\link[graphics:plot.default]{graphics::plot()}} function (only if add_map = TRUE)} } \value{ A data.frame with number of nearest station according to given point columns describing stations parameters (e.g. ID station, distance from point,geografic coordinates) where each row represent a measurement, From a80d44afcbee41120bef9f810a8a255657f04129 Mon Sep 17 00:00:00 2001 From: bczernecki Date: Wed, 31 Mar 2021 15:10:38 +0200 Subject: [PATCH 07/10] 1.0.0 --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 03f7e92..27f3917 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: climate Title: Interface to Download Meteorological (and Hydrological) Datasets -Version: 0.9.9 +Version: 1.0.0 Authors@R: c(person(given = "Bartosz", family = "Czernecki", role = c("aut", "cre"), @@ -20,7 +20,7 @@ Authors@R: c(person(given = "Bartosz", Description: Automatize downloading of meteorological and hydrological data from publicly available repositories: OGIMET (), University of Wyoming - atmospheric vertical profiling data (), - Polish Institute of Meterology and Water Management - National Research Institute (), + Polish Institute of Meterology and Water Management - National Research Institute (), and National Oceanic & Atmospheric Administration (NOAA). This package also allows for adding geographical coordinates for each observation. License: MIT + file LICENSE From 74d9389016ca5284e04006a70e8203e674ffccdb Mon Sep 17 00:00:00 2001 From: Nowosad Date: Wed, 31 Mar 2021 16:40:56 +0200 Subject: [PATCH 08/10] updates docs --- man/climate-package.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/climate-package.Rd b/man/climate-package.Rd index 60f0a8b..a3373cb 100644 --- a/man/climate-package.Rd +++ b/man/climate-package.Rd @@ -11,7 +11,7 @@ Automatize downloading of meteorological and hydrological data from publicly available repositories: OGIMET (), University of Wyoming - atmospheric vertical profiling data (), - Polish Institute of Meterology and Water Management - National Research Institute (), + Polish Institute of Meterology and Water Management - National Research Institute (), and National Oceanic & Atmospheric Administration (NOAA). This package also allows for adding geographical coordinates for each observation. } From 13344e6d91ef062bbf752016f0fd4825304dd873 Mon Sep 17 00:00:00 2001 From: Nowosad Date: Wed, 31 Mar 2021 16:45:42 +0200 Subject: [PATCH 09/10] fixes typo --- R/check_locale.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/check_locale.R b/R/check_locale.R index 6fe1646..8d81277 100644 --- a/R/check_locale.R +++ b/R/check_locale.R @@ -1,6 +1,6 @@ #' Check locale #' -#' This is an extra check for some systems that make use of "C.UTF=8" that cannot parse properly tags used inside the Polish metservice's repository +#' This is an extra check for some systems that make use of "C.UTF-8" that cannot parse properly tags used inside the Polish metservice's repository #' @noRd check_locale = function(){ From 0bdbf56172fa71094d5225e54f3afae0e8369e11 Mon Sep 17 00:00:00 2001 From: Nowosad Date: Wed, 31 Mar 2021 17:53:40 +0200 Subject: [PATCH 10/10] impvoes example --- R/test_url.R | 2 +- man/test_url.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/test_url.R b/R/test_url.R index 9cf6114..54dab8d 100644 --- a/R/test_url.R +++ b/R/test_url.R @@ -17,7 +17,7 @@ #' @examples #' \donttest{ #' link = "https://www1.ncdc.noaa.gov/pub/data/noaa/2019/123300-99999-2019.gz" -#' output = basename(link) +#' output = tempfile() #' test_url(link = link, output = output) #' } #' diff --git a/man/test_url.Rd b/man/test_url.Rd index 25748e7..44c4ed2 100644 --- a/man/test_url.Rd +++ b/man/test_url.Rd @@ -21,7 +21,7 @@ as suggested by kvasilopoulos \examples{ \donttest{ link = "https://www1.ncdc.noaa.gov/pub/data/noaa/2019/123300-99999-2019.gz" - output = basename(link) + output = tempfile() test_url(link = link, output = output) }