RMI-PACTA / pacta.portfolio.report

pacta.portfolio.report
https://rmi-pacta.github.io/pacta.portfolio.report/
MIT License
1 stars 0 forks source link

future tech bar chart might show least important companies instead of most important #82

Closed cjyetman closed 2 months ago

cjyetman commented 2 months ago

from user feedback (https://docs.google.com/spreadsheets/d/1tgeV4IsmqVZWExFcDKpjcmdqsG28VgcilPcM-OP5OW8/edit?gid=1322498032#gid=1322498032&range=13:13)

Why are all weights equal to 0%? Could it be that instead of the biggest companies in the portfolio the smallest were taken?

from @Antoine-Lalechere

I think in the company bar chart there is a mistake in the company we show. Companies order should be reversed (Honda be shown as first one of those fifteen companies as it gets the larger weight).

thumbnail_image001

AB#11177

cjyetman commented 2 months ago

possibly this https://github.com/RMI-PACTA/pacta.portfolio.report/blob/9a24a10c80bfb283cc15fe2c8afc744f3f36c67a/R/prep_key_bars_company.R#L61

should be

arrange(dplyr::desc(.data$port_weight), .by_group = TRUE) %>% 

?

Antoine-Lalechere commented 2 months ago

Yes and same one L31, if it's the last version of the code we use