Skip to content

Commit

Permalink
Export epa_at_company_level() and `insert_row_with_na_in_risk_categ…
Browse files Browse the repository at this point in the history
…ory()` (#795)

* export epa_at_company_level

* export insert_row_with_na_in_risk_category
  • Loading branch information
kalashsinghal authored Jun 14, 2024
1 parent 4ed9a3d commit 0059ead
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export(emissions_profile_any_compute_profile_ranking)
export(emissions_profile_upstream)
export(enquo)
export(enquos)
export(epa_at_company_level)
export(epa_compute_profile_ranking)
export(example_companies)
export(example_data_factory)
Expand All @@ -30,6 +31,7 @@ export(example_raw_ipr)
export(example_raw_weo)
export(exclude)
export(extdata_path)
export(insert_row_with_na_in_risk_category)
export(is_tilt_profile)
export(istr)
export(istr_at_company_level)
Expand Down
8 changes: 8 additions & 0 deletions R/emissions_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ emissions_profile <- function(companies,
#' @rdname emissions_profile_upstream
emissions_profile_upstream <- emissions_profile


#' Insert row with NA in risk category
#'
#' @param data A dataframe
#'
#' @return A dataframe
#' @export
#' @keywords internal
insert_row_with_na_in_risk_category <- function(data) {
levels <- c(risk_category_levels(), NA)
data |>
Expand Down
7 changes: 7 additions & 0 deletions R/epa_at_company_level.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#' Calculate indicator's profile output at company level
#'
#' @param data A dataframe
#'
#' @return A dataframe
#' @export
#' @keywords internal
epa_at_company_level <- function(data) {
count_of_na <- data |>
select(all_of(cols_at_all_levels())) |>
Expand Down
18 changes: 18 additions & 0 deletions man/epa_at_company_level.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions man/insert_row_with_na_in_risk_category.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0059ead

Please sign in to comment.