Git Product home page Git Product logo

philsf.workflow's People

Contributors

philsf avatar

Stargazers

 avatar

Watchers

 avatar

philsf.workflow's Issues

Update templates with new best practices

Include the new best practices after the good experiences tested in SAR-2021-003 and SAR-2021-004.

  • figure caption with knitr and here
  • source input in SAP, just as results is sourced in SAR
  • include analytical_mockup structure by default in documents
  • Availability secion in documents

Templates: update header and footer styles

Now that there are more than one document type, change the header and footer to acknowledge

Header

  • Document type
  • document address
  • consultant page

Footer

  • consultant name/e-mail
  • document type (report, SAP, protocol, etc)
  • document version
  • year
  • page

obs: Consider creating first page header/footer for better reading flow

Escape all dir variables

Some tasks are not being executed when there are special chars in a dir/path, including spaces.

We need to escape every variable that contains a path when passing it to a command like git.

Templates style updates

  • fit summary headers in first page with 0,20 cm spacing below
  • footer link to main page instead of linktree (check hyperlink)
  • TableNormal left alignment

Set pander tables to rmarkdown style

Github doesn't offer good render of pander tables in the simple format, but rather we must use rmarkdown format.

Set table.style in panderOptions in all templates.

Pre-include dataset/ in gitignore

After running basefiles, include a standard line + comment to ignore private datasets.

Don't commit this change to allow opt-out of this option in the workflow.

Define new document codes:

Use SAR (Statistical Analysis Report) instead of "data analysis" in pt)

  • yyyy-SAR-NN-v01

  • yyyy-SAP-NN-v01

  • SAR_pt

    • template
    • style
  • SAR_en

    • template
    • style
  • SAP_pt

    • template
    • style
  • SAP_en

    • template
    • style
  • scripts

  • README

  • Consider batch renaming all previous report for easier identification of documents;

  • Consider including semantinc information in the document code

    • pro: easier to know the contents by looking at filename
    • con: longer/clunkier codes/filenames

set a maximum table size in pander

We've been ignoring table sizes for far too long. It's time to pick a size.

Tables with too many columns (e.g. analytical data) can be divided into smaller tables, but we don't want too many subdibisions

Tested in SAR-2021-003:

  • 120
  • 160
  • (go higher?)

Rename template styles filenames

Now that there are more than one document template, the filename styles.docx clashes when more than one template is used in the same project. Create individual filenames for each style to avoid this.

Ensure all R scripts run at template creation

Create mockup examples for objects required for the documents templates, or disable the objects in the templates. results.R must run for it to be enabled by default.

  • analytical_mockup for SAP templates
  • enable results in SAR templates
  • disable tab_desc?
  • disable tab_inf?

install checks for the wrong OS

install checks for !Linux to configure the environment for Windows. This is wrong.

We should check for MINGW64/MINGW32 instead to set that environment.

fix pander warning

pander() is throwing a warning that it can't handle the output of as_kable().

Check if it has ever worked (and how). We are passing the "caption" argument to pander(), but kable() also accepts it.

Maybe it is time to configure knitr::kable() to the options we're using with pander() and switch.

Translate all content

  • SAR template
  • SAP template
  • Protocol template
  • scripts names
  • scripts vars
  • scripts messages

Provide a new template: Protocol

Create a new Rmarkdown template to create Protocols for future studies and projects.

Use the same formatting choices as the report template.

Consider using `github_document` format from `rmarkdown`

The github_document format from rmarkdown automatically creates a .md file that is compatible with GFM. This file is suitable for online visualization, complete with figures and links.

This might be a useful output format for reports, although it may disrupt current practices.

One could also replicate this behavior by setting

  • using keep_md
  • setting pander table.syle to rmarkdown by default

Help, examples and better argument processing

Most scripts detect usage mistake only when user doesn't provide any arguments.

A major overhaul of all scripts arguments processing is needed.

  • detect simple argument mistakes
  • standardize usage instructions
  • provide a simple example within help
  • consider including a help argument

Create a standard agreement/contract document

Create a template with a standard agreement of how I approach the consulting:

  • Scope
    • All analyses will be previously agreed upon in an initial communications (meeting/e-mail)
    • All analyses will be written in the Analytical Plan (SAP)
    • Client will be asked to review and approve the SAP
  • Online publishing (public) portfolio
    • The analysis will may be published in the portfolio, at the consultant's discretion.
    • The data will NOT be published online
    • Client can require an embargo date before the public publishing (no justification asked).
      In such a case, the date must be set before the start of the consulting
  • Deadline
    • Define deadline for deliverable and payment
    • Client can request changes within the deadline agreed upon; after deadline expiration the report will be finalized and the consulting concluded.
    • If the consultant violates the deadline, there will be a penalty of 10% of the final price rebate, per day.
  • Pricing
    • Fixed price and deadline for a simple analysis
    • Hourly rate for longer projects
  • Additional requests (i.e., not included in the approved SAP)
    • Additional analyses will require a v02 of the SAR, or a new SAR (to be defined on a case basis)
    • Any of the above options will be charged separately
  • Save the document in the private dir (at the moment, dataset)
    • Agreement/contract
    • Invoice

Use a similar template from the SAR/SAP documents, and send over e-mail in PDF format.

Templates content updates

  • Section rename: Observations and limitations (instead of Exceptions)
  • Section rename: Context (instead of Introduction)
  • Use a replaceable [title] tag
  • New template abbrevs
  • Update template descriptive analysis
  • Update template inferential analysis

Rename install/uninstall scripts

  • move install to bin/
  • rename install and uninstall scripts to philsf.workflow-*
  • don't install BM-setup anymore
  • standardize script names (sync.repo -> SAR-sync, *.all)

Update scripts with new best practices

Include the new best practices after the good experiences tested in
SAR-2021-003 and SAR-2021-004.

  • input: default dataset names
    • define data.raw from read_excel
    • define analytical and analytical_mockup
    • labels with labelling
  • describe: tables setup (before inference)
    • gtsummary, gt
    • gtsummary default theme + optional pt translation
    • New packages: effectsize
  • inference:
    • New packages: infer
    • template for add_p
    • template for add_difference()
  • modeling:
    • New packages: broom, broom-mixed
  • plots:
    • default ggplot2 theme
    • default color palette
  • plots-save:
    • default fig dimensions (around 8cm)
    • output publication-ready tables
      use as_rtf() + writeLines() (commented out)
  • results:
    • move modeling to before inference

fix figure location

Using here::here() produces a full path, instead of a relative path.
We need to use error = FALSE to pass a relative path that works.

Even so, we lose the ability to preview in Rstudio editor panel.
At least we can check the viz of the document in HTML.

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.