whitebox
Tool MetadataThis vignette provides an introduction to the data sets included in
the whitebox
package. These data sets contain names,
arguments and other metadata for tools available in WhiteboxTools.
Internal data sets and functions defined in the R package correspond to tool names available in the most recent version of WhiteboxTools. Data sets are not dynamically generated from your WhiteboxTools installation. Relatively recent versions of WhiteboxTools should be supported backward-compatibly, though any newer functionality will not be usable.
The first data set describes tool names in WhiteboxTools and the corresponding exported function in the R package, along with the WhiteboxTools Toolbox name and a brief description.
data("wbttools", package = "whitebox")
str(wbttools)
#> 'data.frame': 545 obs. of 8 variables:
#> $ tool_name : chr "AbsoluteValue" "AccumulationCurvature" "AdaptiveFilter" "Add" ...
#> $ function_name: chr "wbt_absolute_value" "wbt_accumulation_curvature" "wbt_adaptive_filter" "wbt_add" ...
#> $ toolbox_name : chr "Math and Stats Tools" "Geomorphometric Analysis" "Image Processing Tools" "Math and Stats Tools" ...
#> $ label : chr "Absolute Value" "Accumulation Curvature" "Adaptive Filter" "Add" ...
#> $ description : chr "Calculates the absolute value of every cell in a raster." "This tool calculates accumulation curvature from an input DEM." "Performs an adaptive filter on an image." "Performs an addition operation on two rasters or a raster and a constant value." ...
#> $ github : chr "https://github.com/jblindsay/whitebox-tools/blob/master/whitebox-tools-app/src/tools/math_stat_analysis/abs.rs" "Source code is unavailable due to proprietary license." "https://github.com/jblindsay/whitebox-tools/blob/master/whitebox-tools-app/src/tools/image_analysis/adaptive_filter.rs" "https://github.com/jblindsay/whitebox-tools/blob/master/whitebox-tools-app/src/tools/math_stat_analysis/add.rs" ...
#> $ book : chr "https://www.whiteboxgeo.com/manual/wbt_book/available_tools/mathand_stats_tools.html#AbsoluteValue" "https://www.whiteboxgeo.com/manual/wbt_book/available_tools/geomorphometric_analysis.html#AccumulationCurvature" "https://www.whiteboxgeo.com/manual/wbt_book/available_tools/image_processing_tools.html#AdaptiveFilter" "https://www.whiteboxgeo.com/manual/wbt_book/available_tools/mathand_stats_tools.html#Add" ...
#> $ is_extension : logi FALSE TRUE FALSE FALSE FALSE FALSE ...
#> - attr(*, "version")= chr "2.3.0"
The wbttools
data set is a data.frame with 545 tools and
7 variables
"tool_name"
- WhiteboxTools tool name
"function_name"
- R function tool name
"toolbox_name"
- WhiteboxTools toolbox name
"label"
- WhiteboxTools tool label
"description"
- Brief description
"github"
- GitHub link
"book"
- Reference manual link
"is_extension"
- Tool is part of General Toolset
Extension (GTE), as opposed to the “open core”
head(wbttools)
#> tool_name function_name
#> 1 AbsoluteValue wbt_absolute_value
#> 2 AccumulationCurvature wbt_accumulation_curvature
#> 3 AdaptiveFilter wbt_adaptive_filter
#> 4 Add wbt_add
#> 5 AddPointCoordinatesToTable wbt_add_point_coordinates_to_table
#> 6 AggregateRaster wbt_aggregate_raster
#> toolbox_name label
#> 1 Math and Stats Tools Absolute Value
#> 2 Geomorphometric Analysis Accumulation Curvature
#> 3 Image Processing Tools Adaptive Filter
#> 4 Math and Stats Tools Add
#> 5 Data Tools Add Point Coordinates To Table
#> 6 GIS Analysis Aggregate Raster
#> description
#> 1 Calculates the absolute value of every cell in a raster.
#> 2 This tool calculates accumulation curvature from an input DEM.
#> 3 Performs an adaptive filter on an image.
#> 4 Performs an addition operation on two rasters or a raster and a constant value.
#> 5 Modifies the attribute table of a point vector by adding fields containing each point's X and Y coordinates.
#> 6 Aggregates a raster to a lower resolution.
#> github
#> 1 https://github.com/jblindsay/whitebox-tools/blob/master/whitebox-tools-app/src/tools/math_stat_analysis/abs.rs
#> 2 Source code is unavailable due to proprietary license.
#> 3 https://github.com/jblindsay/whitebox-tools/blob/master/whitebox-tools-app/src/tools/image_analysis/adaptive_filter.rs
#> 4 https://github.com/jblindsay/whitebox-tools/blob/master/whitebox-tools-app/src/tools/math_stat_analysis/add.rs
#> 5 https://github.com/jblindsay/whitebox-tools/blob/master/whitebox-tools-app/src/tools/data_tools/add_point_coordinates_to_table.rs
#> 6 https://github.com/jblindsay/whitebox-tools/blob/master/whitebox-tools-app/src/tools/gis_analysis/aggregate_raster.rs
#> book
#> 1 https://www.whiteboxgeo.com/manual/wbt_book/available_tools/mathand_stats_tools.html#AbsoluteValue
#> 2 https://www.whiteboxgeo.com/manual/wbt_book/available_tools/geomorphometric_analysis.html#AccumulationCurvature
#> 3 https://www.whiteboxgeo.com/manual/wbt_book/available_tools/image_processing_tools.html#AdaptiveFilter
#> 4 https://www.whiteboxgeo.com/manual/wbt_book/available_tools/mathand_stats_tools.html#Add
#> 5 https://www.whiteboxgeo.com/manual/wbt_book/available_tools/data_tools.html#AddPointCoordinatesToTable
#> 6 https://www.whiteboxgeo.com/manual/wbt_book/available_tools/gis_analysis.html#AggregateRaster
#> is_extension
#> 1 FALSE
#> 2 TRUE
#> 3 FALSE
#> 4 FALSE
#> 5 FALSE
#> 6 FALSE
The R function naming style differs from the tool names in WhiteboxTools, but the core words are the same.
R function names are derived from the WhiteboxTools name as follows:
PascalCase
tool names change to
snake_case
All R function names get the prefix wbt_
For example, StreamSlopeContinuous
in WhiteboxTools
becomes wbt_stream_slope_continuous()
in R.
The second data set provides details about the available function arguments by tool name.
The wbttoolparameters
data set is a data.frame
with 2220 parameters and 13 variables:
"tool_name"
- WhiteboxTools tool name
"function_name"
- R function name
"toolbox_name"
- WhiteboxTools toolbox name
"name"
- WhiteboxTools tool parameter name
"flags"
- flags used to specify parameter on command
line; comma-separated
"description"
- parameter description
"default_value"
- parameter default value, if
any
"optional"
- parameter “optional” flag; note that
some combination of optional parameters may be required for certain
conditions
"parameter_class"
- parameter type
"parameter_detail"
- parameter details; character:
data type followed by colon and more specifics, For OptionList possible
values, comma-separated (if defined)
"is_input"
- logical. Classification of ‘input’
parameters
"is_output"
- logical. Classification of ‘output’
parameters
"argument_name"
- labels for selected subset of
"flags"
used as R function argument names
for wbt_
functions
head(wbttoolparameters)
#> tool_name function_name toolbox_name
#> 1 AbsoluteValue wbt_absolute_value Math and Stats Tools
#> 2 AbsoluteValue wbt_absolute_value Math and Stats Tools
#> 3 AccumulationCurvature wbt_accumulation_curvature Geomorphometric Analysis
#> 4 AccumulationCurvature wbt_accumulation_curvature Geomorphometric Analysis
#> 5 AccumulationCurvature wbt_accumulation_curvature Geomorphometric Analysis
#> 6 AccumulationCurvature wbt_accumulation_curvature Geomorphometric Analysis
#> name flags
#> 1 Input File -i,--input
#> 2 Output File -o,--output
#> 3 Input Raster DEM -i,--dem
#> 4 Output Raster Image -o,--output
#> 5 Log-transform the output? --log
#> 6 Z-factor --zfactor
#> description default_value optional
#> 1 Input raster file. <NA> FALSE
#> 2 Output raster file. <NA> FALSE
#> 3 Name of the input raster DEM file. <NA> FALSE
#> 4 Name of the output raster image file. <NA> FALSE
#> 5 Display output values using a log-scale. false TRUE
#> 6 Z conversion factor. 1.0 TRUE
#> parameter_class parameter_detail is_input is_output argument_name
#> 1 ExistingFile Raster TRUE FALSE input
#> 2 NewFile Raster FALSE TRUE output
#> 3 ExistingFile Raster TRUE FALSE dem
#> 4 NewFile Raster FALSE TRUE output
#> 5 Boolean Boolean FALSE FALSE log
#> 6 Float Float FALSE FALSE zfactor
Several fields in this table such as flags
and
parameter_type
are “flattened” relative to the nested
wbt_tool_parameters()
output.
The nested parameter_type
from the JSON result is
replaced with two variables in the data set:
parameter_class
and parameter_details
This parameter data.frame is useful to construct your own
functions with wbt_run_tool()
or for inspecting the types
of tools that can be run on particular data types.
str(wbttoolparameters, max.level = 1)
#> 'data.frame': 2220 obs. of 13 variables:
#> $ tool_name : chr "AbsoluteValue" "AbsoluteValue" "AccumulationCurvature" "AccumulationCurvature" ...
#> $ function_name : chr "wbt_absolute_value" "wbt_absolute_value" "wbt_accumulation_curvature" "wbt_accumulation_curvature" ...
#> $ toolbox_name : chr "Math and Stats Tools" "Math and Stats Tools" "Geomorphometric Analysis" "Geomorphometric Analysis" ...
#> $ name : chr "Input File" "Output File" "Input Raster DEM" "Output Raster Image" ...
#> $ flags : chr "-i,--input" "-o,--output" "-i,--dem" "-o,--output" ...
#> $ description : chr "Input raster file." "Output raster file." "Name of the input raster DEM file." "Name of the output raster image file." ...
#> $ default_value : chr NA NA NA NA ...
#> $ optional : logi FALSE FALSE FALSE FALSE TRUE TRUE ...
#> $ parameter_class : chr "ExistingFile" "NewFile" "ExistingFile" "NewFile" ...
#> $ parameter_detail: chr "Raster" "Raster" "Raster" "Raster" ...
#> $ is_input : logi TRUE FALSE TRUE FALSE FALSE FALSE ...
#> $ is_output : logi FALSE TRUE FALSE TRUE FALSE FALSE ...
#> $ argument_name : chr "input" "output" "dem" "output" ...
#> - attr(*, "version")= chr "2.3.0"
You will find that both tool_name
and
function_name
are present, so you can look up by whatever
is convenient.
The variable argument_name
is processed to be the subset
of flags
that corresponds to arguments to R functions,
which are denoted with function_name
.
To find the tools that have an “ExistingFile” argument with file type
“Raster” we can use subset()
.
head(subset(wbttoolparameters, grepl("ExistingFile", parameter_class) & grepl("Raster", parameter_detail)))
#> tool_name function_name toolbox_name
#> 1 AbsoluteValue wbt_absolute_value Math and Stats Tools
#> 3 AccumulationCurvature wbt_accumulation_curvature Geomorphometric Analysis
#> 7 AdaptiveFilter wbt_adaptive_filter Image Processing Tools
#> 12 Add wbt_add Math and Stats Tools
#> 13 Add wbt_add Math and Stats Tools
#> 16 AggregateRaster wbt_aggregate_raster GIS Analysis
#> name flags description
#> 1 Input File -i,--input Input raster file.
#> 3 Input Raster DEM -i,--dem Name of the input raster DEM file.
#> 7 Input File -i,--input Input raster file.
#> 12 Input File Or Constant Value --input1 Input raster file or constant value.
#> 13 Input File Or Constant Value --input2 Input raster file or constant value.
#> 16 Input File -i,--input Input raster file.
#> default_value optional parameter_class parameter_detail is_input
#> 1 <NA> FALSE ExistingFile Raster TRUE
#> 3 <NA> FALSE ExistingFile Raster TRUE
#> 7 <NA> FALSE ExistingFile Raster TRUE
#> 12 <NA> FALSE ExistingFileOrFloat Raster TRUE
#> 13 <NA> FALSE ExistingFileOrFloat Raster TRUE
#> 16 <NA> FALSE ExistingFile Raster TRUE
#> is_output argument_name
#> 1 FALSE input
#> 3 FALSE dem
#> 7 FALSE input
#> 12 FALSE input1
#> 13 FALSE input2
#> 16 FALSE input
The remainder of this vignette is tables of R function names and tool
descriptions from wbttoolparameters
, organized by
WhiteboxTools toolbox/extension name.
| Function Name | Description |
|---|---|
wbt_add_point_coordinates_to_table() |
Modifies the attribute table of a point vector by adding fields containing each point’s X and Y coordinates. |
wbt_clean_vector() |
Removes null features and lines/polygons with fewer than the required number of vertices. |
wbt_convert_nodata_to_zero() |
Converts nodata values in a raster to zero. |
wbt_convert_raster_format() |
Converts raster data from one format to another. |
wbt_csv_points_to_vector() |
Converts a CSV text file to vector points. |
wbt_export_table_to_csv() |
Exports an attribute table to a CSV text file. |
wbt_fix_dangling_arcs() |
This tool fixes undershot and overshot arcs, two common topological errors, in an input vector lines file. |
wbt_join_tables() |
Merge a vector’s attribute table with another table based on a common field. |
wbt_lines_to_polygons() |
Converts vector polylines to polygons. |
wbt_merge_table_with_csv() |
Merge a vector’s attribute table with a table contained within a CSV text file. |
wbt_merge_vectors() |
Combines two or more input vectors of the same ShapeType creating a single, new output vector. |
wbt_modify_no_data_value() |
Modifies nodata values in a raster. |
wbt_multi_part_to_single_part() |
Converts a vector file containing multi-part features into a vector containing only single-part features. |
wbt_new_raster_from_base() |
Creates a new raster using a base image. |
wbt_polygons_to_lines() |
Converts vector polygons to polylines. |
wbt_print_geo_tiff_tags() |
Prints the tags within a GeoTIFF. |
wbt_raster_to_vector_lines() |
Converts a raster lines features into a vector of the POLYLINE shapetype |
wbt_raster_to_vector_points() |
Converts a raster dataset to a vector of the POINT shapetype. |
wbt_raster_to_vector_polygons() |
Converts a raster dataset to a vector of the POLYGON shapetype. |
wbt_reinitialize_attribute_table() |
Reinitializes a vector’s attribute table deleting all fields but the feature ID (FID). |
wbt_remove_polygon_holes() |
Removes holes within the features of a vector polygon file. |
wbt_remove_raster_polygon_holes() |
Removes polygon holes, or ‘donut-holes’, from raster polygons. |
wbt_set_nodata_value() |
Assign the NoData value for an input image. |
wbt_single_part_to_multi_part() |
Converts a vector file containing multi-part features into a vector containing only single-part features. |
wbt_vector_lines_to_raster() |
Converts a vector containing polylines into a raster. |
wbt_vector_points_to_raster() |
Converts a vector containing points into a raster. |
wbt_vector_polygons_to_raster() |
Converts a vector containing polygons into a raster. |
| Function Name | Description |
|---|---|
wbt_aggregate_raster() |
Aggregates a raster to a lower resolution. |
wbt_average_overlay() |
Calculates the average for each grid cell from a group of raster images. |
wbt_block_maximum_gridding() |
Creates a raster grid based on a set of vector points and assigns grid values using a block maximum scheme. |
wbt_block_minimum_gridding() |
Creates a raster grid based on a set of vector points and assigns grid values using a block minimum scheme. |
wbt_boundary_shape_complexity() |
Calculates the complexity of the boundaries of raster polygons. |
wbt_buffer_raster() |
Maps a distance-based buffer around each non-background (non-zero/non-nodata) grid cell in an input image. |
wbt_centroid() |
Calculates the centroid, or average location, of raster polygon objects. |
wbt_centroid_vector() |
Identifies the centroid point of a vector polyline or polygon feature or a group of vector points. |
wbt_clip() |
Extract all the features, or parts of features, that overlap with the features of the clip vector. |
wbt_clip_raster_to_polygon() |
Clips a raster to a vector polygon. |
wbt_clump() |
Groups cells that form discrete areas, assigning them unique identifiers. |
wbt_compactness_ratio() |
Calculates the compactness ratio (A/P), a measure of shape complexity, for vector polygons. |
wbt_construct_vector_tin() |
Creates a vector triangular irregular network (TIN) for a set of vector points. |
wbt_cost_allocation() |
Identifies the source cell to which each grid cell is connected by a least-cost pathway in a cost-distance analysis. |
wbt_cost_distance() |
Performs cost-distance accumulation on a cost surface and a group of source cells. |
wbt_cost_pathway() |
Performs cost-distance pathway analysis using a series of destination grid cells. |
wbt_count_if() |
Counts the number of occurrences of a specified value in a cell-stack of rasters. |
wbt_create_hexagonal_vector_grid() |
Creates a hexagonal vector grid. |
wbt_create_plane() |
Creates a raster image based on the equation for a simple plane. |
wbt_create_rectangular_vector_grid() |
Creates a rectangular vector grid. |
wbt_difference() |
Outputs the features that occur in one of the two vector inputs but not both, i.e. no overlapping features. |
wbt_dissolve() |
Removes the interior, or shared, boundaries within a vector polygon coverage. |
wbt_edge_proportion() |
Calculate the proportion of cells in a raster polygon that are edge cells. |
wbt_eliminate_coincident_points() |
Removes any coincident, or nearly coincident, points from a vector points file. |
wbt_elongation_ratio() |
Calculates the elongation ratio for vector polygons. |
wbt_erase() |
Removes all the features, or parts of features, that overlap with the features of the erase vector polygon. |
wbt_erase_polygon_from_raster() |
Erases (cuts out) a vector polygon from a raster. |
wbt_euclidean_allocation() |
Assigns grid cells in the output raster the value of the nearest target cell in the input image, measured by the Shih and Wu (2004) Euclidean distance transform. |
wbt_euclidean_distance() |
Calculates the Shih and Wu (2004) Euclidean distance transform. |
wbt_extend_vector_lines() |
Extends vector lines by a specified distance. |
wbt_extract_nodes() |
Converts vector lines or polygons into vertex points. |
wbt_extract_raster_values_at_points() |
Extracts the values of raster(s) at vector point locations. |
wbt_filter_raster_features_by_area() |
Removes small-area features from a raster. |
wbt_find_lowest_or_highest_points() |
Locates the lowest and/or highest valued cells in a raster. |
wbt_find_patch_or_class_edge_cells() |
Finds all cells located on the edge of patch or class features. |
wbt_heat_map() |
Calculates a heat map, or kernel density estimation (KDE), for an input point set. |
wbt_highest_position() |
Identifies the stack position of the maximum value within a raster stack on a cell-by-cell basis. |
wbt_hole_proportion() |
Calculates the proportion of the total area of a polygon’s holes relative to the area of the polygon’s hull. |
wbt_idw_interpolation() |
Interpolates vector points into a raster surface using an inverse-distance weighted scheme. |
wbt_intersect() |
Identifies the parts of features in common between two input vector layers. |
wbt_layer_footprint() |
Creates a vector polygon footprint of the area covered by a raster grid or vector layer. |
wbt_linearity_index() |
Calculates the linearity index for vector polygons. |
wbt_line_intersections() |
Identifies points where the features of two vector line layers intersect. |
wbt_lowest_position() |
Identifies the stack position of the minimum value within a raster stack on a cell-by-cell basis. |
wbt_max_absolute_overlay() |
Evaluates the maximum absolute value for each grid cell from a stack of input rasters. |
wbt_max_overlay() |
Evaluates the maximum value for each grid cell from a stack of input rasters. |
wbt_medoid() |
Calculates the medoid for a series of vector features contained in a shapefile. |
wbt_merge_line_segments() |
Merges vector line segments into larger features. |
wbt_min_absolute_overlay() |
Evaluates the minimum absolute value for each grid cell from a stack of input rasters. |
wbt_minimum_bounding_box() |
Creates a vector minimum bounding rectangle around vector features. |
wbt_minimum_bounding_circle() |
Delineates the minimum bounding circle (i.e. smallest enclosing circle) for a group of vectors. |
wbt_minimum_bounding_envelope() |
Creates a vector axis-aligned minimum bounding rectangle (envelope) around vector features. |
wbt_minimum_convex_hull() |
Creates a vector convex polygon around vector features. |
wbt_min_overlay() |
Evaluates the minimum value for each grid cell from a stack of input rasters. |
wbt_multiply_overlay() |
Calculates the sum for each grid cell from a group of raster images. |
wbt_narrowness_index() |
Calculates the narrowness of raster polygons. |
wbt_natural_neighbour_interpolation() |
Creates a raster grid based on Sibson’s natural neighbour method. |
wbt_nearest_neighbour_gridding() |
Creates a raster grid based on a set of vector points and assigns grid values using the nearest neighbour. |
wbt_patch_orientation() |
Calculates the orientation of vector polygons. |
wbt_percent_equal_to() |
Calculates the percentage of a raster stack that have cell values equal to an input on a cell-by-cell basis. |
wbt_percent_greater_than() |
Calculates the percentage of a raster stack that have cell values greater than an input on a cell-by-cell basis. |
wbt_percent_less_than() |
Calculates the percentage of a raster stack that have cell values less than an input on a cell-by-cell basis. |
wbt_perimeter_area_ratio() |
Calculates the perimeter-area ratio of vector polygons. |
wbt_pick_from_list() |
Outputs the value from a raster stack specified by a position raster. |
wbt_polygon_area() |
Calculates the area of vector polygons. |
wbt_polygonize() |
Creates a polygon layer from two or more intersecting line features contained in one or more input vector line files. |
wbt_polygon_long_axis() |
Used to map the long axis of polygon features. |
wbt_polygon_perimeter() |
Calculates the perimeter of vector polygons. |
wbt_polygon_short_axis() |
Used to map the short axis of polygon features. |
wbt_radial_basis_function_interpolation() |
Interpolates vector points into a raster surface using a radial basis function scheme. |
wbt_radius_of_gyration() |
Calculates the distance of cells from their polygon’s centroid. |
wbt_raster_area() |
Calculates the area of polygons or classes within a raster image. |
wbt_raster_cell_assignment() |
Assign row or column number to cells. |
wbt_raster_perimeter() |
Calculates the perimeters of polygons or classes within a raster image. |
wbt_reclass() |
Reclassifies the values in a raster image. |
wbt_reclass_equal_interval() |
Reclassifies the values in a raster image based on equal-ranges. |
wbt_reclass_from_file() |
Reclassifies the values in a raster image using reclass ranges in a text file. |
wbt_related_circumscribing_circle() |
Calculates the related circumscribing circle of vector polygons. |
wbt_shape_complexity_index() |
Calculates overall polygon shape complexity or irregularity. |
wbt_shape_complexity_index_raster() |
Calculates the complexity of raster polygons or classes. |
wbt_smooth_vectors() |
Smooths a vector coverage of either a POLYLINE or POLYGON base ShapeType. |
wbt_split_vector_lines() |
Used to split a vector line coverage into even-lengthed segments. |
wbt_split_with_lines() |
Splits the lines or polygons in one layer using the lines in another layer. |
wbt_sum_overlay() |
Calculates the sum for each grid cell from a group of raster images. |
wbt_symmetrical_difference() |
Outputs the features that occur in one of the two vector inputs but not both, i.e. no overlapping features. |
wbt_tin_gridding() |
Creates a raster grid based on a triangular irregular network (TIN) fitted to vector points. |
wbt_travelling_salesman_problem() |
Finds approximate solutions to travelling salesman problems, the goal of which is to identify the shortest route connecting a set of locations. |
wbt_union() |
Splits vector layers at their overlaps, creating a layer containing all the portions from both input and overlay layers. |
wbt_update_nodata_cells() |
Replaces the NoData values in an input raster with the corresponding values contained in a second update layer. |
wbt_vector_hex_binning() |
Hex-bins a set of vector points. |
wbt_voronoi_diagram() |
Creates a vector Voronoi diagram for a set of vector points. |
wbt_weighted_overlay() |
Performs a weighted sum on multiple input rasters after converting each image to a common scale. The tool performs a multi-criteria evaluation (MCE). |
wbt_weighted_sum() |
Performs a weighted-sum overlay on multiple input raster images. |
| Function Name | Description |
|---|---|
wbt_accumulation_curvature() |
This tool calculates accumulation curvature from an input DEM. |
wbt_aspect() |
Calculates an aspect raster from an input DEM. |
wbt_assess_route() |
This tool assesses a route for slope, elevation, and visibility variation. |
wbt_average_normal_vector_angular_deviation() |
Calculates the circular variance of aspect at a scale for a DEM. |
wbt_breakline_mapping() |
This tool maps breaklines from an input DEM. |
wbt_circular_variance_of_aspect() |
Calculates the circular variance of aspect at a scale for a DEM. |
wbt_contours_from_points() |
Creates a contour coverage from a set of input points. |
wbt_contours_from_raster() |
Derives a vector contour coverage from a raster surface. |
wbt_curvedness() |
This tool calculates curvedness from an input DEM. |
wbt_dem_void_filling() |
This tool can be used to fill the void areas of a DEM using another fill DEM data set. |
wbt_dev_from_mean_elev() |
Calculates deviation from mean elevation. |
wbt_difference_curvature() |
This tool calculates difference curvature from an input DEM. |
wbt_diff_from_mean_elev() |
Calculates difference from mean elevation (equivalent to a high-pass filter). |
wbt_directional_relief() |
Calculates relief for cells in an input DEM for a specified direction. |
wbt_downslope_index() |
Calculates the Hjerdt et al. (2004) downslope index. |
wbt_edge_density() |
Calculates the density of edges, or breaks-in-slope within DEMs. |
wbt_elev_above_pit() |
Calculate the elevation of each grid cell above the nearest downstream pit cell or grid edge cell. |
wbt_elev_percentile() |
Calculates the elevation percentile raster from a DEM. |
wbt_elev_relative_to_min_max() |
Calculates the elevation of a location relative to the minimum and maximum elevations in a DEM. |
wbt_elev_relative_to_watershed_min_max() |
Calculates the elevation of a location relative to the minimum and maximum elevations in a watershed. |
wbt_embankment_mapping() |
Maps and/or removes road embankments from an input fine-resolution DEM. |
wbt_exposure_towards_wind_flux() |
Evaluates hydrologic connectivity within a DEM |
wbt_feature_preserving_smoothing() |
Reduces short-scale variation in an input DEM using a modified Sun et al. (2007) algorithm. |
wbt_fetch_analysis() |
Performs an analysis of fetch or upwind distance to an obstacle. |
wbt_fill_missing_data() |
Fills NoData holes in a DEM. |
wbt_find_ridges() |
Identifies potential ridge and peak grid cells. |
wbt_gaussian_curvature() |
Calculates a mean curvature raster from an input DEM. |
wbt_gaussian_scale_space() |
Uses the fast Gaussian approximation algorithm to produce scaled land-surface parameter measurements from an input DEM. |
wbt_generating_function() |
This tool calculates generating function from an input DEM. |
wbt_geomorphons() |
Computes geomorphon patterns. |
wbt_hillshade() |
Calculates a hillshade raster from an input DEM. |
wbt_horizon_angle() |
Calculates horizon angle (maximum upwind slope) for each grid cell in an input DEM. |
wbt_horizontal_excess_curvature() |
This tool calculates horizontal excess curvature from an input DEM. |
wbt_hypsometrically_tinted_hillshade() |
Creates an colour shaded relief image from an input DEM. |
wbt_hypsometric_analysis() |
Calculates a hypsometric curve for one or more DEMs. |
wbt_local_hypsometric_analysis() |
This tool calculates a local, neighbourhood-based hypsometric integral raster. |
wbt_local_quadratic_regression() |
An implementation of the constrained quadratic regression algorithm using a flexible window size described in Wood (1996). |
wbt_map_off_terrain_objects() |
Maps off-terrain objects in a digital elevation model (DEM). |
wbt_max_anisotropy_dev() |
Calculates the maximum anisotropy (directionality) in elevation deviation over a range of spatial scales. |
wbt_max_anisotropy_dev_signature() |
Calculates the anisotropy in deviation from mean for points over a range of spatial scales. |
wbt_max_branch_length() |
Lindsay and Seibert’s (2013) branch length index is used to map drainage divides or ridge lines. |
wbt_max_difference_from_mean() |
Calculates the maximum difference from mean elevation over a range of spatial scales. |
wbt_max_downslope_elev_change() |
Calculates the maximum downslope change in elevation between a grid cell and its eight downslope neighbors. |
wbt_max_elevation_deviation() |
Calculates the maximum elevation deviation over a range of spatial scales. |
wbt_max_elev_dev_signature() |
Calculates the maximum elevation deviation over a range of spatial scales and for a set of points. |
wbt_maximal_curvature() |
Calculates a mean curvature raster from an input DEM. |
wbt_max_upslope_elev_change() |
Calculates the maximum upslope change in elevation between a grid cell and its eight downslope neighbors. |
wbt_mean_curvature() |
Calculates a mean curvature raster from an input DEM. |
wbt_min_downslope_elev_change() |
Calculates the minimum downslope change in elevation between a grid cell and its eight downslope neighbors. |
wbt_minimal_curvature() |
Calculates a mean curvature raster from an input DEM. |
wbt_multidirectional_hillshade() |
Calculates a multi-direction hillshade raster from an input DEM. |
wbt_multiscale_curvatures() |
This tool calculates several multiscale curvatures and curvature-based indices from an input DEM. |
wbt_multiscale_elevation_percentile() |
Calculates surface roughness over a range of spatial scales. |
wbt_multiscale_roughness() |
Calculates surface roughness over a range of spatial scales. |
wbt_multiscale_roughness_signature() |
Calculates the surface roughness for points over a range of spatial scales. |
wbt_multiscale_std_dev_normals() |
Calculates surface roughness over a range of spatial scales. |
wbt_multiscale_std_dev_normals_signature() |
Calculates the surface roughness for points over a range of spatial scales. |
wbt_multiscale_topographic_position_image() |
Creates a multiscale topographic position image from three DEVmax rasters of differing spatial scale ranges. |
wbt_num_downslope_neighbours() |
Calculates the number of downslope neighbours to each grid cell in a DEM. |
wbt_num_upslope_neighbours() |
Calculates the number of upslope neighbours to each grid cell in a DEM. |
wbt_openness() |
This tool calculates the topographic openness index from an input DEM. |
wbt_pennock_landform_class() |
Classifies hillslope zones based on slope, profile curvature, and plan curvature. |
wbt_percent_elev_range() |
Calculates percent of elevation range from a DEM. |
wbt_plan_curvature() |
Calculates a plan (contour) curvature raster from an input DEM. |
wbt_profile() |
Plots profiles from digital surface models. |
wbt_profile_curvature() |
Calculates a profile curvature raster from an input DEM. |
wbt_relative_aspect() |
Calculates relative aspect (relative to a user-specified direction) from an input DEM. |
wbt_relative_topographic_position() |
Calculates the relative topographic position index from a DEM. |
wbt_remove_off_terrain_objects() |
Removes off-terrain objects from a raster digital elevation model (DEM). |
wbt_ring_curvature() |
This tool calculates ring curvature from an input DEM. |
wbt_rotor() |
This tool calculates rotor from an input DEM. |
wbt_ruggedness_index() |
Calculates the Riley et al.’s (1999) terrain ruggedness index from an input DEM. |
wbt_sediment_transport_index() |
Calculates the sediment transport index. |
wbt_shadow_animation() |
This tool creates an animated GIF of shadows based on an input DEM. |
wbt_shadow_image() |
This tool creates a raster of shadow areas based on an input DEM. |
wbt_shape_index() |
This tool calculates the shape index from an input DEM. |
wbt_slope() |
Calculates a slope raster from an input DEM. |
wbt_slope_vs_aspect_plot() |
This tool creates a slope-aspect relation plot from an input DEM. |
wbt_slope_vs_elevation_plot() |
Creates a slope vs. elevation plot for one or more DEMs. |
wbt_smooth_vegetation_residual() |
This tool can smooth the residual roughness due to vegetation cover in LiDAR DEMs. |
wbt_spherical_std_dev_of_normals() |
Calculates the spherical standard deviation of surface normals for a DEM. |
wbt_standard_deviation_of_slope() |
Calculates the standard deviation of slope from an input DEM. |
wbt_stream_power_index() |
Calculates the relative stream power index. |
wbt_surface_area_ratio() |
Calculates a the surface area ratio of each grid cell in an input DEM. |
wbt_tangential_curvature() |
Calculates a tangential curvature raster from an input DEM. |
wbt_time_in_daylight() |
Calculates the proportion of time a location is not within an area of shadow. |
wbt_topographic_position_animation() |
This tool creates an animated GIF of multi-scale local topographic position (elevation deviation). |
wbt_topo_render() |
This tool creates a pseudo-3D rendering from an input DEM, for the purpose of effective topographic visualization. |
wbt_total_curvature() |
Calculates a total curvature raster from an input DEM. |
wbt_unsphericity() |
This tool calculates the unsphericity curvature from an input DEM. |
wbt_vertical_excess_curvature() |
This tool calculates vertical excess curvature from an input DEM. |
wbt_viewshed() |
Identifies the viewshed for a point or set of points. |
wbt_visibility_index() |
Estimates the relative visibility of sites in a DEM. |
wbt_wetness_index() |
Calculates the topographic wetness index, Ln(A / tan(slope)). |
| Function Name | Description |
|---|---|
wbt_average_flowpath_slope() |
Measures the average slope gradient from each grid cell to all upslope divide cells. |
wbt_average_upslope_flowpath_length() |
Measures the average length of all upslope flowpaths draining each grid cell. |
wbt_basins() |
Identifies drainage basins that drain to the DEM edge. |
wbt_breach_depressions() |
Breaches all of the depressions in a DEM using Lindsay’s (2016) algorithm. This should be preferred over depression filling in most cases. |
wbt_breach_depressions_least_cost() |
Breaches the depressions in a DEM using a least-cost pathway method. |
wbt_breach_single_cell_pits() |
Removes single-cell pits from an input DEM by breaching. |
wbt_burn_streams_at_roads() |
Burns-in streams at the sites of road embankments. |
wbt_d8_flow_accumulation() |
Calculates a D8 flow accumulation raster from an input DEM or flow pointer. |
wbt_d8_mass_flux() |
Performs a D8 mass flux calculation. |
wbt_d8_pointer() |
Calculates a D8 flow pointer raster from an input DEM. |
wbt_depth_in_sink() |
Measures the depth of sinks (depressions) in a DEM. |
wbt_depth_to_water() |
This tool calculates cartographic depth-to-water (DTW) index. |
wbt_d_inf_flow_accumulation() |
Calculates a D-infinity flow accumulation raster from an input DEM. |
wbt_d_inf_mass_flux() |
Performs a D-infinity mass flux calculation. |
wbt_d_inf_pointer() |
Calculates a D-infinity flow pointer (flow direction) raster from an input DEM. |
wbt_downslope_distance_to_stream() |
Measures distance to the nearest downslope stream cell. |
wbt_downslope_flowpath_length() |
Calculates the downslope flowpath length from each cell to basin outlet. |
wbt_edge_contamination() |
Identifies grid cells within an input DEM that may be impacted by edge contamination for hydrological applications. |
wbt_elevation_above_stream() |
Calculates the elevation of cells above the nearest downslope stream cell. |
wbt_elevation_above_stream_euclidean() |
Calculates the elevation of cells above the nearest (Euclidean distance) stream cell. |
wbt_fd8_flow_accumulation() |
Calculates an FD8 flow accumulation raster from an input DEM. |
wbt_fd8_pointer() |
Calculates an FD8 flow pointer raster from an input DEM. |
wbt_fill_burn() |
Burns streams into a DEM using the FillBurn (Saunders, 1999) method. |
wbt_fill_depressions() |
Fills all of the depressions in a DEM. Depression breaching should be preferred in most cases. |
wbt_fill_depressions_planchon_and_darboux() |
Fills all of the depressions in a DEM using the Planchon and Darboux (2002) method. |
wbt_fill_depressions_wang_and_liu() |
Fills all of the depressions in a DEM using the Wang and Liu (2006) method. Depression breaching should be preferred in most cases. |
wbt_fill_single_cell_pits() |
Raises pit cells to the elevation of their lowest neighbour. |
wbt_find_no_flow_cells() |
Finds grid cells with no downslope neighbours. |
wbt_find_parallel_flow() |
Finds areas of parallel flow in D8 flow direction rasters. |
wbt_flatten_lakes() |
Flattens lake polygons in a raster DEM. |
wbt_flood_order() |
Assigns each DEM grid cell its order in the sequence of inundations that are encountered during a search starting from the edges, moving inward at increasing elevations. |
wbt_flow_accumulation_full_workflow() |
Resolves all of the depressions in a DEM, outputting a breached DEM, an aspect-aligned non-divergent flow pointer, and a flow accumulation raster. |
wbt_flow_length_diff() |
Calculates the local maximum absolute difference in downslope flowpath length, useful in mapping drainage divides and ridges. |
wbt_hillslopes() |
Identifies the individual hillslopes draining to each link in a stream network. |
wbt_hydrologic_connectivity() |
This tool evaluates hydrologic connectivity within a DEM |
wbt_impoundment_size_index() |
Calculates the impoundment size resulting from damming a DEM. |
wbt_insert_dams() |
Calculates the impoundment size resulting from damming a DEM. |
wbt_isobasins() |
Divides a landscape into nearly equal sized drainage basins (i.e. watersheds). |
wbt_jenson_snap_pour_points() |
Moves outlet points used to specify points of interest in a watershedding operation to the nearest stream cell. |
wbt_longest_flowpath() |
Delineates the longest flowpaths for a group of subbasins or watersheds. |
wbt_low_points_on_headwater_divides() |
This tool locates saddle points along ridges within a digital elevation model (DEM) |
wbt_max_upslope_flowpath_length() |
Measures the maximum length of all upslope flowpaths draining each grid cell. |
wbt_max_upslope_value() |
Calculates the maximum upslope value from an input values raster along flowpaths. |
wbt_md_inf_flow_accumulation() |
Calculates an FD8 flow accumulation raster from an input DEM. |
wbt_num_inflowing_neighbours() |
Computes the number of inflowing neighbours to each cell in an input DEM based on the D8 algorithm. |
wbt_qin_flow_accumulation() |
Calculates Qin et al. (2007) flow accumulation. |
wbt_quinn_flow_accumulation() |
Calculates Quinn et al. (1995) flow accumulation. |
wbt_raise_walls() |
Raises walls in a DEM along a line or around a polygon, e.g. a watershed. |
wbt_rho8_flow_accumulation() |
Calculates Fairfield and Leymarie (1991) flow accumulation. |
wbt_rho8_pointer() |
Calculates a stochastic Rho8 flow pointer raster from an input DEM. |
wbt_river_centerlines() |
Maps river centerlines from an input water raster. |
wbt_sink() |
Identifies the depressions in a DEM, giving each feature a unique identifier. |
wbt_snap_pour_points() |
Moves outlet points used to specify points of interest in a watershedding operation to the cell with the highest flow accumulation in its neighbourhood. |
wbt_stochastic_depression_analysis() |
Performs a stochastic analysis of depressions within a DEM. |
wbt_strahler_order_basins() |
Identifies Strahler-order basins from an input stream network. |
wbt_subbasins() |
Identifies the catchments, or sub-basin, draining to each link in a stream network. |
wbt_trace_downslope_flowpaths() |
Traces downslope flowpaths from one or more target sites (i.e. seed points). |
wbt_unnest_basins() |
Extract whole watersheds for a set of outlet points. |
wbt_upslope_depression_storage() |
Estimates the average upslope depression storage depth. |
wbt_watershed() |
Identifies the watershed, or drainage basin, draining to a set of target cells. |
| Function Name | Description |
|---|---|
wbt_adaptive_filter() |
Performs an adaptive filter on an image. |
wbt_balance_contrast_enhancement() |
Performs a balance contrast enhancement on a colour-composite image of multispectral data. |
wbt_bilateral_filter() |
A bilateral filter is an edge-preserving smoothing filter introduced by Tomasi and Manduchi (1998). |
wbt_canny_edge_detection() |
This tool performs a Canny edge-detection filter on an input image. |
wbt_change_vector_analysis() |
Performs a change vector analysis on a two-date multi-spectral dataset. |
wbt_closing() |
A closing is a mathematical morphology operation involving an erosion (min filter) of a dilation (max filter) set. |
wbt_conservative_smoothing_filter() |
Performs a conservative-smoothing filter on an image. |
wbt_corner_detection() |
Identifies corner patterns in boolean images using hit-and-miss pattern matching. |
wbt_correct_vignetting() |
Corrects the darkening of images towards corners. |
wbt_create_colour_composite() |
Creates a colour-composite image from three bands of multispectral imagery. |
wbt_diff_of_gaussian_filter() |
Performs a Difference of Gaussian (DoG) filter on an image. |
wbt_direct_decorrelation_stretch() |
Performs a direct decorrelation stretch enhancement on a colour-composite image of multispectral data. |
wbt_diversity_filter() |
Assigns each cell in the output grid the number of different values in a moving window centred on each grid cell in the input raster. |
wbt_edge_preserving_mean_filter() |
Performs a simple edge-preserving mean filter on an input image. |
wbt_emboss_filter() |
Performs an emboss filter on an image, similar to a hillshade operation. |
wbt_evaluate_training_sites() |
This tool can be used to inspect the overlap in spectral signatures of training sites for various classes. |
wbt_fast_almost_gaussian_filter() |
Performs a fast approximate Gaussian filter on an image. |
wbt_flip_image() |
Reflects an image in the vertical or horizontal axis. |
wbt_gamma_correction() |
Performs a gamma correction on an input images. |
wbt_gaussian_contrast_stretch() |
Performs a Gaussian contrast stretch on input images. |
wbt_gaussian_filter() |
Performs a Gaussian filter on an image. |
wbt_generalize_classified_raster() |
Generalizes a raster containing class or object features by removing small features. |
wbt_generalize_with_similarity() |
Generalizes a raster containing class or object features by removing small features using similarity criteria of neighbouring features. |
wbt_high_pass_bilateral_filter() |
Performs a high-pass bilateral filter, by differencing an input image by the bilateral filter by Tomasi and Manduchi (1998). |
wbt_high_pass_filter() |
Performs a high-pass filter on an input image. |
wbt_high_pass_median_filter() |
Performs a high pass median filter on an input image. |
wbt_histogram_equalization() |
Performs a histogram equalization contrast enhancement on an image. |
wbt_histogram_matching() |
Alters the statistical distribution of a raster image matching it to a specified PDF. |
wbt_histogram_matching_two_images() |
Alters the cumulative distribution function of a raster image to that of another image. |
wbt_ihs_to_rgb() |
Converts intensity, hue, and saturation (IHS) images into red, green, and blue (RGB) images. |
wbt_image_segmentation() |
Performs a region-growing based segmentation on a set of multi-spectral images. |
wbt_image_slider() |
This tool creates an image slider from two input images. |
wbt_image_stack_profile() |
Plots an image stack profile (i.e. signature) for a set of points and multispectral images. |
wbt_integral_image() |
Transforms an input image (summed area table) into its integral image equivalent. |
wbt_k_nearest_mean_filter() |
A k-nearest mean filter is a type of edge-preserving smoothing filter. |
wbt_laplacian_filter() |
Performs a Laplacian filter on an image. |
wbt_laplacian_of_gaussian_filter() |
Performs a Laplacian-of-Gaussian (LoG) filter on an image. |
wbt_lee_sigma_filter() |
Performs a Lee (Sigma) smoothing filter on an image. |
wbt_line_detection_filter() |
Performs a line-detection filter on an image. |
wbt_line_thinning() |
Performs line thinning a on Boolean raster image; intended to be used with the RemoveSpurs tool. |
wbt_majority_filter() |
Assigns each cell in the output grid the most frequently occurring value (mode) in a moving window centred on each grid cell in the input raster. |
wbt_maximum_filter() |
Assigns each cell in the output grid the maximum value in a moving window centred on each grid cell in the input raster. |
wbt_mean_filter() |
Performs a mean filter (low-pass filter) on an input image. |
wbt_median_filter() |
Performs a median filter on an input image. |
wbt_min_dist_classification() |
Performs a supervised minimum-distance classification using training site polygons and multi-spectral images. |
wbt_minimum_filter() |
Assigns each cell in the output grid the minimum value in a moving window centred on each grid cell in the input raster. |
wbt_min_max_contrast_stretch() |
Performs a min-max contrast stretch on an input greytone image. |
wbt_mosaic() |
Mosaics two or more images together. |
wbt_mosaic_with_feathering() |
Mosaics two images together using a feathering technique in overlapping areas to reduce edge-effects. |
wbt_normalized_difference_index() |
Calculate a normalized-difference index (NDI) from two bands of multispectral image data. |
wbt_olympic_filter() |
Performs an olympic smoothing filter on an image. |
wbt_opening() |
An opening is a mathematical morphology operation involving a dilation (max filter) of an erosion (min filter) set. |
wbt_panchromatic_sharpening() |
Increases the spatial resolution of image data by combining multispectral bands with panchromatic data. |
wbt_parallelepiped_classification() |
Performs a supervised parallelepiped classification using training site polygons and multi-spectral images. |
wbt_percentage_contrast_stretch() |
Performs a percentage linear contrast stretch on input images. |
wbt_percentile_filter() |
Performs a percentile filter on an input image. |
wbt_piecewise_contrast_stretch() |
Performs a piecewise contrast stretch on an input image. |
wbt_prewitt_filter() |
Performs a Prewitt edge-detection filter on an image. |
wbt_range_filter() |
Assigns each cell in the output grid the range of values in a moving window centred on each grid cell in the input raster. |
wbt_remove_spurs() |
Removes the spurs (pruning operation) from a Boolean line image; intended to be used on the output of the LineThinning tool. |
wbt_resample() |
Resamples one or more input images into a destination image. |
wbt_rgb_to_ihs() |
Converts red, green, and blue (RGB) images into intensity, hue, and saturation (IHS) images. |
wbt_roberts_cross_filter() |
Performs a Robert’s cross edge-detection filter on an image. |
wbt_scharr_filter() |
Performs a Scharr edge-detection filter on an image. |
wbt_sigmoidal_contrast_stretch() |
Performs a sigmoidal contrast stretch on input images. |
wbt_sobel_filter() |
Performs a Sobel edge-detection filter on an image. |
wbt_split_colour_composite() |
Splits an RGB colour composite image into separate multispectral images. |
wbt_standard_deviation_contrast_stretch() |
Performs a standard-deviation contrast stretch on input images. |
wbt_standard_deviation_filter() |
Assigns each cell in the output grid the standard deviation of values in a moving window centred on each grid cell in the input raster. |
wbt_thicken_raster_line() |
Thickens single-cell wide lines within a raster image. |
wbt_tophat_transform() |
Performs either a white or black top-hat transform on an input image. |
wbt_total_filter() |
Performs a total filter on an input image. |
wbt_unsharp_masking() |
An image sharpening technique that enhances edges. |
wbt_user_defined_weights_filter() |
Performs a user-defined weights filter on an image. |
wbt_write_function_memory_insertion() |
Performs a write function memory insertion for single-band multi-date change detection. |
| Function Name | Description |
|---|---|
wbt_ascii_to_las() |
Converts one or more ASCII files containing LiDAR points into LAS files. |
wbt_classify_buildings_in_lidar() |
Reclassifies a LiDAR points that lie within vector building footprints. |
wbt_classify_lidar() |
Classify points within a LiDAR point cloud based on point properties. |
wbt_classify_overlap_points() |
Classifies or filters LAS points in regions of overlapping flight lines. |
wbt_clip_lidar_to_polygon() |
Clips a LiDAR point cloud to a vector polygon or polygons. |
wbt_colourize_based_on_class() |
Sets the RGB values of a LiDAR point cloud based on the point classification values. |
wbt_colourize_based_on_point_returns() |
Sets the RGB values of a LiDAR point cloud based on the point returns. |
wbt_erase_polygon_from_lidar() |
Erases (cuts out) a vector polygon or polygons from a LiDAR point cloud. |
wbt_filter_lidar() |
Filters points within a LiDAR point cloud based on point properties. |
wbt_filter_lidar_classes() |
Removes points in a LAS file with certain specified class values. |
wbt_filter_lidar_scan_angles() |
Removes points in a LAS file with scan angles greater than a threshold. |
wbt_find_flightline_edge_points() |
Identifies points along a flightline’s edge in a LAS file. |
wbt_flightline_overlap() |
Reads a LiDAR (LAS) point file and outputs a raster containing the number of overlapping flight-lines in each grid cell. |
wbt_height_above_ground() |
Normalizes a LiDAR point cloud, providing the height above the nearest ground-classified point. |
wbt_individual_tree_detection() |
Identifies points in a LiDAR point cloud that are associated with the tops of individual trees. |
wbt_las_to_ascii() |
Converts one or more LAS files into ASCII text files. |
wbt_las_to_laz() |
This tool converts one or more LAS files into the LAZ format |
wbt_las_to_multipoint_shapefile() |
Converts one or more LAS files into MultipointZ vector Shapefiles. When the input parameter is not specified, the tool grids all LAS files contained within the working directory. |
wbt_las_to_shapefile() |
Converts one or more LAS files into a vector Shapefile of POINT ShapeType. |
wbt_las_to_zlidar() |
Converts one or more LAS files into the zlidar compressed LiDAR data format. |
wbt_laz_to_las() |
This tool converts one or more LAZ files into the LAS format |
wbt_lidar_block_maximum() |
Creates a block-maximum raster from an input LAS file. When the input/output parameters are not specified, the tool grids all LAS files contained within the working directory. |
wbt_lidar_block_minimum() |
Creates a block-minimum raster from an input LAS file. When the input/output parameters are not specified, the tool grids all LAS files contained within the working directory. |
wbt_lidar_classify_subset() |
Classifies the values in one LiDAR point cloud that correspond with points in a subset cloud. |
wbt_lidar_colourize() |
Adds the red-green-blue colour fields of a LiDAR (LAS) file based on an input image. |
wbt_lidar_contour() |
This tool creates a vector contour coverage from an input LiDAR point file. |
wbt_lidar_digital_surface_model() |
Creates a top-surface digital surface model (DSM) from a LiDAR point cloud. |
wbt_lidar_eigenvalue_features() |
Calculate eigenvalue-based metrics from a LiDAR point cloud. |
wbt_lidar_elevation_slice() |
Outputs all of the points within a LiDAR (LAS) point file that lie between a specified elevation range. |
wbt_lidar_ground_point_filter() |
Identifies ground points within LiDAR dataset using a slope-based method. |
wbt_lidar_hex_binning() |
Hex-bins a set of LiDAR points. |
wbt_lidar_hillshade() |
Calculates a hillshade value for points within a LAS file and stores these data in the RGB field. |
wbt_lidar_histogram() |
Creates a histogram of LiDAR data. |
wbt_lidar_idw_interpolation() |
Interpolates LAS files using an inverse-distance weighted (IDW) scheme. When the input/output parameters are not specified, the tool interpolates all LAS files contained within the working directory. |
wbt_lidar_info() |
Prints information about a LiDAR (LAS) dataset, including header, point return frequency, and classification data and information about the variable length records (VLRs) and geokeys. |
wbt_lidar_join() |
Joins multiple LiDAR (LAS) files into a single LAS file. |
wbt_lidar_kappa_index() |
Performs a kappa index of agreement (KIA) analysis on the classifications of two LAS files. |
wbt_lidar_nearest_neighbour_gridding() |
Grids LiDAR files using nearest-neighbour scheme. When the input/output parameters are not specified, the tool grids all LAS files contained within the working directory. |
wbt_lidar_point_density() |
Calculates the spatial pattern of point density for a LiDAR data set. When the input/output parameters are not specified, the tool grids all LAS files contained within the working directory. |
wbt_lidar_point_return_analysis() |
This tool performs a quality control check on the return values of points in a LiDAR file. |
wbt_lidar_point_stats() |
Creates several rasters summarizing the distribution of LAS point data. When the input/output parameters are not specified, the tool works on all LAS files contained within the working directory. |
wbt_lidar_ransac_planes() |
Performs a RANSAC analysis to identify points within a LiDAR point cloud that belong to linear planes. |
wbt_lidar_rbf_interpolation() |
Interpolates LAS files using a radial basis function (RBF) scheme. When the input/output parameters are not specified, the tool interpolates all LAS files contained within the working directory. |
wbt_lidar_remove_duplicates() |
Removes duplicate points from a LiDAR data set. |
wbt_lidar_remove_outliers() |
Removes outliers (high and low points) in a LiDAR point cloud. |
wbt_lidar_rooftop_analysis() |
Identifies roof segments in a LiDAR point cloud. |
wbt_lidar_segmentation() |
Segments a LiDAR point cloud based on differences in the orientation of fitted planar surfaces and point proximity. |
wbt_lidar_segmentation_based_filter() |
Identifies ground points within LiDAR point clouds using a segmentation based approach. |
wbt_lidar_shift() |
Shifts the x,y,z coordinates of a LiDAR file. |
wbt_lidar_sibson_interpolation() |
This tool interpolates one or more LiDAR tiles using Sibson’s natural neighbour method. |
wbt_lidar_thin() |
Thins a LiDAR point cloud, reducing point density. |
wbt_lidar_thin_high_density() |
Thins points from high density areas within a LiDAR point cloud. |
wbt_lidar_tile() |
Tiles a LiDAR LAS file into multiple LAS files. |
wbt_lidar_tile_footprint() |
Creates a vector polygon of the convex hull of a LiDAR point cloud. When the input/output parameters are not specified, the tool works with all LAS files contained within the working directory. |
wbt_lidar_tin_gridding() |
Creates a raster grid based on a Delaunay triangular irregular network (TIN) fitted to LiDAR points. |
wbt_lidar_tophat_transform() |
Performs a white top-hat transform on a Lidar dataset; as an estimate of height above ground, this is useful for modelling the vegetation canopy. |
wbt_modify_lidar() |
Modify points within a LiDAR point cloud based on point properties. |
wbt_normalize_lidar() |
Normalizes a LiDAR point cloud. |
wbt_normal_vectors() |
Calculates normal vectors for points within a LAS file and stores these data (XYZ vector components) in the RGB field. |
wbt_recover_flightline_info() |
Associates LiDAR points by their flightlines. |
wbt_select_tiles_by_polygon() |
Copies LiDAR tiles overlapping with a polygon into an output directory. |
wbt_sort_lidar() |
Sorts LiDAR points based on their properties. |
wbt_split_lidar() |
Splits LiDAR points up into a series of new files based on their properties. |
wbt_zlidar_to_las() |
Converts one or more zlidar files into the LAS data format. |
| Function Name | Description |
|---|---|
wbt_dbscan() |
Performs a DBSCAN-based unsupervised clustering operation. |
wbt_k_means_clustering() |
Performs a k-means clustering operation on a multi-spectral dataset. |
wbt_knn_classification() |
Performs a supervised k-nearest neighbour classification using training site polygons/points and predictor rasters. |
wbt_knn_regression() |
Performs a supervised k-nearest neighbour regression using training site points and predictor rasters. |
wbt_logistic_regression() |
Performs a logistic regression analysis using training site polygons/points and predictor rasters. |
wbt_modified_k_means_clustering() |
Performs a modified k-means clustering operation on a multi-spectral dataset. |
wbt_random_forest_classification() |
Performs a supervised random forest classification using training site polygons/points and predictor rasters. |
wbt_random_forest_regression() |
Performs a random forest regression analysis using training site data and predictor rasters. |
wbt_svm_classification() |
Performs an SVM binary classification using training site polygons/points and multiple input images. |
wbt_svm_regression() |
Performs a supervised SVM regression analysis using training site points and predictor rasters. |
| Function Name | Description |
|---|---|
wbt_absolute_value() |
Calculates the absolute value of every cell in a raster. |
wbt_add() |
Performs an addition operation on two rasters or a raster and a constant value. |
wbt_and() |
Performs a logical AND operator on two Boolean raster images. |
wbt_anova() |
Performs an analysis of variance (ANOVA) test on a raster dataset. |
wbt_arc_cos() |
Returns the inverse cosine (arccos) of each values in a raster. |
wbt_arcosh() |
Returns the inverse hyperbolic cosine (arcosh) of each values in a raster. |
wbt_arc_sin() |
Returns the inverse sine (arcsin) of each values in a raster. |
wbt_arc_tan() |
Returns the inverse tangent (arctan) of each values in a raster. |
wbt_arsinh() |
Returns the inverse hyperbolic sine (arsinh) of each values in a raster. |
wbt_artanh() |
Returns the inverse hyperbolic tangent (arctanh) of each values in a raster. |
wbt_atan2() |
Returns the 2-argument inverse tangent (atan2). |
wbt_attribute_correlation() |
Performs a correlation analysis on attribute fields from a vector database. |
wbt_attribute_correlation_neighbourhood_analysis() |
Performs a correlation on two input vector attributes within a neighbourhood search windows. |
wbt_attribute_histogram() |
Creates a histogram for the field values of a vector’s attribute table. |
wbt_attribute_scattergram() |
Creates a scattergram for two field values of a vector’s attribute table. |
wbt_ceil() |
Returns the smallest (closest to negative infinity) value that is greater than or equal to the values in a raster. |
wbt_conditional_evaluation() |
Performs a conditional evaluation (if-then-else) operation on a raster. |
wbt_conditioned_latin_hypercube() |
Implements conditioned Latin Hypercube sampling. |
wbt_cos() |
Returns the cosine (cos) of each values in a raster. |
wbt_cosh() |
Returns the hyperbolic cosine (cosh) of each values in a raster. |
wbt_crispness_index() |
Calculates the Crispness Index, which is used to quantify how crisp (or conversely how fuzzy) a probability image is. |
wbt_cross_tabulation() |
Performs a cross-tabulation on two categorical images. |
wbt_cumulative_distribution() |
Converts a raster image to its cumulative distribution function. |
wbt_decrement() |
Decreases the values of each grid cell in an input raster by 1.0 (see also InPlaceSubtract). |
wbt_divide() |
Performs a division operation on two rasters or a raster and a constant value. |
wbt_equal_to() |
Performs a equal-to comparison operation on two rasters or a raster and a constant value. |
wbt_exp() |
Returns the exponential (base e) of values in a raster. |
wbt_exp2() |
Returns the exponential (base 2) of values in a raster. |
wbt_floor() |
Returns the largest (closest to positive infinity) value that is less than or equal to the values in a raster. |
wbt_greater_than() |
Performs a greater-than comparison operation on two rasters or a raster and a constant value. |
wbt_image_autocorrelation() |
Performs Moran’s I analysis on two or more input images. |
wbt_image_correlation() |
Performs image correlation on two or more input images. |
wbt_image_correlation_neighbourhood_analysis() |
Performs image correlation on two input images neighbourhood search windows. |
wbt_image_regression() |
Performs image regression analysis on two input images. |
wbt_increment() |
Increases the values of each grid cell in an input raster by 1.0. (see also InPlaceAdd) |
wbt_in_place_add() |
Performs an in-place addition operation (input1 += input2). |
wbt_in_place_divide() |
Performs an in-place division operation (input1 /= input2). |
wbt_in_place_multiply() |
Performs an in-place multiplication operation (input1 *= input2). |
wbt_in_place_subtract() |
Performs an in-place subtraction operation (input1 -= input2). |
wbt_integer_division() |
Performs an integer division operation on two rasters or a raster and a constant value. |
wbt_inverse_pca() |
This tool performs an inverse principal component analysis on a series of input component images. |
wbt_is_no_data() |
Identifies NoData valued pixels in an image. |
wbt_kappa_index() |
Performs a kappa index of agreement (KIA) analysis on two categorical raster files. |
wbt_ks_test_for_normality() |
Evaluates whether the values in a raster are normally distributed. |
wbt_less_than() |
Performs a less-than comparison operation on two rasters or a raster and a constant value. |
wbt_list_unique_values() |
Lists the unique values contained in a field within a vector’s attribute table. |
wbt_list_unique_values_raster() |
Lists the unique values contained in a field within a vector’s attribute table. |
wbt_ln() |
Returns the natural logarithm of values in a raster. |
wbt_log10() |
Returns the base-10 logarithm of values in a raster. |
wbt_log2() |
Returns the base-2 logarithm of values in a raster. |
wbt_max() |
Performs a MAX operation on two rasters or a raster and a constant value. |
wbt_min() |
Performs a MIN operation on two rasters or a raster and a constant value. |
wbt_modulo() |
Performs a modulo operation on two rasters or a raster and a constant value. |
wbt_multiply() |
Performs a multiplication operation on two rasters or a raster and a constant value. |
wbt_negate() |
Changes the sign of values in a raster or the 0-1 values of a Boolean raster. |
wbt_not() |
Performs a logical NOT operator on two Boolean raster images. |
wbt_not_equal_to() |
Performs a not-equal-to comparison operation on two rasters or a raster and a constant value. |
wbt_or() |
Performs a logical OR operator on two Boolean raster images. |
wbt_paired_sample_t_test() |
Performs a 2-sample K-S test for significant differences on two input rasters. |
wbt_phi_coefficient() |
This tool performs a binary classification accuracy assessment. |
wbt_power() |
Raises the values in grid cells of one rasters, or a constant value, by values in another raster or constant value. |
wbt_principal_component_analysis() |
Performs a principal component analysis (PCA) on a multi-spectral dataset. |
wbt_quantiles() |
Transforms raster values into quantiles. |
wbt_random_field() |
Creates an image containing random values. |
wbt_random_sample() |
Creates an image containing randomly located sample grid cells with unique IDs. |
wbt_raster_calculator() |
Performs a complex mathematical operations on one or more input raster images on a cell-to-cell basis. |
wbt_raster_histogram() |
Creates a histogram from raster values. |
wbt_raster_summary_stats() |
Measures a rasters min, max, average, standard deviation, num. non-nodata cells, and total. |
wbt_reciprocal() |
Returns the reciprocal (i.e. 1 / z) of values in a raster. |
wbt_rescale_value_range() |
Performs a min-max contrast stretch on an input greytone image. |
wbt_root_mean_square_error() |
Calculates the RMSE and other accuracy statistics. |
wbt_round() |
Rounds the values in an input raster to the nearest integer value. |
wbt_sin() |
Returns the sine (sin) of each values in a raster. |
wbt_sinh() |
Returns the hyperbolic sine (sinh) of each values in a raster. |
wbt_square() |
Squares the values in a raster. |
wbt_square_root() |
Returns the square root of the values in a raster. |
wbt_subtract() |
Performs a differencing operation on two rasters or a raster and a constant value. |
wbt_tan() |
Returns the tangent (tan) of each values in a raster. |
wbt_tanh() |
Returns the hyperbolic tangent (tanh) of each values in a raster. |
wbt_to_degrees() |
Converts a raster from radians to degrees. |
wbt_to_radians() |
Converts a raster from degrees to radians. |
wbt_trend_surface() |
Estimates the trend surface of an input raster file. |
wbt_trend_surface_vector_points() |
Estimates a trend surface from vector points. |
wbt_truncate() |
Truncates the values in a raster to the desired number of decimal places. |
wbt_turning_bands_simulation() |
Creates an image containing random values based on a turning-bands simulation. |
wbt_two_sample_ks_test() |
Performs a 2-sample K-S test for significant differences on two input rasters. |
wbt_wilcoxon_signed_rank_test() |
Performs a 2-sample K-S test for significant differences on two input rasters. |
wbt_xor() |
Performs a logical XOR operator on two Boolean raster images. |
wbt_zonal_statistics() |
Extracts descriptive statistics for a group of patches in a raster. |
wbt_z_scores() |
Standardizes the values in an input raster by converting to z-scores. |
| Function Name | Description |
|---|---|
wbt_reconcile_multiple_headers() |
This tool adjusts the crop yield values for data sets collected with multiple headers or combines. |
wbt_recreate_pass_lines() |
This tool can be used to approximate the harvester pass lines from yield points. |
wbt_remove_field_edge_points() |
This tool can be used to remove, or flag, most of the points along the edges from a crop yield data set. |
wbt_yield_filter() |
Filters crop yield values of point data derived from combine harvester yield monitors. |
wbt_yield_map() |
This tool can be used to create a segmented-vector polygon yield map from a set of harvester points. |
wbt_yield_normalization() |
This tool can be used to normalize the yield points for a field. |
| Function Name | Description |
|---|---|
wbt_distance_to_outlet() |
Calculates the distance of stream grid cells to the channel network outlet cell. |
wbt_extract_streams() |
Extracts stream grid cells from a flow accumulation raster. |
wbt_extract_valleys() |
Identifies potential valley bottom grid cells based on local topolography alone. |
wbt_farthest_channel_head() |
Calculates the distance to the furthest upstream channel head for each stream cell. |
wbt_find_main_stem() |
Finds the main stem, based on stream lengths, of each stream network. |
wbt_hack_stream_order() |
Assigns the Hack stream order to each tributary in a stream network. |
wbt_horton_stream_order() |
Assigns the Horton stream order to each tributary in a stream network. |
wbt_length_of_upstream_channels() |
Calculates the total length of channels upstream. |
wbt_long_profile() |
Plots the stream longitudinal profiles for one or more rivers. |
wbt_long_profile_from_points() |
Plots the longitudinal profiles from flow-paths initiating from a set of vector points. |
wbt_rasterize_streams() |
Rasterizes vector streams based on Lindsay (2016) method. |
wbt_raster_streams_to_vector() |
Converts a raster stream file into a vector file. |
wbt_remove_short_streams() |
Removes short first-order streams from a stream network. |
wbt_repair_stream_vector_topology() |
This tool resolves topological errors and inconsistencies associated with digitized vector streams. |
wbt_shreve_stream_magnitude() |
Assigns the Shreve stream magnitude to each link in a stream network. |
wbt_strahler_stream_order() |
Assigns the Strahler stream order to each link in a stream network. |
wbt_stream_link_class() |
Identifies the exterior/interior links and nodes in a stream network. |
wbt_stream_link_identifier() |
Assigns a unique identifier to each link in a stream network. |
wbt_stream_link_length() |
Estimates the length of each link (or tributary) in a stream network. |
wbt_stream_link_slope() |
Estimates the average slope of each link (or tributary) in a stream network. |
wbt_stream_slope_continuous() |
Estimates the slope of each grid cell in a stream network. |
wbt_topological_stream_order() |
Assigns each link in a stream network its topological order. |
wbt_tributary_identifier() |
Assigns a unique identifier to each tributary in a stream network. |
wbt_vector_stream_network_analysis() |
This tool performs common stream network analysis operations on an input vector stream file. |
| Function Name | Description |
|---|---|
wbt_install_wb_extension() |
Use to install a Whitebox extension product. |
wbt_launch_wb_runner() |
Opens the Whitebox Runner application. |


