2DegreesInvesting / tiltPlot

Plots for the TILT project
https://2degreesinvesting.github.io/tiltPlot/
GNU General Public License v3.0
0 stars 0 forks source link

Refactor the architecture of tiltPlot to a more maintanable organization #35

Closed lindadelacombaz closed 1 year ago

lindadelacombaz commented 1 year ago

In regards to the review that @maurolepore made of the structure of the tiltPlot package, the structure of the package can be refactored into a more sustainable one.

e.g. (taken from the slack message from Mauro)

`# R/plot_xyz.R

' @export

plot_xyz <- function(data) { data |> prepare_xyz() |> # unstable: The external structure of the data is changing frequently. check_xyz() |> # stable: The internal structure of the data rarely change plot_xyz_impl() + # stable: The type of plot rarely change tweak_xyz() # unstable: Details of the plot change frequently }

R/prepare_xyz.R

prepare_xyz <- function(data) { ... }

R/check_xyz.R

check_xyz <- function(data) { ... }

R/plot_xyz_impl.R

plot_xyz_impl <- function(data) { ... }

R/tweak_xyz.R

tweak_xyz <- function(data) { ... }`