diff --git a/DESCRIPTION b/DESCRIPTION index 049d556..9d08139 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,6 +17,7 @@ Suggests: Config/testthat/edition: 3 Imports: dplyr, + kableExtra, readr, rlang, stats, diff --git a/vignettes/articles/descriptive-analysis-amount_of_companies.Rmd b/vignettes/articles/descriptive-analysis-amount_of_companies.Rmd index 52ca40b..53cee18 100644 --- a/vignettes/articles/descriptive-analysis-amount_of_companies.Rmd +++ b/vignettes/articles/descriptive-analysis-amount_of_companies.Rmd @@ -12,11 +12,12 @@ knitr::opts_chunk$set( This article shows how to calculate the descriptive analysis on amount of companies for emission and sector profile. -```{r setup} +```{r setup, warning=FALSE} library(tiltDataAnalysis) library(dplyr) library(knitr) library(tidyselect) +library(kableExtra) options(readr.show_col_types = FALSE) ``` @@ -119,33 +120,33 @@ companies_per_single_benchmark <- function(data, benchmark) { ```{r, warning=FALSE} kable(companies_per_single_benchmark(emission_product_example, "tilt_sector"), align = "lc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 2)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 2)) kable(companies_per_single_benchmark(sector_product_example, "tilt_sector"), align = "lc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 2)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 2)) ``` ### Number of companies per tilt_subsector for emission and sector profile ```{r, warning=FALSE} kable(companies_per_single_benchmark(emission_product_example, "tilt_subsector"), align = "lc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 2)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 2)) kable(companies_per_single_benchmark(sector_product_example, "tilt_subsector"), align = "lc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 2)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 2)) ``` ### Number of companies per country for emission and sector profile ```{r, warning=FALSE} kable(companies_per_single_benchmark(emission_product_example, "country"), align = "lc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 2)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 2)) kable(companies_per_single_benchmark(sector_product_example, "country"), align = "lc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 2)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 2)) ``` ### Number of companies per country and tilt_sector for emission and sector profile @@ -164,66 +165,66 @@ companies_per_double_benchmark <- function(data, benchmark_first, benchmark_seco ```{r, warning=FALSE} kable(companies_per_double_benchmark(emission_product_example, "country", "tilt_sector"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 3)) kable(companies_per_double_benchmark(sector_product_example, "country", "tilt_sector"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 3)) ``` ### Number of companies per country and tilt_subsector for emission and sector profile ```{r, warning=FALSE} kable(companies_per_double_benchmark(emission_product_example, "country", "tilt_subsector"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 3)) kable(companies_per_double_benchmark(sector_product_example, "country", "tilt_subsector"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 3)) ``` ### Number of companies per main_activity for emission and sector profile ```{r, warning=FALSE} kable(companies_per_single_benchmark(emission_product_example, "main_activity"), align = "lc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 2)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 2)) kable(companies_per_single_benchmark(sector_product_example, "main_activity"), align = "lc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 2)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 2)) ``` ### Number of companies per main_activity and tilt_sector for emission and sector profile ```{r, warning=FALSE} kable(companies_per_double_benchmark(emission_product_example, "main_activity", "tilt_sector"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 3)) kable(companies_per_double_benchmark(sector_product_example, "main_activity", "tilt_sector"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 3)) ``` ### Number of companies per main_activity and tilt_subsector for emission and sector profile ```{r, warning=FALSE} kable(companies_per_double_benchmark(emission_product_example, "main_activity", "tilt_subsector"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 3)) kable(companies_per_double_benchmark(sector_product_example, "main_activity", "tilt_subsector"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 3)) ``` ### Number of companies per main_activity and country for emission and sector profile ```{r, warning=FALSE} kable(companies_per_double_benchmark(emission_product_example, "main_activity", "country"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 3)) kable(companies_per_double_benchmark(sector_product_example, "main_activity", "country"), align = "lcc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 3)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 3)) ``` ### Number of companies per main_activity, country, and tilt_sector for emission and sector profile @@ -242,9 +243,9 @@ companies_per_main_activity_country_tilt_sector <- function(data) { ```{r, warning=FALSE} kable(companies_per_main_activity_country_tilt_sector(emission_product_example), align = "lccc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Emission profile" = 4)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Emission profile" = 4)) kable(companies_per_main_activity_country_tilt_sector(sector_product_example), align = "lccc", format.args = list(big.mark = ",")) |> - kableExtra::kable_styling(position = "center", full_width = F) |> - kableExtra::add_header_above(c("Sector profile" = 4)) + kable_styling(position = "center", full_width = F) |> + add_header_above(c("Sector profile" = 4)) ``` diff --git a/vignettes/articles/descriptive-analysis-co2_footprint_per_benchmark.Rmd b/vignettes/articles/descriptive-analysis-co2_footprint_per_benchmark.Rmd index bd09562..cb4059a 100644 --- a/vignettes/articles/descriptive-analysis-co2_footprint_per_benchmark.Rmd +++ b/vignettes/articles/descriptive-analysis-co2_footprint_per_benchmark.Rmd @@ -12,7 +12,7 @@ knitr::opts_chunk$set( This article shows how to calculate the descriptive analysis of co2_footprint per benchmark using product-level output of Emissions profile indicator. -```{r setup} +```{r setup, warning=FALSE} library(tiltDataAnalysis) library(tibble) diff --git a/vignettes/articles/descriptive-analysis-products.Rmd b/vignettes/articles/descriptive-analysis-products.Rmd index ef99a6c..59cc4dd 100644 --- a/vignettes/articles/descriptive-analysis-products.Rmd +++ b/vignettes/articles/descriptive-analysis-products.Rmd @@ -12,7 +12,7 @@ knitr::opts_chunk$set( This article shows how to calculate the descriptive analysis of products for emission and sector profile. -```{r setup} +```{r setup, warning=FALSE} library(dplyr) library(tiltDataAnalysis) library(knitr) diff --git a/vignettes/articles/descriptive-analysis-transition_risk_score_per_scenario_year_tilt_subsector.Rmd b/vignettes/articles/descriptive-analysis-transition_risk_score_per_scenario_year_tilt_subsector.Rmd index a76eebd..7ba17e9 100644 --- a/vignettes/articles/descriptive-analysis-transition_risk_score_per_scenario_year_tilt_subsector.Rmd +++ b/vignettes/articles/descriptive-analysis-transition_risk_score_per_scenario_year_tilt_subsector.Rmd @@ -13,7 +13,7 @@ This article shows how to calculate the descriptive analysis of transition risk scores for all `tilt_subsectors` per scenario-year-tilt_subsector benchmark using product-level output of Transition risk profile indicator. -```{r setup} +```{r setup, warning=FALSE} library(tiltDataAnalysis) options(readr.show_col_types = FALSE) options(width = 5000) diff --git a/vignettes/articles/show-reduction_targets_for_tilt_subsectors_per_scenario_year.Rmd b/vignettes/articles/show-reduction_targets_for_tilt_subsectors_per_scenario_year.Rmd index 35ab859..ce3f3e6 100644 --- a/vignettes/articles/show-reduction_targets_for_tilt_subsectors_per_scenario_year.Rmd +++ b/vignettes/articles/show-reduction_targets_for_tilt_subsectors_per_scenario_year.Rmd @@ -12,7 +12,7 @@ knitr::opts_chunk$set( This article outlines how to show reduction targets for all `tilt_subsectors` per scenario-year benchmark using product-level output of Sector profile indicator. -```{r setup} +```{r setup, warning=FALSE} library(tiltDataAnalysis) options(readr.show_col_types = FALSE) ```