Create pivot list
Arguments
- pivot_data
privot data as retrieved from function pivot_data()
- arrange_cols
columns used for arranging the data (default: "process")
Examples
zipfile <- system.file("extdata/umberto-nxt_v7.1.0.13.503/Beispiel_Auswertung.zip",
package = "kwb.umberto")
umberto7_csv_dir <- file.path(tempdir(), "Beispiel_Auswertung")
unzip(zipfile, exdir = umberto7_csv_dir)
umberto7_rawdata <- kwb.umberto::import_rawdata(csv_dir = umberto7_csv_dir)
#> Importing csv file 'C:\Users\RUNNER~1\AppData\Local\Temp\RtmpGUBArj/Beispiel_Auswertung/Ref_High_C+N.csv'
#> ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
#> Rows: 19996 Columns: 12
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ";"
#> chr (11): Project, Model, Net, Timestamp, Product, LCI Method, Phase, Proces...
#> dbl (1): Quantity
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> Importing csv file 'C:\Users\RUNNER~1\AppData\Local\Temp\RtmpGUBArj/Beispiel_Auswertung/Ref_High_C+high N.csv'
#> ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
#> Rows: 19996 Columns: 12
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ";"
#> chr (11): Project, Model, Net, Timestamp, Product, LCI Method, Phase, Proces...
#> dbl (1): Quantity
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> Importing csv file 'C:\Users\RUNNER~1\AppData\Local\Temp\RtmpGUBArj/Beispiel_Auswertung/Ref_Low_C+N.csv'
#> ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
#> Rows: 19996 Columns: 12
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ";"
#> chr (11): Project, Model, Net, Timestamp, Product, LCI Method, Phase, Proces...
#> dbl (1): Quantity
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> Importing csv file 'C:\Users\RUNNER~1\AppData\Local\Temp\RtmpGUBArj/Beispiel_Auswertung/Ref_Low_C+high N.csv'
#> ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
#> Rows: 19996 Columns: 12
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ";"
#> chr (11): Project, Model, Net, Timestamp, Product, LCI Method, Phase, Proces...
#> dbl (1): Quantity
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
umberto7_data_grouped <- kwb.umberto::group_data(umberto7_rawdata)
umberto7_data_pivot <- kwb.umberto::pivot_data(umberto7_data_grouped)
umberto7_data_pivot_list <- kwb.umberto::create_pivot_list(umberto7_data_pivot)
#> Warning: `arrange_()` was deprecated in dplyr 0.7.0.
#> ℹ Please use `arrange()` instead.
#> ℹ See vignette('programming') for more help
#> ℹ The deprecated feature was likely used in the kwb.umberto package.
#> Please report the issue at <https://github.com/KWB-R/kwb.umberto/issues>.
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
head(umberto7_data_pivot_list)
#> $lci_method1
#> # A tibble: 14 × 6
#> # Groups: lci_method, process [14]
#> lci_method process `0a_Ref_Low_C+N` `0b_Ref_High_C+N` `0c_Ref_Low_C+high N`
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 ReCiPe Midp… T03: A… 25498. 6656. 17548.
#> 2 ReCiPe Midp… T06: C… 607. 604. 615.
#> 3 ReCiPe Midp… T07: C… 277. 281. 284.
#> 4 ReCiPe Midp… T10: E… NA NA NA
#> 5 ReCiPe Midp… T11: E… 12520. 11694. 13973.
#> 6 ReCiPe Midp… T12: E… 2602. 2556. 2666.
#> 7 ReCiPe Midp… T13: F… 1548. 2016. 2264.
#> 8 ReCiPe Midp… T14: P… 807. 834. 823.
#> 9 ReCiPe Midp… T15: S… 1382. 1423. 1443.
#> 10 ReCiPe Midp… T21: M… 6154. 6308. 6391.
#> 11 ReCiPe Midp… T30: H… -1262. -1207. -1197.
#> 12 ReCiPe Midp… T31: E… -12697. -12457. -12596.
#> 13 ReCiPe Midp… T39: t… 1683. 1822. 1875.
#> 14 ReCiPe Midp… T51: I… 2134. 1778. 2199.
#> # ℹ 1 more variable: `0d_Ref_High_C+high N` <dbl>
#>
#> $lci_method2
#> # A tibble: 14 × 6
#> # Groups: lci_method, process [14]
#> lci_method process `0a_Ref_Low_C+N` `0b_Ref_High_C+N` `0c_Ref_Low_C+high N`
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 ReCiPe Midp… T03: A… NA NA NA
#> 2 ReCiPe Midp… T06: C… NA NA NA
#> 3 ReCiPe Midp… T07: C… NA NA NA
#> 4 ReCiPe Midp… T10: E… NA NA NA
#> 5 ReCiPe Midp… T11: E… 3.24 3.03 3.62
#> 6 ReCiPe Midp… T12: E… 0.673 0.662 0.690
#> 7 ReCiPe Midp… T13: F… 1.27 1.65 1.85
#> 8 ReCiPe Midp… T14: P… 0.558 0.577 0.569
#> 9 ReCiPe Midp… T15: S… 1.07 1.10 1.12
#> 10 ReCiPe Midp… T21: M… 0.207 0.212 0.215
#> 11 ReCiPe Midp… T30: H… -0.526 -0.503 -0.499
#> 12 ReCiPe Midp… T31: E… -3.29 -3.22 -3.26
#> 13 ReCiPe Midp… T39: t… 0.883 0.956 0.984
#> 14 ReCiPe Midp… T51: I… 0.929 0.774 0.958
#> # ℹ 1 more variable: `0d_Ref_High_C+high N` <dbl>
#>
#> $lci_method3
#> # A tibble: 14 × 6
#> # Groups: lci_method, process [14]
#> lci_method process `0a_Ref_Low_C+N` `0b_Ref_High_C+N` `0c_Ref_Low_C+high N`
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 ReCiPe Midp… T03: A… NA NA NA
#> 2 ReCiPe Midp… T06: C… NA NA NA
#> 3 ReCiPe Midp… T07: C… NA NA NA
#> 4 ReCiPe Midp… T10: E… 106. 53.2 32.3
#> 5 ReCiPe Midp… T11: E… 1.21 1.13 1.35
#> 6 ReCiPe Midp… T12: E… 0.251 0.246 0.257
#> 7 ReCiPe Midp… T13: F… 0.221 0.288 0.324
#> 8 ReCiPe Midp… T14: P… 0.0189 0.0196 0.0193
#> 9 ReCiPe Midp… T15: S… 0.0199 0.0205 0.0208
#> 10 ReCiPe Midp… T21: M… 0.0156 0.0160 0.0162
#> 11 ReCiPe Midp… T30: H… -0.00995 -0.00951 -0.00943
#> 12 ReCiPe Midp… T31: E… -1.22 -1.20 -1.21
#> 13 ReCiPe Midp… T39: t… 0.0563 0.0609 0.0627
#> 14 ReCiPe Midp… T51: I… 0.112 0.0936 0.116
#> # ℹ 1 more variable: `0d_Ref_High_C+high N` <dbl>
#>
#> $lci_method4
#> # A tibble: 14 × 6
#> # Groups: lci_method, process [14]
#> lci_method process `0a_Ref_Low_C+N` `0b_Ref_High_C+N` `0c_Ref_Low_C+high N`
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 ReCiPe Midp… T03: A… NA NA NA
#> 2 ReCiPe Midp… T06: C… NA NA NA
#> 3 ReCiPe Midp… T07: C… NA NA NA
#> 4 ReCiPe Midp… T10: E… NA NA NA
#> 5 ReCiPe Midp… T11: E… 853. 797. 952.
#> 6 ReCiPe Midp… T12: E… 177. 174. 182.
#> 7 ReCiPe Midp… T13: F… 355. 463. 520.
#> 8 ReCiPe Midp… T14: P… 52.2 54.0 53.2
#> 9 ReCiPe Midp… T15: S… 292. 300. 305.
#> 10 ReCiPe Midp… T21: M… 38.4 39.4 39.9
#> 11 ReCiPe Midp… T30: H… -18.4 -17.6 -17.4
#> 12 ReCiPe Midp… T31: E… -865. -849. -858.
#> 13 ReCiPe Midp… T39: t… 141. 153. 157.
#> 14 ReCiPe Midp… T51: I… 265. 221. 273.
#> # ℹ 1 more variable: `0d_Ref_High_C+high N` <dbl>
#>
#> $lci_method5
#> # A tibble: 14 × 6
#> # Groups: lci_method, process [14]
#> lci_method process `0a_Ref_Low_C+N` `0b_Ref_High_C+N` `0c_Ref_Low_C+high N`
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 ReCiPe Midp… T03: A… NA NA NA
#> 2 ReCiPe Midp… T06: C… NA NA NA
#> 3 ReCiPe Midp… T07: C… NA NA NA
#> 4 ReCiPe Midp… T10: E… NA NA NA
#> 5 ReCiPe Midp… T11: E… 5.33 4.98 5.95
#> 6 ReCiPe Midp… T12: E… 1.11 1.09 1.14
#> 7 ReCiPe Midp… T13: F… 3.63 4.72 5.31
#> 8 ReCiPe Midp… T14: P… 0.801 0.829 0.817
#> 9 ReCiPe Midp… T15: S… 4.91 5.05 5.13
#> 10 ReCiPe Midp… T21: M… 0.508 0.520 0.527
#> 11 ReCiPe Midp… T30: H… -0.569 -0.544 -0.539
#> 12 ReCiPe Midp… T31: E… -5.41 -5.30 -5.36
#> 13 ReCiPe Midp… T39: t… 1.34 1.45 1.49
#> 14 ReCiPe Midp… T51: I… 2.22 1.85 2.28
#> # ℹ 1 more variable: `0d_Ref_High_C+high N` <dbl>
#>
#> $lci_method6
#> # A tibble: 14 × 6
#> # Groups: lci_method, process [14]
#> lci_method process `0a_Ref_Low_C+N` `0b_Ref_High_C+N` `0c_Ref_Low_C+high N`
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 ReCiPe Midp… T03: A… 3.79 3.78 3.81
#> 2 ReCiPe Midp… T06: C… 0.325 0.324 0.329
#> 3 ReCiPe Midp… T07: C… NA NA NA
#> 4 ReCiPe Midp… T10: E… 1463. 730. 1103.
#> 5 ReCiPe Midp… T11: E… 1.03 0.964 1.15
#> 6 ReCiPe Midp… T12: E… 0.214 0.211 0.220
#> 7 ReCiPe Midp… T13: F… 0.251 0.326 0.367
#> 8 ReCiPe Midp… T14: P… 2.97 3.07 3.03
#> 9 ReCiPe Midp… T15: S… 0.174 0.179 0.182
#> 10 ReCiPe Midp… T21: M… 0.250 0.256 0.260
#> 11 ReCiPe Midp… T30: H… -0.0432 -0.0413 -0.0410
#> 12 ReCiPe Midp… T31: E… -1.05 -1.03 -1.04
#> 13 ReCiPe Midp… T39: t… 0.180 0.195 0.201
#> 14 ReCiPe Midp… T51: I… 0.206 0.171 0.212
#> # ℹ 1 more variable: `0d_Ref_High_C+high N` <dbl>
#>
umberto10_csv_dir <- system.file("extdata/umberto-lca+_v10.1.0.3.146",
package = "kwb.umberto")
umberto10_rawdata <- kwb.umberto::import_rawdata(csv_dir = umberto10_csv_dir)
#> Importing csv file 'D:/a/_temp/Library/kwb.umberto/extdata/umberto-lca+_v10.1.0.3.146/smartech2_model-v0.1.0_input-v0.3.1.csv'
#> ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
#> Rows: 8456 Columns: 15
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ";"
#> chr (14): Project, Model, Net, Timestamp, Product, Product Name, Product Arr...
#> dbl (1): Quantity
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
umberto10_data_grouped <- kwb.umberto::group_data(umberto10_rawdata)
umberto10_data_pivot <- kwb.umberto::pivot_data(umberto10_data_grouped)
umberto10_data_pivot_list <- kwb.umberto::create_pivot_list(umberto10_data_pivot)
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
#> Joining with `by = join_by(lci_method, process)`
head(umberto10_data_pivot_list)
#> $lci_method1
#> # A tibble: 9 × 3
#> # Groups: lci_method, process [9]
#> lci_method process `0_Reference_Agri`
#> <chr> <chr> <dbl>
#> 1 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T03: A… 3780859.
#> 2 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T06: C… 180612.
#> 3 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T07: C… 289429.
#> 4 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T10: E… NA
#> 5 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T14: P… 392609.
#> 6 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T15: S… 110.
#> 7 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T21: f… -217232.
#> 8 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T31: E… -1172633.
#> 9 ReCiPe Midpoint (H) w/o LT - climate change w/o LT… T4: El… 13314949.
#>
#> $lci_method2
#> # A tibble: 9 × 3
#> # Groups: lci_method, process [9]
#> lci_method process `0_Reference_Agri`
#> <chr> <chr> <dbl>
#> 1 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T03: A… NA
#> 2 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T06: C… NA
#> 3 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T07: C… NA
#> 4 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T10: E… NA
#> 5 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T14: P… 281.
#> 6 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T15: S… 0.0843
#> 7 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T21: f… -2760.
#> 8 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T31: E… -308.
#> 9 ReCiPe Midpoint (H) w/o LT - freshwater ecotoxicit… T4: El… 2056.
#>
#> $lci_method3
#> # A tibble: 9 × 3
#> # Groups: lci_method, process [9]
#> lci_method process `0_Reference_Agri`
#> <chr> <chr> <dbl>
#> 1 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T03: A… NA
#> 2 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T06: C… NA
#> 3 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T07: C… NA
#> 4 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T10: E… 3010.
#> 5 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T14: P… 8.99
#> 6 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T15: S… 0.00160
#> 7 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T21: f… 1861.
#> 8 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T31: E… -54.1
#> 9 ReCiPe Midpoint (H) w/o LT - freshwater eutrophica… T4: El… 770.
#>
#> $lci_method4
#> # A tibble: 9 × 3
#> # Groups: lci_method, process [9]
#> lci_method process `0_Reference_Agri`
#> <chr> <chr> <dbl>
#> 1 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T03: A… NA
#> 2 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T06: C… NA
#> 3 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T07: C… NA
#> 4 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T10: E… NA
#> 5 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T14: P… 23785.
#> 6 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T15: S… 23.2
#> 7 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T21: f… -110028.
#> 8 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T31: E… -75226.
#> 9 ReCiPe Midpoint (H) w/o LT - human toxicity w/o LT… T4: El… 571687.
#>
#> $lci_method5
#> # A tibble: 9 × 3
#> # Groups: lci_method, process [9]
#> lci_method process `0_Reference_Agri`
#> <chr> <chr> <dbl>
#> 1 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T03: A… NA
#> 2 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T06: C… NA
#> 3 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T07: C… NA
#> 4 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T10: E… NA
#> 5 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T14: P… 385.
#> 6 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T15: S… 0.391
#> 7 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T21: f… -1822.
#> 8 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T31: E… -549.
#> 9 ReCiPe Midpoint (H) w/o LT - marine ecotoxicity w/… T4: El… 3173.
#>
#> $lci_method6
#> # A tibble: 9 × 3
#> # Groups: lci_method, process [9]
#> lci_method process `0_Reference_Agri`
#> <chr> <chr> <dbl>
#> 1 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T03: A… 592.
#> 2 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T06: C… 96.7
#> 3 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T07: C… NA
#> 4 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T10: E… 261651.
#> 5 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T14: P… 1437.
#> 6 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T15: S… 0.0140
#> 7 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T21: f… 10613.
#> 8 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T31: E… -171.
#> 9 ReCiPe Midpoint (H) w/o LT - marine eutrophication… T4: El… 1393.
#>