Giter Club home page Giter Club logo

blog's Introduction

pharmaverse blog

Purpose

The communications working group (CWG) seeks to promote and showcase how R can be used in the Clinical Reporting pipeline through short and informative blog posts. These posts will be hosted on this pharmaverse blog and promoted on the pharmaverse slack channels as well as on LinkedIn.

As the CWG is a small team, we hope to make the blog development process easy enough that pharmaverse community members will be able to easily write blog posts with guidance from the CWG team.

Spirit of a Blog Post

The CWG believes that the following 4 points will help guide the creation of Blog Posts.

  • Short
  • Personalized
  • Reproducible
  • Readable

Short: Posts should aim to be under a 10 minute read. We encourage longer posts to be broken up into multiple posts.

Personalized: Posts should have a personality! For example, a person wishing to post on a function in a package needs to differentiate the post from the documentation for function, i.e. we don't want to just recycle the documentation. How can you add your voice and experience? A bit of cheeky language is also encouraged.

Reproducible: Posts should work with minimal dependencies with data, packages and outside sources. Every dependency introduced in a post adds some risk to the post longevity. As package dependencies change, posts should be built in a way that they can be updated to stay relevant.

Readable: The CWG sees this site as more of introductory site rather advanced user site. Therefore, the CWG feels that code should be introduced in a way that promotes readability over complexity.

What types of posts are allowed on this site?

Overall, we want to stay focus on the Clinical Reporting Pipeline, which we see as the following topics:

  1. Packages in the Clinical Reporting Pipeline
  2. Functions from packages in the Clinical Reporting Pipeline
  3. Wider experiences of using R in the Clinical Reporting Pipeline
  4. Conference experiences and the Clinical Reporting Pipeline

However, it never hurts to ask if you topic might fit into this medium!.

Minimum Post Requirements

  • A unique image to help showcase the post.
  • Working Code
  • Self-contained data or package data.
  • Documentation of package versions

That is it! After that you can go wild, but we do ask that it is kept short!

How can I make a Blog Post

Step 1: Reach out to us through pharmaverse/slack or make an issue on our GitHub.

Step 2: Branch off main

Step 3: Create a new Blog Post skeleton using the create_blog_post.R script in the R/ folder.

  • Open the create_blogpost.R file.

  • Source the script help_create_blogpost.R from within the create_blogpost.R file.

  • Enter your information into the create_post function. Please note that we do not currently allow users to specify their own categories (or tags), so you must choose (possibly several) from this list: c("Metadata", "SDTM", "ADaM", "TLG", "Shiny", "Community", "Conferences", "Submissions", "Technical").

  • Running that function will create a subfolder with a quarto file (*.qmd) in the posts/ folder. Both should be named based on the supplied post_date and post_name information.

  • Open the newly created folder and start working within the *.qmd file.

Step 4: After you have finished your Blog Post, open the CICD.R file in the R/ folder. Run the script line by line to first check the spelling in your post and then to make sure your code is compatible with our code-style.

Step 5: Push to your branch, create a Pull Request, and review the Spirit of the Blog Post in the Pull Request Template.

Step 6: Poke us to do a review!

Most importantly:

Step 7: Have fun :)

Tips and Tricks

  • You can use the link package to create dynamic links for a function to its package down website in a blog post. For example, instead of doing function_name with markdown syntax for url linking, i.e link, you can just do admiral::derive_vars_dy() and it will create the link in your blog post. See the raw code in this post admiral 1.0.0 to see it in action.

How to Use the blog Docker Image for Local Development

Contributors can benefit from using the blog Docker image when creating their blog posts. This way, contributors don't have to install all dependencies from other blog posts and can solely focus on their own blog post and its dependencies.

Here are the steps to use the blog's Docker image:

  1. Ensure you have Docker Desktop installed.
  2. Start Docker Desktop on your machine.
  3. Perform a Docker pull from the blog's GitHub registry by running this code:
docker pull ghcr.io/pharmaverse/blog:latest
  1. Clone this blog repository and take note of the location of the repo in your local machine.
  2. Update the code below specifying the location of your 'blog' repository and execute the script:
docker run --rm -ti -e PASSWORD=yourpassword -p 8787:8787 -v <location of your blog repo>:/home/rstudio/work ghcr.io/pharmaverse/blog

Here's an example:

docker run --rm -ti -e PASSWORD=yourpassword -p 8787:8787 -v ~/Documents/blog:/home/rstudio/work ghcr.io/pharmaverse/blog

This command will run the blog Docker image and mount your local folder to the image.

  1. Open http://localhost:8787/ and you should see the RStudio welcome page.
  2. The username will be rstudio, and the password is yourpassword.
  3. Once logged in, go to the work folder, and you should see the contents of the blog repository.
  4. Click the quarto-blog.Rproj file to open the project.
  5. You can test by opening the index.qmd and rendering the document.
  6. Quarto should run, and you should be able to see the rendered blog locally.
  7. Develop your blog post and re-render as needed.
  8. Once complete, you can close the RStudio session, shut down the image, and push your update to the blog repo.

Please note that there is no SSH or git capability in the docker image, so you can't push your update to the repo from the image directly. To push the update, you would have to do it from your local RStudio or terminal.

A Dockerfile is also provided in this repo if you want to build the image locally and add more functionalities.

blog's People

Contributors

bms63 avatar donyunardi avatar fanny-gautier avatar gigikenneth avatar ismaelrdz25 avatar jeffreyad avatar kaz462 avatar khatril avatar manciniedoardo avatar michaelrimler avatar mstackhouse avatar nicholaswe avatar nnaikp avatar pawelru avatar poojakumari05 avatar romainfrancois avatar rossfarrugia avatar sadchla-codes avatar stefanthoma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

