Description Usage Arguments Details Value See Also Examples
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.
1 2 |
blockbuster_initial_state |
a blockbuster dataframe or tibble without |
unit_area_methods |
a string to specify whether "PDS" or "CDC". Currently only "PDS" supported. |
input_checks |
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.
http://www.machinegurning.com/rstats/case_when/
1 2 | pds_data <- areafy2(blockbuster_pds[1, ])$unit_area
pds_data == blockbuster_pds[1, ]$unit_area
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.