Shortening column names of meteorological parameters to improve the readability of downloaded dataset from the danepubliczne.imgw.pl collection and removing duplicated column names

meteo_shortening_imgw(data, col_names = "short", remove_duplicates = TRUE)

Arguments

data

downloaded dataset with original column names

col_names

three types of column names possible: "short" - default, values with shorten names, "full" - full English description, "polish" - original names in the dataset

remove_duplicates

whether to remove duplicated column names (default TRUE - i.e., columns with duplicated names are deleted)

Value

data.frame with modified names of meteorological parameters

Examples

# \donttest{
  monthly = meteo_imgw("monthly", rank = "climate", 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') 
#> /tmp/RtmpWCv8r5/file15e8436d56f6
#> /tmp/RtmpWCv8r5/file15e859841909
#> /tmp/RtmpWCv8r5/file15e8330f05a6
#> /tmp/RtmpWCv8r5/file15e850866d9b
  
  abbr = meteo_shortening_imgw(data = monthly,
      col_names = "full", 
      remove_duplicates = TRUE)
  head(abbr)
#>          rank        id  station   yy mm tmax_abs tmax_mean tmin_abs tmin_mean
#> 1 KLIMATYCZNA 249180010 PSZCZYNA 1969  1      9.5      -1.3    -20.0      -9.3
#> 2 KLIMATYCZNA 249180010 PSZCZYNA 1969  2      7.4       0.4    -16.6      -4.7
#> 3 KLIMATYCZNA 249180010 PSZCZYNA 1969  3     11.4       2.5    -10.6      -3.5
#> 4 KLIMATYCZNA 249180010 PSZCZYNA 1969  4     27.5      13.1     -4.4       2.0
#> 5 KLIMATYCZNA 249180010 PSZCZYNA 1969  5     30.0      21.3      2.0       9.0
#> 6 KLIMATYCZNA 249180010 PSZCZYNA 1969  6     28.9      20.9      6.1      10.5
#>   t2m_mean_mon t5cm_min rr_monthly rr_max_daily first_day_max_rr
#> 1         -5.1    -22.4       34.9         12.0               23
#> 2         -2.3    -17.5       47.2         15.9                8
#> 3         -0.8    -11.3       44.8         10.1               11
#> 4          7.1     -6.2       15.7          4.0                1
#> 5         14.8     -0.1       69.2         30.0               29
#> 6         15.4      4.4      101.2         35.0               21
#>   last_day_max_rr snowcover_max snowcover_days rain_days snow_days rh_mean_mon
#> 1              NA            10             21         4         6           0
#> 2              NA            18             16         4         7           0
#> 3              NA             2              3         3         8           0
#> 4              NA             0              0         6         4           0
#> 5              NA             0              0         9         0           0
#> 6              NA             0              0        16         0           0
#>   ws_mean_mon cloud_mean_mon
#> 1         2.1            5.1
#> 2         2.2            6.6
#> 3         2.7            5.5
#> 4         2.1            3.5
#> 5         2.0            4.1
#> 6         1.8            5.3
# }