Check that data has the columns and values needed to predict the biomass
of in situ surveys with kb_predict_biomass_in_situ().
Usage
kb_check_data_survey_in_situ(
data,
size_census = NULL,
x_name = chk::deparse_backtick_chk(substitute(data))
)Arguments
- data
A data frame of in situ surveys, one row per survey.
- size_census
A data frame of every plant the surveys counted, one row per plant (see
kb_check_data_size_census_nereo()andkb_check_data_size_census_macro()for the columns), orNULLto checkdataalone with itsplantscolumn.- x_name
A string naming the data for error messages.
Details
Each row is one survey, with a count of the plants in the surveyed area. A survey is the area over which canopy percent cover is calculated, and can combine several transects. Required columns:
survey_id, the survey's identifier (text or number, unique to each survey).site, the site surveyed (any text).year, the year of the survey (whole number or text).survey_area_m2, the area surveyed for plants (m², > 0).
Optional columns:
plants, the number of plants counted, given only when sizes come from a size sample (whole number >= 0).plot_area_m2, the area of the plot polygon bounding the survey area that the canopy cover is measured over (m², > 0, or missing).canopy_area_m2, the canopy area delineated within the plot polygon (m², >= 0 and <= plot_area_m2, or missing).canopy_tide_height_m, the tide height when the canopy was imaged, relative to chart datum (m, any number, or missing).
Other columns are ignored.
plants is required when only a sample of plants is measured (a size
sample), and must be absent when every plant is measured (a size census),
since the count then comes from the census rows. The plot cover columns
(plot_area_m2, canopy_area_m2, and canopy_tide_height_m) are either
all present or all missing on each row. Other grouping columns, such as
region, can be named in pool_by.
See also
Other data checks:
kb_check_data_carbon_macro(),
kb_check_data_carbon_nereo(),
kb_check_data_cover_calibration_macro(),
kb_check_data_cover_calibration_nereo(),
kb_check_data_nitrogen_macro(),
kb_check_data_nitrogen_nereo(),
kb_check_data_size_census_macro(),
kb_check_data_size_census_nereo(),
kb_check_data_size_sample_nereo(),
kb_check_data_survey_canopy(),
kb_check_data_weight_macro(),
kb_check_data_weight_nereo(),
kb_check_data_wetdry_macro(),
kb_check_data_wetdry_nereo(),
kb_data_columns(),
kb_datasets()