Skip to content

Commit

Permalink
resolve CMD check
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashsinghal committed Aug 9, 2024
1 parent 9a7c189 commit 9dd379b
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 45 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Suggests:
Config/testthat/edition: 3
Imports:
dplyr,
kableExtra,
readr,
rlang,
stats,
Expand Down
83 changes: 42 additions & 41 deletions vignettes/articles/descriptive-analysis-amount_of_companies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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))
```
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/articles/descriptive-analysis-products.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down

0 comments on commit 9dd379b

Please sign in to comment.