| Title: | Home Improvement Estimators for Mulch, Topsoil and Sod |
|---|---|
| Description: | Planning quantities for home improvement projects: mulch by bed, tree ring, known area, play structure or swing; topsoil and fill dirt by area with bags, bulk, weight and trips; sod by area with a staggered piece layout, pallets, plugs and soil preparation. A port of the Go module 'calculiva-go' (same version and test vectors), itself a port of the engine of the calculators on <https://calculiva.com/>. The method is described at <https://calculiva.com/how-we-calculate/>. |
| Authors: | Calculiva [aut, cre, cph] |
| Maintainer: | Calculiva <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.0 |
| Built: | 2026-10-24 11:41:44 UTC |
| Source: | https://github.com/calculiva/calculiva-r |
Planning quantities for mulch, topsoil and fill, and sod: volume, bags, bulk,
pallets, pieces, weight and trips. A port of the Go module
github.com/calculiva/calculiva-go (same version, same test vectors),
itself a port of the engine of the calculators on https://calculiva.com/.
The method is described at https://calculiva.com/how-we-calculate/.
All lengths are millimetres (see calculiva_units). Inputs and
results are named lists whose names follow the Go module's fields in lower
camel case (areaMM2, cuFt, bagCuFt); a NULL value
means that the input it depends on was not entered. Invalid input signals a
condition of class calculiva_input_error whose field names the
offending field and whose input_message is the message alone.
Every constant carries, in the source code, its data sheet, the public source it was read on and the date it was verified. Material weights, bag and wheelbarrow sizes and sod allowances are not shipped: they are inputs of the user. The results are planning quantities: the product label, the supplier's quote, the local code and the installer on site govern.
mulch_new_plan, soil_new_plan, sod_new_plan.
ft <- calculiva_units()$foot inch <- calculiva_units()$inch # Two 40 x 3 ft beds topped up from 1 in to 3 in, bought in 2 cu ft bags. bed <- list(id = "front-bed", kind = list(type = "bed", l = 40 * ft, w = 3 * ft, count = 2), target = 3 * inch, existing = 1 * inch) plan <- mulch_new_plan(list(areas = list(bed), bagSize = 2)) plan$totals$cuFt plan$buy$bagsft <- calculiva_units()$foot inch <- calculiva_units()$inch # Two 40 x 3 ft beds topped up from 1 in to 3 in, bought in 2 cu ft bags. bed <- list(id = "front-bed", kind = list(type = "bed", l = 40 * ft, w = 3 * ft, count = 2), target = 3 * inch, existing = 1 * inch) plan <- mulch_new_plan(list(areas = list(bed), bagSize = 2)) plan$totals$cuFt plan$buy$bags
The length units and the sourced constants of each estimator, as named lists.
calculiva_units() soil_constants() mulch_constants() sod_constants()calculiva_units() soil_constants() mulch_constants() sod_constants()
calculiva_units returns inch (25.4) and foot (304.8), in
millimetres. soil_constants returns the NIST Handbook 130 units (pounds
per short ton, cubic feet per cubic yard, cubic inches per dry quart) and the
square and cubic foot in mm. mulch_constants returns the CPSC
playground surfacing rules and the mulch depth guidance publisher by
publisher. sod_constants returns the surveyed sod formats and pallets,
the Penn State and NC State soil preparation figures and UF/IFAS LH013 Table 3.
The source and verification date of each value are given in the package source.
calculiva_units()$foot soil_constants()$cubicFeetPerCubicYardcalculiva_units()$foot soil_constants()$cubicFeetPerCubicYard
Volume per bed, tree ring, known area, play structure or swing (CPSC depth and extent), bags, bulk, break-even, loads and warnings. Calculator page: https://calculiva.com/landscaping/mulch-calculator/.
mulch_new_rules() mulch_new_ring_guidance() mulch_check_ring(r, gap, guidance = mulch_new_ring_guidance()) mulch_new_plan(input, rules = mulch_new_rules()) mulch_coverage(bag_cu_fts, depths_in, rules = mulch_new_rules())mulch_new_rules() mulch_new_ring_guidance() mulch_check_ring(r, gap, guidance = mulch_new_ring_guidance()) mulch_new_plan(input, rules = mulch_new_rules()) mulch_coverage(bag_cu_fts, depths_in, rules = mulch_new_rules())
r |
the ring radius, mm. |
gap |
the bare gap at the trunk, mm. |
guidance |
the published gaps and radii from |
input |
a list with |
rules |
the rules from |
bag_cu_fts |
bag volumes, cubic feet. |
depths_in |
depths, inches. |
mulch_new_plan returns a list with areas, totals,
buy, trips, wheelbarrowLoads and warnings;
mulch_check_ring the published minimums with ok for each;
mulch_coverage the square feet per bag at each depth and the bags per
cubic yard.
ft <- calculiva_units()$foot swing <- list(id = "s1", kind = list(type = "swing", beam = 10 * ft, height = 8 * ft)) mulch_new_plan(list(areas = list(swing)))$totals$cuYd mulch_check_ring(3 * ft, 76.2)$radii[[1]]$okft <- calculiva_units()$foot swing <- list(id = "s1", kind = list(type = "swing", beam = 10 * ft, height = 8 * ft)) mulch_new_plan(list(areas = list(swing)))$totals$cuYd mulch_check_ring(3 * ft, 76.2)$radii[[1]]$ok
Pieces per area (rectangles laid out piece by piece in staggered rows, with offcut pairing), pallets, plugs (UF/IFAS LH013 Table 3), soil preparation, cost and weight. Calculator page: https://calculiva.com/landscaping/sod-calculator/.
sod_new_rules() sod_new_input(areas = list(), rules = sod_new_rules()) sod_new_plan(input, rules = sod_new_rules()) sod_lay_rect(l, w, piece_w, piece_l) sod_format_table(sold_as, sqft, rules = sod_new_rules())sod_new_rules() sod_new_input(areas = list(), rules = sod_new_rules()) sod_new_plan(input, rules = sod_new_rules()) sod_lay_rect(l, w, piece_w, piece_l) sod_format_table(sold_as, sqft, rules = sod_new_rules())
areas |
one to eight lists with |
rules |
the rules from |
input |
the list returned by |
l, w
|
the rectangle length and width, mm. |
piece_w, piece_l
|
the piece width and length, mm. |
sold_as |
pallet coverages, square feet. |
sqft |
the lawn area, square feet. |
sod_new_plan returns a list with the piece size, areas,
totals, pallets, plug, prep, cost,
weightLb, trips and warnings; sod_lay_rect the
placed pieces, rows and counts; sod_format_table one row per format.
ft <- calculiva_units()$foot lawn <- list(id = "a1", shape = list(type = "rect", l = 10 * ft, w = 8 * ft, count = 1)) input <- sod_new_input(list(lawn)) input$palletPieces <- 150 sod_new_plan(input)$totals$piecesft <- calculiva_units()$foot lawn <- list(id = "a1", shape = list(type = "rect", l = 10 * ft, w = 8 * ft, count = 1)) input <- sod_new_input(list(lawn)) input$palletPieces <- 150 sod_new_plan(input)$totals$pieces
Volume per area, bags, bulk by the yard or the ton, weight, truck trips and wheelbarrow loads, per material (topsoil first, then fill). Calculator page: https://calculiva.com/landscaping/soil-calculator/.
soil_new_rules(weights = list()) soil_area_of(id, shape) soil_bag_cu_ft(size, unit, dry_quart_in3) soil_new_plan(input, rules) soil_coverage(depths_in, rules, weight_id)soil_new_rules(weights = list()) soil_area_of(id, shape) soil_bag_cu_ft(size, unit, dry_quart_in3) soil_new_plan(input, rules) soil_coverage(depths_in, rules, weight_id)
weights |
a list of material weights entered by the user, each a list
with |
id |
the area id; it prefixes the field of any error ( |
shape |
a list with |
size |
the bag size. |
unit |
|
dry_quart_in3 |
cubic inches per dry quart, from the rules. |
input |
a list with |
rules |
the rules from |
depths_in |
depths in inches. |
weight_id |
the id of a weight of the rules. |
soil_new_plan returns a list with areas, materials,
totals and warnings; soil_area_of an area in mm2;
soil_bag_cu_ft a volume in cubic feet; soil_coverage one row per
depth (square feet per cubic yard, per ton and per cubic foot).
ft <- calculiva_units()$foot rules <- soil_new_rules(list(list(id = "mine", label = "my supplier's ticket", loose = 2000, bank = 2500, loadFactor = 0.75))) area <- list(id = "a1", shape = list(type = "rect", l = 10 * ft, w = 12 * ft), depth = 101.6, count = 1, material = "topsoil") topsoil <- list(bagSize = 0.75, weight = "mine") plan <- soil_new_plan(list(areas = list(area), topsoil = topsoil), rules) plan$materials[[1]]$bagsft <- calculiva_units()$foot rules <- soil_new_rules(list(list(id = "mine", label = "my supplier's ticket", loose = 2000, bank = 2500, loadFactor = 0.75))) area <- list(id = "a1", shape = list(type = "rect", l = 10 * ft, w = 12 * ft), depth = 101.6, count = 1, material = "topsoil") topsoil <- list(bagSize = 0.75, weight = "mine") plan <- soil_new_plan(list(areas = list(area), topsoil = topsoil), rules) plan$materials[[1]]$bags