Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show highest weight companies, not lowest in company bars #84

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/prep_key_bars_company.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ prep_key_bars_company <-
mutate(asset_class = "Listed Equity") %>%
mutate_at("id", as.character) %>% # convert the col type to character to prevent errors in case empty df is binded by rows
group_by(.data$ald_sector, .data$technology) %>% # select at most 15 companies with the highest weigths per sector+technology
arrange(.data$port_weight, .by_group = TRUE) %>%
arrange(dplyr::desc(.data$port_weight), .by_group = TRUE) %>%
slice(1:15) %>%
filter(!is.null(.data$port_weight)) %>%
filter(!is.null(.data$plan_tech_share))
Expand Down Expand Up @@ -62,7 +62,7 @@ prep_key_bars_company <-
slice(1:15) %>%
group_by(.data$ald_sector) %>%
arrange(factor(.data$technology, levels = .env$all_tech_levels)) %>%
arrange(.data$port_weight, .by_group = TRUE) %>%
arrange(dplyr::desc(.data$port_weight), .by_group = TRUE) %>%
filter(!is.null(.data$port_weight)) %>%
filter(!is.null(.data$plan_tech_share))

Expand Down
Loading