How I discovered the ultimate new hire hack
Trang Lê
data scientist, BMS
Understand company's systems
Build relationships
Develop skills/contribute
a bitesize
problem
Where can I find the color templates?
The fonts?
What are these .woff2 and .ttf files?
How does Shiny work?
Where do we host the apps?
Will bslib be useful?
Will the user always have to install the BMS fonts manually?
How do I distribute this package?
Leslie Emery
Clara Amorosi
Loan Robinson
Iain Wallace
great starting points for our conversations
- Jira tickets
- Confluence pages
- VPN/proxy
What new R skills have I learned?
bslib rules! 👑
bs_theme_preview()
bs_theme(
primary = "#be2bbb", secondary = "#eee7e",
success = "#1dce9b", info = "#009fba",
warning = "#ffac25", danger = "#df603a"
)
bms_light <- function(
version = 3,
primary = "#be2bbb", secondary = "#eee7e",
success = "#1dce9b", info = "#009fba",
warning = "#ffac25", danger = "#df603a",
font = c("bms", "bms_nw"),
fallback_font = "Arial Narrow", dir = "bmsfonts", ...
) {
...
bslib::bs_theme(
version = version,
primary = primary, secondary = secondary,
success = success, info = info, warning = warning, danger = danger,
base_font = bslib::font_collection(base_font, fallback_font), ...
)
}
bslib rules! 👑
Clunky: install font and load into R manually
.onLoad <- function(){
shiny::addResourcePath(
"bmsfonts",
system.file("fonts", "bmsdash")
)
sysfonts::font_add("BMS Humanity")
}
fluidPage(
theme = bms_light(),
...
)
diamond
diamond +
scale_fill_bms() +
theme_bms()
show_bms_colors()
theme = bms_light() |>
bslib::bs_add_rules(
sass::as_sass("
table.dataTable tbody
tr.active td {
background: #A69F9F
!important;
}"
)
)
DT::datatable format may still have the default blue when selecting a row.
To change this color, we can use bs_add_rules() to add a little more sass.
⚠️ Watch out for
different bootstrap versions!!!!
Understand company's systems
Build relationships
Develop skills/contribute
🛞 reinvent the wheel
💨 speed up routine tasks
🔥 consistency
✨ streamline updates
invite people to contribute to your existing project
#good-first-issue
- and flexible
- and patient
- give bravos, authorships
- packages
- notebooks
- memes
- institutional knowledge