Please enter your belief ( 2000 characters or fewer. Letters only)
Please enter your some reasons for your success ( 2000 characters or fewer. Letters only)


Trial includes:
- [>1_SPACE<] of disk space
- Safe filestorage
- Maximum encryption strength (RSA 4096, AES 256)
- Protection of user data (contacts, settings)
- Contact verification (for internal adresses)
- Maximum aliases: [>1_ALIASES<]
- Maximum channel members (recipients of your mail): [>1_RECIPIENTS<]
- Maximum attached files with every sent message: [>1_MAX_FILES<]
- Each attached file can be maximum [>1_FILE_SIZE<]
- Each sent message can be maximum [>1_MESSAGE_SIZE<] (in summary with attaches)
- Maximum message lifetime: [>1_TTL<] year
- Unlimited incoming and outgoing messages
- Group messages by subject (chat-like mailing)
- Sorting incoming messages by folders (by sender email or recipient alias)
- Messages self-destruction by timer
- Secure feedback for websites
- Free apps for iOS & Android
- 2x factor authentication (Google Authenticator)


{{checkbox "TicketsUseTXTTranscripts" "tickets-create-transcripts-checkbox2" `Create .txt transcripts when tickets close` .PluginSettings.TicketsUseTXTTranscripts}}
{{checkbox "DownloadAttachments" "tickets-download-att-checkbox2" `Download and archive attachments when closing the ticket` .PluginSettings.DownloadAttachments}}


