areafy2: Estimate the unit_area for an observation for a blockbuster...

Description Usage Arguments Details Value See Also Examples

View source: R/areafy.R


This should be used to provide the initial estimates of the unit_area of each element-sub-element construction type (aka building component) in the dataframe found in the R script 01_read_and_tidy_data.R. Input tibble is checked by default can be skipped.


areafy2(blockbuster_initial_state, unit_area_methods = "PDS",
  input_checks = TRUE)



a blockbuster dataframe or tibble without unit_area.


a string to specify whether "PDS" or "CDC". Currently only "PDS" supported.


logical to specify whether to check inputs or not for speed in blockbuster.


It may be preferred over the deprecated areafy as it's easier to read, however as case_when is experimental, areafy may be preferred. It will not need to be called after deterioration and different grades of the elementid appear, as the unit_area will be calculated by the transition from the superior grade condition. As most unit area calculation methods are to use the gifa, we do this first and then specify the rarer unit_area calculations or estimation methods. A window or door is assumed to have an area of one square metre. See the data-raw file blockbuster_unit_quantity_method.csv for method details. The first areafy function used nested ifelse() statements and was difficult to read. This version is an attempt to tidy that and make the code more human readable for debugging. Set the input_checks to FALSE if it has already been checked for speed.


a blockbuster tibble with the unit_area estimated for each row.

See Also


pds_data <- areafy2(blockbuster_pds[1, ])$unit_area 
pds_data == blockbuster_pds[1, ]$unit_area  

DFE-Capital/blockbuster documentation built on March 19, 2018, 4:09 a.m.