openpharma / brms.mmrm

R package to run Bayesian MMRMs using {brms}
https://openpharma.github.io/brms.mmrm/
Other
18 stars 2 forks source link

Adding a hex sticker #89

Closed chstock closed 7 months ago

chstock commented 7 months ago

I am proposing a hex sticker:

The sticker contains a subplot that was created based on a simulated data using {ggplot2} and {ggdist}, particularly ggdist::stat_halfeye(). I thought this plot may well convey the key features of the Bayesian MMRM (experimental, comparative analysis, continuous endpoints, discrete time variable and probabilistic estimates). The color scheme was taken from Huemint.

The initial figure was further processed by hexSticker::sticker(), from which I didn't use one of the standard svg or png output files but saved a pdf. The pdf was then minimally modified further in Adobe Illustrator. The final files (hex_sticker1.svg/.png/.pdf) were exported from Adobe Illustrator. This workflow was convenient to get quite clean image files.

All files (allowing reproduction or modification) are in a new folder inst/hex_sticker which I added to .Rbuildignore.

The sticker was added to the README file (using usethis::use_logo()) and README was rerendered.

Just let me know what you think and whether you would have certain preferences for a hex sticker (subplot, colors, font, ...). I can then try to accomodate this accordingly.

wlandau commented 7 months ago

Thanks for working on this, @chstock! I really like the look of the image, and I like that you used code to generate it (as opposed to existing images that may come with copyright restrictions). Would be great to discuss in our meeting next Wednesday. Just a few comments to start:

chstock commented 7 months ago

Many thanks for your review, @wlandau! Yes, let's discuss in more detail in the team meeting next Wednesday.

A few quick responses:

The image file (logo.svg) indeed is in man/figures/, see here. I am happy to put the script there (or elsewhere) too. I suspected it may complicate documentation or package building if I put it there, but I haven't tried.

chstock commented 7 months ago
  • Could we remove the intermediate images, rendered Quarto HTML, and Adobe Illustrator files? In the latter case, the file format might be copyright-restricted. I usually prefer to just have the main logo.svg, PNG files of various sizes, and only the most necessary information about the images was generated.

Yes, happy to remove the intermediate images and Ai files. To be discussed maybe that the R script doesn't generate the final image, there are some final touches wit Ai that I believe would be difficult with R alone. This information and the possibility to fully reproduce the image and make quick modifications would be lost.

chstock commented 7 months ago
  • I like that you used a color scheme tool to pick the colors, but I wonder if orange or dark yellow would look friendlier than red.

Sure, let's discuss... We can also pick another color scheme.

wlandau commented 7 months ago

For what it's worth, the app at https://connect.thinkr.fr/hexmake/ helps turn an image into a hex logo. Maybe this could replace Ai?

chstock commented 7 months ago

I updated the hex sticker:

Happy to further modify the colors and/or font, or implement other requests.

The current version looks like this:

wlandau commented 7 months ago

Thank you for the changes, @chstock. I really like the improvements. A few follow-up requests:

chstock commented 7 months ago

Thanks, @wlandau. Yes, this all makes sense to me too...

  • Could we remove the brms_mmrm_hex.html file and the generated images from the inst/hex_sticker/? Installed package size is always at a premium, and I think we only need the source Rmd file there.

Done in https://github.com/openpharma/brms.mmrm/pull/89/commits/582825a5c598d98c6d6b45c1f787541f617a7119.

  • For packages like ours which have pkgdown sites, favicons are typically generated by pkgdown::build_favicons() and stored in pkgdown/favicon. Could we transition the favicons there?

Done in https://github.com/openpharma/brms.mmrm/pull/89/commits/f278e88ccd026ee6f4d06c427b295ad05dea3e06.

Done in https://github.com/openpharma/brms.mmrm/pull/89/commits/1f66d9d05b6938997f88d8a30684109a6b9f955c.

This is the updates image:

Again, happy to make modfications (w.r.t. color, font, etc.)