Cubage Planning
Warning
This library is under development, none of the presented solutions are available for download.
Use forest inventory data to plan the trees to be sampled for volume measurement, ensuring sufficient sampling of the plantation.
Class Parameters
CubagePlanning(df, tree_dbh, tree_height)
Parameters | Description |
---|---|
df | The DataFrame containing the tree data. |
tree_dbh | The name of the column containing the diameter at breast height (DBH) values of the trees (centimeters). |
tree_height | The name of the column that contains the total heights of the trees (meters). |
Class Functions
CubagePlanning.resume(n_classes=10, dbh_classes=None, height_classes=None,
only_height_classes=False, only_dbh_classes=False) #(1)
CubagePlanning.p_resume(n_classes=10, dbh_classes=None, height_classes=None,
only_height_classes=False, only_dbh_classes=False) #(2)
CubagePlanning.get_values(n_cubage_trees, n_classes=10, dbh_classes=None, height_classes=None,
only_height_classes=False, only_dbh_classes=False) #(3)
-
n_classes = Number of classes to which the values of height and diameter at breast height will be subjected.
dbh_classes = (Optional) Number of DBH classes to which the values of diameter at breast height will be subjected. IfNone
, usesn_classes
value.
height_classes = (Optional) Number of height classes to which the values of height will be subjected. IfNone
, usesn_classes
value.
only_height_classes = (Optional) IfTrue
, only height classes will be used for the summary.
only_dbh_classes = (Optional) only DBH classes will be used for the summary. -
n_classes = Number of classes to which the values of height and diameter at breast height will be subjected.
dbh_classes = (Optional) Number of DBH classes to which the values of diameter at breast height will be subjected. IfNone
, usesn_classes
value.
height_classes = (Optional) Number of height classes to which the values of height will be subjected. IfNone
, usesn_classes
value.
only_height_classes = (Optional) IfTrue
, only height classes will be used for the summary.
only_dbh_classes = (Optional) only DBH classes will be used for the summary. -
n_cubage_trees = Number of trees that will be selected for cubage. The default is 10.
n_classes = Number of classes to which the values of height and diameter at breast height will be subjected.
dbh_classes = (Optional) Number of DBH classes to which the values of diameter at breast height will be subjected. IfNone
, usesn_classes
value.
height_classes = (Optional) Number of height classes to which the values of height will be subjected. IfNone
, usesn_classes
value.
only_height_classes = (Optional) IfTrue
, only height classes will be used for the summary.
only_dbh_classes = (Optional) only DBH classes will be used for the summary.
Parameters | Description |
---|---|
.resume() | Returns a summary of how many trees from the provided dataframe are in each class. |
.p_resume() | Returns a summary of the percentage of trees from the provided dataframe in each class. |
.get_values() | Returns a dataframe indicating how many trees should be sampled for volume measurement in each class, based on the percentage representation of each class in the total inventory. |
Example Usage
taper_functions_example.py | |
---|---|
1 2 |
|
- Import
CubagePlanning
class. - Import
pandas
for data manipulation.
Create a variable for the Volumetrics Class
taper_functions_example.py | |
---|---|
3 4 5 6 7 |
|
- Load your csv file.
- Create the variable
cub
containing theCubagePlanning
class, using columnDAP
for the DBH values and the columnHT
for the heights values. - Get a summary of how many trees from the provided dataframe are in each class and save on
resume
variable. - Get a summary of the percentage of trees from the provided dataframe in each class and save on
percentual_resume
variable. - Get a dataframe indicating how many trees should be sampled for volume measurement in each class, based on the percentage representation of each class in the total inventory and save on
results
variable.