WaDE2.0 [WaDE2.01.xml]
| PK | Name | Data Type | NULL | Auto | Default | Comment | FK |
| RegulatoryOverlayUUID | NVarChar(250) | Foreign key unique identifier to RegulatoryOverlay_dim table. | |||||
| OversightAgency | NVarChar(250) | The name of the agency / governing body providing oversight for the regulation. | |||||
| RegulatoryDescription | BigInt | A description of the regulation. | |||||
| RegulatoryName | NVarChar(50) | The name of the regulation | |||||
| RegulatoryOverlayNativeID | NVarChar(250) | Unique identifier code / ID used by the data provider to distinguish the regulatory overlay area in the source data. | |||||
| RegulatoryOverlayTypeCV | NVarChar(250) |
| The high level description of the regulatory overlaytype recognized by the data provider. | ||||
| RegulatoryStatusCV | NVarChar(50) | Status of the regulation (e.g., initiated, in effect, efc.). | |||||
| RegulatoryStatute | NVarChar(500) |
| Legal statute(s) ID / name related to the regulation (e.g., 56-78134). | ||||
| RegulatoryStatuteLink | NVarChar(500) |
| A link to the legal statute(s) related to the regulation (e.g., https://le.utah.gov/xcode/code.html). | ||||
| StatutoryEffectiveDate | Date | The start date of the legal statute(s) began. Format of MM/DD/YYYY. | |||||
| StatutoryEndDate | Date |
| The end date of the legal statute(s) ends. Format of MM/DD/YYYY. | ||||
| WaterSourceTypeCV | NVarChar(100) |
| The high level description of the water source type (e.g., surface water, groundwater, mixed, reuse, etc.) |
(none)
(none)
(none)
| Diagram Name |
| 6_InputTables |


Countries and Events
Explore how different countries performed in different Olympic events
Choose which countries to explore data on:
All Countries
Reset
Olympic Sport
Country


{% extends "sphene/community/base.html" %}
{% load i18n %}
{% block content %}
{% blocktrans %}If you have forgotten your username or password, you can enter your
email address here. You will then receive your username and a newly
generated password by email.{% endblocktrans %}


This tutorial is just a summary/partial copy of what is provided in more details by Dan Becker on Kaggle to help me come back faster to the pieces I want to re-use.
Instead of going through these notes first, I would recommend going through the original tutorials. There, pre-made Kaggle kernels (~ Jupyter notebooks), not copied here, allow you to run the techniques you have just learned in a fun way through Q&A. Highly recommended!
No prerequesites: Kaggle kernels runs perfectly in the browser.
Dan Becker, Head of Kaggle Learn is teaching us how to extract insights from a Machine Learning (ML) model, sometimes considered as a "black box".
Are most ML models really "black boxes"?
His short course aims at teaching us techniques to explain the findings from sophisticated machine learning models.
Why and when do you need insights in Machine Learning?

Compared to most other approaches, Permutation Importance is:
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
data = pd.read_csv('../input/fifa-2018-match-statistics/FIFA 2018 Statistics.csv')
y = (data['Man of the Match'] == "Yes") # Convert from string "Yes"/"No" to binary
feature_names = [i for i in data.columns if data[i].dtype in [np.int64]]
X = data[feature_names]
train_X, val_X, train_y, val_y = train_test_split(X, y, random_state=1)
my_model = RandomForestClassifier(random_state=0).fit(train_X, train_y)
# Here is how to calculate and show importances with the eli5 library:
import eli5
from eli5.sklearn import PermutationImportance
perm = PermutationImportance(my_model, random_state=1).fit(val_X, val_y)
eli5.show_weights(perm, feature_names = val_X.columns.tolist())
In this exercise, we learn:
While Feature Importance shows what variables most affect predictions,
Partial Dependence plots show how a feature affects predictions.
This is useful to answer questions like:
In the description above, we used only a single row of data. Interactions between features may cause the plot for a single row to be atypical.
Model building:
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.tree import DecisionTreeClassifier
data = pd.read_csv('../input/fifa-2018-match-statistics/FIFA 2018 Statistics.csv')
y = (data['Man of the Match'] == "Yes") # Convert from string "Yes"/"No" to binary
feature_names = [i for i in data.columns if data[i].dtype in [np.int64]]
X = data[feature_names]
train_X, val_X, train_y, val_y = train_test_split(X, y, random_state=1)
tree_model = DecisionTreeClassifier(random_state=0, max_depth=5, min_samples_split=5).fit(train_X, train_y)
Representation of the Decision Tree used in this example:
from sklearn import tree
import graphviz
tree_graph = tree.export_graphviz(tree_model, out_file=None, feature_names=feature_names)
graphviz.Source(tree_graph)
As guidance to read the tree:
Here is the code to create the Partial Dependence Plot using the PDPBox library (the Python Partial Dependence Plot toolBox).
from matplotlib import pyplot as plt
from pdpbox import pdp, get_dataset, info_plots
# Create the data that we will plot
pdp_goals = pdp.pdp_isolate(model=tree_model, dataset=val_X, model_features=feature_names, feature='Goal Scored')
# plot it
pdp.pdp_plot(pdp_goals, 'Goal Scored')
plt.show()
A few items are worth pointing out as you interpret this plot:
From this particular graph, we see that scoring a goal substantially increases your chances of winning "Player of The Game." But extra goals beyond that appear to have little impact on predictions.
Here is another example plot:
feature_to_plot = 'Distance Covered (Kms)'
pdp_dist = pdp.pdp_isolate(model=tree_model, dataset=val_X, model_features=feature_names, feature=feature_to_plot)
pdp.pdp_plot(pdp_dist, feature_to_plot)
plt.show()
This graph seems too simple to represent reality. But that's because the model is so simple. You should be able to see from the decision tree above that this is representing exactly the model's structure.
You can easily compare the structure or implications of different models. Here is the same plot with a Random Forest model.
# Build Random Forest model
rf_model = RandomForestClassifier(random_state=0).fit(train_X, train_y)
pdp_dist = pdp.pdp_isolate(model=rf_model, dataset=val_X, model_features=feature_names, feature=feature_to_plot)
pdp.pdp_plot(pdp_dist, feature_to_plot)
plt.show()
This model thinks you are more likely to win "Player of The Game" if your players run a total of 100km over the course of the game. Though running much more causes lower predictions.
In general, the smooth shape of this curve seems more plausible than the step function from the simpler Decision Tree model. Though this dataset is small enough that we would be careful in how we interpret any model.
If you are curious about interactions between features, 2D partial dependence plots are also useful. An example may clarify what this.
We will again use the Decision Tree model for this graph. It will create an extremely simple plot, but you should be able to match what you see in the plot to the tree itself.
# Similar to previous PDP plot except we use pdp_interact instead of pdp_isolate and pdp_interact_plot instead of pdp_isolate_plot
features_to_plot = ['Goal Scored', 'Distance Covered (Kms)']
inter1 = pdp.pdp_interact(model=tree_model, dataset=val_X, model_features=feature_names, features=features_to_plot)
pdp.pdp_interact_plot(pdp_interact_out=inter1, feature_names=features_to_plot, plot_type='contour')
plt.show()
This graph shows predictions for any combination of Goals Scored and Distance covered.
For example, we see the highest predictions is obtained:
In this exercise, we learn to create partial dependence plots:
You've seen (and used) techniques to extract general insights from a machine learning model (Permutation Importance, Partial Dependence Plots). What if you want to break down how the model works for an individual prediction?
SHAP Values (an acronym from SHapley Additive exPlanations) break down a prediction to show the impact of each feature on a trained model.
Where could you use this?
Use SHAP Values to explain individual predictions in this lesson. In the next lesson, you'll see how these can be aggregated into powerful model-level insights.
SHAP values interpret the impact of having a certain value for a given feature in comparison to the prediction we'd make if that feature took some baseline value.
In previous sections, we predicted whether a team would have a player win the "Man of the Game" award.
We could ask:
But it's easier to give a concrete, numeric answer if we restate this as:
Of course, each team has many features. So if we answer this question for number of goals, we could repeat the process for all other features.
SHAP values do this in a way that guarantees a nice property. When we make a prediction:
sum(SHAP values for all features) = pred_for_team - pred_for_baseline_values
That is, the SHAP values of all features sum up to explain why my prediction was different from the baseline. This allows us to decompose a prediction in a graph like this:
How do you interpret this?
There is some complexity to the technique, to ensure that the baseline plus the sum of individual effects adds up to the prediction (which isn't as straightforward as it sounds.) We won't go into that detail here, since it isn't critical for using the technique. This blog post has a longer theoretical explanation.
We calculate SHAP values using the wonderful Shap library.
For this example, we'll reuse the model you've already seen with the Soccer data.
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
data = pd.read_csv('../input/fifa-2018-match-statistics/FIFA 2018 Statistics.csv')
y = (data['Man of the Match'] == "Yes") # Convert from string "Yes"/"No" to binary
feature_names = [i for i in data.columns if data[i].dtype in [np.int64, np.int64]]
X = data[feature_names]
train_X, val_X, train_y, val_y = train_test_split(X, y, random_state=1)
my_model = RandomForestClassifier(random_state=0).fit(train_X, train_y)
We will look at SHAP values for a single row of the dataset (we arbitrarily chose row 5). For context, we'll look at the raw predictions before looking at the SHAP values
row_to_show = 5
data_for_prediction = val_X.iloc[row_to_show] # use 1 row of data here. Could use multiple rows if desired
data_for_prediction_array = data_for_prediction.values.reshape(1, -1)
my_model.predict_proba(data_for_prediction_array)
# array([[0.3, 0.7]])
The team is 70% likely to have a player win the award.
Now, we'll move onto the code to get SHAP values for that single prediction.
import shap # package used to calculate Shap values
# Create object that can calculate shap values
explainer = shap.TreeExplainer(my_model)
# Calculate Shap values
shap_values = explainer.shap_values(data_for_prediction)
The shap_values object above is a list with two arrays:
It's cumbersome to review raw arrays, but the shap package has a nice way to visualize the results.
shap.initjs()
shap.force_plot(explainer.expected_value[1], shap_values[1], data_for_prediction)
which generates the image you have seen already:
If you look carefully at the code where we created the SHAP values, you'll notice we reference Trees in shap.TreeExplainer(my_model)
. But the SHAP package has explainers for every type of model.
shap.DeepExplainer
works with Deep Learning models.shap.KernelExplainer
works with all models, though it is slower than other Explainers and it offers an approximation rather than exact Shap values.Here is an example using KernelExplainer to get similar results. The results aren't identical because kernelExplainer gives an approximate result. But the results tell the same story.
# use Kernel SHAP to explain test set predictions
k_explainer = shap.KernelExplainer(my_model.predict_proba, train_X)
k_shap_values = k_explainer.shap_values(data_for_prediction)
shap.force_plot(k_explainer.expected_value[1], k_shap_values[1], data_for_prediction)
In this exercise, we learn:
Aggregate SHAP values for even more detailed model insights
Recap: Shap values show how much a given feature changed our prediction (compared to if we made that prediction at some baseline value of that feature).
In addition to this nice breakdown for each prediction, the Shap library offers great visualizations of groups of Shap values. We will focus on two of these visualizations. These visualizations have conceptual similarities to permutation importance and partial dependence plots. So multiple threads from the previous exercises will come together here.
SHAP summary plot is a birds-eye view of feature importance and what is driving it.
This plot is made of many dots. Each dot has three characteristics:
For example, the point in the upper left was for a team that scored few goals, reducing the prediction by 0.25 from the baseline.
Some things you should be able to easily pick out:
Red
and Yellow & Red
features.Goal scored
caused higher predictions, and low values caused low predictions.If you look for long enough, there's a lot of information in this graph. You'll face some questions to test how you read them in the exercise.
We get the SHAP values for all validation data with the following code. It is short enough that we explain it in the comments.
import shap # package used to calculate Shap values
# Create object that can calculate shap values
explainer = shap.TreeExplainer(my_model)
# calculate shap values. This is what we will plot.
# Calculate shap_values for all of val_X rather than a single row, to have more data for plot.
shap_values = explainer.shap_values(val_X)
# Make plot. Index of [1] is explained in text below.
shap.summary_plot(shap_values[1], val_X)
The code isn't too complex. But there are a few caveats.
shap_values[1]
. For classification problems, there is a separate array of SHAP values for each possible outcome. In this case, we index in to get the SHAP values for the prediction of "True".XGBOOST
model, which SHAP has some optimizations for and which is thus much faster.This provides a great overview of the model, but we might want to delve into a single feature. That's where SHAP dependence contribution plots come into play.
Partial Dependence Plots help show how a single feature impacts predictions.
These are insightful and relevant for many real-world use cases. Plus, with a little effort, they can be explained to a non-technical audience.
But there's a lot they don't show. For instance, what is the distribution of effects? Is the effect of having a certain value pretty constant, or does it vary a lot depending on the values of other feaures.
SHAP dependence contribution plots provide a similar insight to PDP's, but they add a lot more detail.
Start by focusing on the shape, and we'll come back to color in a minute.
The fact this slopes upward says that the more you possess the ball, the higher the model's prediction is for winning the Man of the Game award.
The spread suggests that other features must interact with Ball Possession %
.
For example, here we have highlighted two points with similar ball possession values. That value caused one prediction to increase, and it caused the other prediction to decrease.
For comparison, a simple linear regression would produce plots that are perfect lines, without this spread.
This suggests we delve into the interactions, and the plots include color coding to help do that. While the primary trend is upward, you can visually inspect whether that varies by dot color.
Consider the following very narrow example for concreteness.
Outside of those few outliers, the interaction indicated by color isn't very dramatic here. But sometimes it will jump out at you.
We get the dependence contribution plot with the following code. The only line that's different from the summary_plot
is the last line.
import shap # package used to calculate Shap values
# Create object that can calculate shap values
explainer = shap.TreeExplainer(my_model)
# calculate shap values. This is what we will plot.
shap_values = explainer.shap_values(X)
# make plot.
shap.dependence_plot('Ball Possession %', shap_values[1], X, interaction_index="Goal Scored")
If you don't supply an argument for interaction_index
, Shapley uses some logic to pick one that may be interesting.
This didn't require writing a lot of code. But the trick with these techniques is in thinking critically about the results rather than writing code itself.
In this exercise, we learn to examin the distribution of effects for each feature (SHAP summary plots, SHAP Dependence plots), rather than just an average effect for each feature (Permutation Importance plot and PDP plot). They may take a while to run though!
As you write code to work through your scenario, these code snippets from various sections of the course may be useful.
Starting from one of these simple models:
# Readmission at the hospital
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
data = pd.read_csv('../input/hospital-readmissions/train.csv')
y = data.readmitted
base_features = [c for c in data.columns if c != "readmitted"]
X = data[base_features]
train_X, val_X, train_y, val_y = train_test_split(X, y, random_state=1)
my_model = RandomForestClassifier(n_estimators=30, random_state=1).fit(train_X, train_y)
or
# Winning Man of the Game in football
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
data = pd.read_csv('../input/fifa-2018-match-statistics/FIFA 2018 Statistics.csv')
y = (data['Man of the Match'] == "Yes") # Convert from string "Yes"/"No" to binary
feature_names = [i for i in data.columns if data[i].dtype in [np.int64, np.int64]]
X = data[feature_names]
train_X, val_X, train_y, val_y = train_test_split(X, y, random_state=1)
my_model = RandomForestClassifier(random_state=0).fit(train_X, train_y)
import eli5
from eli5.sklearn import PermutationImportance
perm = PermutationImportance(my_model, random_state=1).fit(val_X, val_y)
eli5.show_weights(perm, feature_names = val_X.columns.tolist())
Pros
Permutation Importance is great because it creates simple numeric measures to see which features mattered to a model.
This helped us make comparisons between features easily, and you can present the resulting graphs to non-technical audiences.
Cons
But Permutation Importance doesn't tell you how each features matter. If a feature has medium permutation importance, that could mean it has
a large effect for a few predictions, but no effect in general, or
a medium effect for all predictions
from matplotlib import pyplot as plt
from pdpbox import pdp, get_dataset, info_plots
feature_name = 'number_inpatient'
# Create the data that we will plot
my_pdp = pdp.pdp_isolate(model=my_model,
dataset=val_X,
model_features=val_X.columns,
feature=feature_name)
# plot it
pdp.pdp_plot(my_pdp, featuimport eli5
from eli5.sklearn import PermutationImportance
perm = PermutationImportance(my_model, random_state=1).fit(val_X, val_y)
eli5.show_weights(perm, feature_names = val_X.columns.tolist())e_name)
plt.show()
Pros
Partial Dependence Plots help show how a single feature impacts predictions.
These are insightful and relevant for many real-world use cases. Plus, with a little effort, they can be explained to a non-technical audience.
Cons
But there's a lot Partial Dependence Plots don't show.
For instance, what is the distribution of effects?
SHAP dependence contribution plots provide a similar insight to PDP's, but they add a lot more detail.
import shap # package used to calculate Shap values
data_for_prediction = val_X.iloc[0,:] # use 1 row of data here. Could use multiple rows if desired
# data_for_prediction = val_X.iloc[0].astype(float) # to test function
# Create object that can calculate shap values
explainer = shap.TreeExplainer(my_model)
shap_values = explainer.shap_values(data_for_prediction)
shap.initjs()
# The first array is the SHAP values for a negative outcome
shap.force_plot(explainer.expected_value[0], shap_values[0], data_for_prediction)
# The second array is the list of SHAP values for the positive outcome
shap.force_plot(explainer.expected_value[1], shap_values[1], data_for_prediction)
or more concrete:
sample_data_for_prediction = val_X.iloc[0].astype(float)
# The first array is the SHAP values for a negative outcome
# The second array is the list of SHAP values for the positive outcome
def patient_risk_factors_readmission(model, patient_data):
# Create object that can calculate shap values
explainer = shap.TreeExplainer(model)
shap_values = get_shap_arrays(model, patient_data)
shap.initjs()
# expected_value[1] for positive outcome, i.e. "being readmitted"
return shap.force_plot(explainer.expected_value[1], shap_values[1], patient_data)
patient_risk_factors_readmission(my_model, sample_data_for_prediction)
import shap # package used to calculate Shap values
# Create object that can calculate shap values
explainer = shap.TreeExplainer(my_model)
# calculate shap values. This is what we will plot.
# Calculate shap_values for all of val_X rather than a single row, to have more data for plot.
shap_values = explainer.shap_values(val_X)
# Make plot. Index of [1] is explained in text below.
shap.summary_plot(shap_values[1], val_X)
summary_plot
is the last line.import shap # package used to calculate Shap values
# Create object that can calculate shap values
explainer = shap.TreeExplainer(my_model)
# calculate shap values. This is what we will plot.
shap_values = explainer.shap_values(X)
# make plot.
shap.dependence_plot('Ball Possession %', shap_values[1], X, interaction_index="Goal Scored")
Congratulations!
I hope like me you enjoyed learning how to get more from your models. Big thanks to Dan Becker ;)


Why not buy a new awesome theme?
Alexander Pierce - Web Developer Member since Nov. 2012
original page


ucollections
– collection and container types¶
|see_cpython_module| python:collections
.
This module implements advanced collection and container types to hold/accumulate various objects.
Classes¶
-
ucollections.
deque
(iterable, maxlen[, flags])¶ Deques (double-ended queues) are a list-like container that support O(1) appends and pops from either side of the deque. New deques are created using the following arguments:
iterable must be the empty tuple, and the new deque is created empty.
maxlen must be specified and the deque will be bounded to this maximum length. Once the deque is full, any new items added will discard items from the opposite end.
The optional flags can be 1 to check for overflow when adding items.
As well as supporting bool and len, deque objects have the following methods:
-
deque.
append
(x)¶ Add x to the right side of the deque. Raises IndexError if overflow checking is enabled and there is no more room left.
-
deque.
popleft
()¶ Remove and return an item from the left side of the deque. Raises IndexError if no items are present.
-
ucollections.
namedtuple
(name, fields)¶ This is factory function to create a new namedtuple type with a specific name and set of fields. A namedtuple is a subclass of tuple which allows to access its fields not just by numeric index, but also with an attribute access syntax using symbolic field names. Fields is a sequence of strings specifying field names. For compatibility with CPython it can also be a a string with space-separated field named (but this is less efficient). Example of use:
from ucollections import namedtuple MyTuple = namedtuple("MyTuple", ("id", "name")) t1 = MyTuple(1, "foo") t2 = MyTuple(2, "bar") print(t1.name) assert t2.name == t2[1]
-
ucollections.
OrderedDict
(...)¶ dict
type subclass which remembers and preserves the order of keys added. When ordered dict is iterated over, keys/items are returned in the order they were added:from ucollections import OrderedDict # To make benefit of ordered keys, OrderedDict should be initialized # from sequence of (key, value) pairs. d = OrderedDict([("z", 1), ("a", 2)]) # More items can be added as usual d["w"] = 5 d["b"] = 3 for k, v in d.items(): print(k, v)
Output:
z 1 a 2 w 5 b 3


This free site does not show ads and does not collect personally identifiable information. Our mission is to provide one-click access to verifiably accurate information on safe voting locations to voters across the country.
Can you please help us (and other voters) out by spreading the word to everyone you know? Please think of three or more specific people that you can share this with and use our social sharing buttons below the map to do so. Thank you!
Please tap on the X in the upper-right part of this message window to return to your results.


Swelling.
None.
The common femoral, femoral, popliteal, proximal medial saphenous, and deep femoral veins are patent and free of thrombus bilaterally. The veins are normally compressible, and have normal phasic flow and augmentation response.
The paired peroneal and posterior tibial calf veins are patent bilaterally.
Negative study. No deep vein thrombosis.


//Write a program to prompt the user to enter a year (like 2011, 2012, 2010, etc). Based on the value entered, display the movie that won the Oscars for that year. Just write this for last 8 years. If he enters beyond last 8 years then alert the user to enter between 2003-2012.


{% extends "layout.html" %} {% block brand %} {% include "includes/v2/brandChange.html" %} {% endblock %} {% block content %} {% include "includes/v2/navV5.html" %} Choose enquiry types Select enquiry types to add to queue 3rd Party Deductions Appeal BD Sending Pilot Benefit Cap Query Mandatory Reconsideration Maintenance Missing Instrument of Payment (IOP) Mortgages New Claim {% endblock %}


Competitive Programming Club in Ufa, Russia
is a weekly meetup of people with interest in programming algorithms,
data structures and programming competitions.
Contact: Дима Борзов at +7(917)7804237
Time: Fri at 15:00
Place: Национальная Библиотека им. Валиди, комната 101
(see on map)
Scheduled Talks
-
Nov 13: Dynamic Programming - an overview will start with the basics of recursive algorithms, continue to outline the immense scope of the approach. Will discuss how to identify problems that can be approached with it.
-
Nov 20: Trees, Search Trees and Tries - An overview of tree-like data structures and their applications.
-
Nov 27: Participating in Programming Competitions for Fun and Profit - will discuss what competitions are available for participation, how to prepare and why it is worth the effort
Relevant Links


Welcome to the Quiz
Play
Logout
Select your Category
Maths
$
27
/mo
Lorem ipsum is common text
Start
Science
$
97
/mo
Lorem ipsum is common text
Start
Computers
$
147
/mo
Lorem ipsum is common text
Start
Geography
$
147
/mo
Lorem ipsum is common text
Start
History
$
147
/mo
Lorem ipsum is common text
Start