R/hydro_shortening_imgw.R
hydro_shortening_imgw.RdShortening column names of hydrological parameters to improve the readability of downloaded dataset from the danepubliczne.imgw.pl collection and removing duplicated column names
hydro_shortening_imgw(data, remove_duplicates = TRUE)data.frame with short English names of hydrological parameters.
Existing column attributes, including the original IMGW label metadata,
are preserved.
# \donttest{
monthly = data = hydro_imgw("monthly", year = 1969)
#> Your system locale is: 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')
#> https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/miesieczne/
#> https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/miesieczne/MIES_publiczne_format.txt
#> https://danepubliczne.imgw.pl/data/dane_pomiarowo_obserwacyjne/dane_hydrologiczne/miesieczne/1969/mies_1969.zip
if (is.data.frame(monthly)) {
abbr = hydro_shortening_imgw(data = monthly, remove_duplicates = TRUE)
head(abbr)
}
#> id X Y Data station riv_or_lake hyy idhyy idex H
#> 1 149180010 NA NA 1968-11-01 KRZYZANOWICE Odra (1) 1969 1 1 NA
#> 2 149180010 NA NA 1968-11-01 KRZYZANOWICE Odra (1) 1969 1 2 NA
#> 3 149180010 NA NA 1968-11-01 KRZYZANOWICE Odra (1) 1969 1 3 NA
#> 4 149180010 NA NA 1968-12-01 KRZYZANOWICE Odra (1) 1969 2 1 NA
#> 5 149180010 NA NA 1968-12-01 KRZYZANOWICE Odra (1) 1969 2 2 NA
#> 6 149180010 NA NA 1968-12-01 KRZYZANOWICE Odra (1) 1969 2 3 NA
#> Q T mm
#> 1 22.000 NA 11
#> 2 46.026 NA 11
#> 3 91.000 NA 11
#> 4 16.000 NA 12
#> 5 29.674 NA 12
#> 6 56.900 NA 12
# }