This function is usually called first, for instance after a raw project plan was imported from an speadsheet, see import_xlsx.

wrangle_raw_plan(df, date_origin = "1899-12-30")

Arguments

df

Essential columns that must be provided are

task

description of the task, e.g. write architecture

resource

the resource that is working on that task

id

an identifier for the task. used to declare dependencies

section

a section is usually assigned to a set of tasks

project

a project is usually assigned to a set of sections

depends_on

a comma separated list of id's that the current task depends on or NA

start

a date when the task starts. Note, the start-date can be defined implicitly, see the corresponding vignette.

end

a date when the task ends

est_duration

number of estimated workdays this task will take

status

of the task, i.e. 'unscheduled', 'await', 'aborted'

resource

character for the resource that is allocated to the corresponding task

progress

number between 0 and 100, indicating the progress of the task

deadline

NA or a date when the task must be completed

date_origin

Reference date in format YYYY-mm-dd for converting an integer to a date. For dates (post-1901) from Windows Excel origin should by 1899-12-30 (is the default value). For dates (post-1901) from Mac Excel origin should by 1904-01-01.

Value

data.table with columns preprocessed for calculating time lines with calculate_time_lines.

project

copy from df where NA's are replaced by 'UNKNOWN'

section

copy from df where NA's are replaced by 'UNKNOWN'

id

copy from df where NA's are replaced by NOT_SPECIFIED_<number> and a prefix for the project

depends_on

copy from df but adjusted for the project-prefix and PREVIOUS-tag

start

copy from df but adjusted for the project-prefix and PREVIOUS-tag

prior_ids

concatenation of depends_on and start

resource

copy from df where NA's are replaced by 'UNKNOWN'

task

copy from df where NA's are replaced by 'UNKNOWN'

progress

copy from df where NA's are replaced by 0

deadline

'copy' from df as date-object

fixed_start_date

'copy' of start from df as date-object

fixed_end_date

'copy' of end from df as date-object

est_days

copy of est_duration

waiting/aborted/unscheduled

TRUE/FALSE according to the status-column from df

nmb_combined_entries

number of tasks that were combined to one because of the same id

See also

Examples

raw_plan <- import_xlsx(system.file("template","projects.xlsx", package = "projectPlan")) wrangle_raw_plan(raw_plan)
#> project id depends_on #> 1: kitchen kitchen::NOT_SPECIFIED_1 NA #> 2: kitchen kitchen::roughplan kitchen::NOT_SPECIFIED_1 #> 3: kitchen kitchen::NOT_SPECIFIED_3 NA #> 4: kitchen kitchen::NOT_SPECIFIED_4 kitchen::NOT_SPECIFIED_3,kitchen::roughplan #> 5: kitchen kitchen::plan kitchen::NOT_SPECIFIED_4 #> 6: kitchen kitchen::buy kitchen::plan #> 7: kitchen kitchen::NOT_SPECIFIED_7 kitchen::plan #> 8: kitchen kitchen::NOT_SPECIFIED_8 kitchen::buy,kitchen::NOT_SPECIFIED_7 #> start prior_ids #> 1: NA NA #> 2: NA kitchen::NOT_SPECIFIED_1 #> 3: kitchen::roughplan kitchen::roughplan #> 4: NA kitchen::NOT_SPECIFIED_3,kitchen::roughplan #> 5: NA kitchen::NOT_SPECIFIED_4 #> 6: NA kitchen::plan #> 7: NA kitchen::plan #> 8: NA kitchen::buy,kitchen::NOT_SPECIFIED_7 #> section resource #> 1: kitchen::0_prep I #> 2: kitchen::0_prep I #> 3: kitchen::0_prep F1, F2, I #> 4: kitchen::1_offer Company, I #> 5: kitchen::1_offer Company, I #> 6: kitchen::1_offer I #> 7: kitchen::2_installation I #> 8: kitchen::2_installation Company, I #> task progress deadline #> 1: measure kitchen 0 <NA> #> 2: make a rough plan 0 <NA> #> 3: ask friends which companies they can recommend 0 <NA> #> 4: make appointment with company for planning 0 <NA> #> 5: plan new kitchen 0 <NA> #> 6: buy new kitchen 0 <NA> #> 7: make appointment for installation 0 <NA> #> 8: installation of the new kitchen 0 2020-02-07 #> fixed_start_date fixed_end_date est_days waiting aborted unscheduled #> 1: 2019-12-28 <NA> 1 FALSE FALSE TRUE #> 2: <NA> <NA> 2 FALSE FALSE TRUE #> 3: <NA> <NA> 2 FALSE FALSE TRUE #> 4: <NA> <NA> 5 FALSE FALSE TRUE #> 5: <NA> <NA> 1 FALSE FALSE TRUE #> 6: <NA> <NA> 1 FALSE FALSE TRUE #> 7: <NA> <NA> 1 FALSE FALSE TRUE #> 8: <NA> <NA> 1 FALSE FALSE TRUE #> nmb_combined_entries #> 1: 1 #> 2: 1 #> 3: 1 #> 4: 1 #> 5: 1 #> 6: 1 #> 7: 1 #> 8: 1