Skip to content

Commit

Permalink
Collapse rows
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashsinghal committed Aug 23, 2024
1 parent 4a6fd9b commit c4d8357
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions vignettes/articles/descriptive-analysis-amount_of_companies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,17 @@ companies_per_double_benchmark <- function(data, benchmark_first, benchmark_seco
```{r, warning=FALSE, echo=FALSE}
kable(companies_per_double_benchmark(transition_risk_product_example, "country", "tilt_sector"), align = "llc", caption = "# of firms per country and tilt_sector", escape = F) |>
kable_classic(full_width = F, html_font = "Roboto Condensed") |>
column_spec(1:3, width = "3cm")
column_spec(1:3, width = "3cm") |>
collapse_rows(columns = 1, valign = "top")
```

### Number of companies per country and tilt_subsector

```{r, warning=FALSE, echo=FALSE}
kable(companies_per_double_benchmark(transition_risk_product_example, "country", "tilt_subsector"), align = "llc", caption = "# of firms per country and tilt_subsector", escape = F) |>
kable_classic(full_width = F, html_font = "Roboto Condensed") |>
column_spec(1:3, width = "3cm")
column_spec(1:3, width = "3cm") |>
collapse_rows(columns = 1, valign = "top")
```

### Number of companies per main_activity
Expand All @@ -193,23 +195,26 @@ result <- companies_per_double_benchmark(transition_risk_product_example, "main_
filter(tilt_sector %in% c("construction", "industry", "land use"))
kable(result, align = "llc", caption = "# of firms per main_activity and tilt_sector", escape = F) |>
kable_classic(full_width = F, html_font = "Roboto Condensed") |>
column_spec(1:3, width = "3cm")
column_spec(1:3, width = "3cm") |>
collapse_rows(columns = 1, valign = "top")
```

### Number of companies per main_activity and tilt_subsector

```{r, warning=FALSE, echo=FALSE}
kable(companies_per_double_benchmark(transition_risk_product_example, "main_activity", "tilt_subsector"), align = "llc", caption = "# of firms per main_activity and tilt_subsector", escape = F) |>
kable_classic(full_width = F, html_font = "Roboto Condensed") |>
column_spec(1:3, width = "3cm")
column_spec(1:3, width = "3cm") |>
collapse_rows(columns = 1, valign = "top")
```

### Number of companies per main_activity and country

```{r, warning=FALSE, echo=FALSE}
kable(companies_per_double_benchmark(transition_risk_product_example, "main_activity", "country"), align = "llc", caption = "# of firms per main_activity and country", escape = F) |>
kable_classic(full_width = F, html_font = "Roboto Condensed") |>
column_spec(1:3, width = "3cm")
column_spec(1:3, width = "3cm") |>
collapse_rows(columns = 1, valign = "top")
```

### Number of companies per main_activity, country, and tilt_sector
Expand All @@ -230,5 +235,6 @@ companies_per_main_activity_country_tilt_sector <- function(data) {
```{r, warning=FALSE, echo=FALSE}
kable(companies_per_main_activity_country_tilt_sector(transition_risk_product_example), align = "lllc", caption = "# of firms per main_activity, country, and tilt_sector", escape = F) |>
kable_classic(full_width = F, html_font = "Roboto Condensed") |>
column_spec(1:4, width = "3cm")
column_spec(1:4, width = "3cm") |>
collapse_rows(columns = 1:2, valign = "top")
```

0 comments on commit c4d8357

Please sign in to comment.