blog's Issues

Blog Tags (Create a set)

          > @pharmaverse/commswg

We have to discuss the front images and corresponding tags. The function I created here copies default images for specific tags / image parameter. We should also discuss the tags we want to use. In my opinion, writers should use as many of the predefined tags as possible. Should they be able to create their own?

No I don't think people should make their own tags - we should provide a set and create news one if needed.

Originally posted by @bms63 in #40 (comment)

email adress throws off link checker

In quarto, emails are written in the format:
Person
In markdown, it is:
Person

This is an issue for the link checker, because when converting from quarto to markdown I simply change the extension.

Solution:
In R file responsible for changing extension also delete the "."

A value level validation use case, where `admiral` is used to validate a small chunk of the data:

          A value level validation use case, where `admiral` is used to validate a small chunk of the data:
  • validate a parameter by using admiral::derive_param_computed.
  • Derivation text: derive new parameter/records for ADEX.PARAMCD = ADPCYMG (Actual Dose per Cycle) based on existing parameters - Actual Dose per Cycle (ADPCYMG) = Total Amount of Dose (TOTDOSE) / Number of Cycles (NUMCYC);
  • admiral::derive_param_computed can add a parameter computed from the analysis value of other parameters.
    In this example, ADEX.AVAL (where ADEX.PARAPMCD = ADPCYMG)
    = ADEX.AVAL (where ADEX.PARAPMCD = TOTDOSE) / ADEX.AVAL (where ADEX.PARAPMCD = NUMCYC)
# read in data
path_ads <- "xxxx"
adex <- haven::read_sas(paste0(path_ads, "adex.sas7bdat")) %>% 
  select(USUBJID, PARAM, PARAMCD, AVAL)

# subset input data to PARAMCD = "TOTDOSE", "NUMCYC"
adex_TOTDOSE_NUMCYC <- adex %>% filter(PARAMCD %in% c("TOTDOSE", "NUMCYC"))
# admiral::derive_param_computed()
val <- 
  derive_param_computed(
  adex_TOTDOSE_NUMCYC,
  by_vars = exprs(USUBJID),
  parameters = c("TOTDOSE", "NUMCYC"),
  analysis_value = AVAL.TOTDOSE / AVAL.NUMCYC,
  set_values_to = exprs(
    PARAMCD = "ADPCYMG",
    PARAM = "Actual Dose per Cycle (mg)"
  )
) 

# compare with primary
diffdf::diffdf(adex %>% filter(PARAMCD == "ADPCYMG"), 
               val %>% filter(PARAMCD == "ADPCYMG"), 
               keys = c("USUBJID", "PARAMCD"))

Originally posted by @kaz462 in #2 (comment)

Create a Blog Template

  • Advice on how to choose image for post (most likely hex sticker)
  • Functions that have low probability of being changed/deprecated

Highlighting working groups

There are several working groups that stemmed from {admiral}, create a blog that highlights their purpose and scope.

home page link

@pharmaverse/commswg - hi all

I noticed when clicking around the different posts that we don't have a button to get back to the home page.

Can anyone look into this?

admiral story in blog

I was thinking of writing a post about what is admiral, its birth (with screenshots), how was and how is the situation in terms of contributors, its extensions, and what is the modularized framework.
Most of those information came from Ross Farrugia presentation on R/Pharma 2022 and were the base of the slides that were shared with the Council.

pharmaverse story in blog

I was thinking of writing a post about what is pharmaverse, why we should choose it, where we can find its packages, and list some useful links.
Most of those information came from Ross Farrugia presentation on R/Pharma 2022 and were the base of the slides that were shared with the Council.

How our approach differs from the tidyverse

We should write a blogpost comparing the approaches chosen by tidyverse vs admiral.
I have specifically in mind the use of exprs() when selecting multiple variables compared to vars() in tidyverse.

We can think about mentioning why we diverge from the tidyverse standards (need for reliability) and that we may switch to the tidyverse standard in the future.

There may be other decisions where we diverge from tidyverse standards worth mentioning but they really should have an impact on the end user (in my opinion).

Identify List of 5-10 potential blogs posts

  • What is purpose/scope of site (Ben)
  • derive_summary_records (Ben)
  • derive_param_computed
  • convert_blanks_to_na (Sadchla)
  • Bayer validation post (Kangjie)
  • Differences between derive and compute
  • Extension packages and use_ad_template (Ben)
  • Version on website and what they mean? (Sadchla)

Template for Blogposts

R-Script to run which creates a blogpost draft for new blogposts.

End result here is not a finished template, but just to set something up for now that can be adjusted later.

admiral website highlights

What's on the website/brief tour

  • Version on website and what they mean?
  • templates versus vignettes
  • families and keywords
  • function documentation strategy
  • ?

Images for Posts

Long term Strategy for Images for Posts

  • Gets boring with same hex sticker
  • How to differentiate between same high-level subject: functions, process, extension packages.

deploy devel version of blog site

Hi Dinakar, @cicdguy

Any chance you could help me set up a devel version of the blog site. Or point me in the right direction/hold some hands while I fumble around in the daark ????

change repo name

Discussion point:

I would like to change the name of the repo to better represent what we do here.
This is relevant because the name is featured in all URL's.

github.com/pharmaverse/blog/ would not be bad.
However, that somewhat depends on the scope: is it going to be THE pharmaverse blog?
What about the thing NEST is planning?

What do you think, @pharmaverse/commswg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.